IDEMPIERE-1665:matching PO-receipt error make session break
This commit is contained in:
parent
ee2a9757b6
commit
e2fdfddacc
|
@ -206,14 +206,21 @@ public class Match
|
||||||
// Create it
|
// Create it
|
||||||
String innerTrxName = Trx.createTrxName("Match");
|
String innerTrxName = Trx.createTrxName("Match");
|
||||||
Trx innerTrx = Trx.get(innerTrxName, true);
|
Trx innerTrx = Trx.get(innerTrxName, true);
|
||||||
|
|
||||||
|
try{
|
||||||
if (createMatchRecord(invoice, M_InOutLine_ID, Line_ID, BigDecimal.valueOf(qty), innerTrxName))
|
if (createMatchRecord(invoice, M_InOutLine_ID, Line_ID, BigDecimal.valueOf(qty), innerTrxName))
|
||||||
innerTrx.commit();
|
innerTrx.commit();
|
||||||
else
|
else
|
||||||
innerTrx.rollback();
|
innerTrx.rollback();
|
||||||
|
}catch(Exception ex){
|
||||||
|
innerTrx.rollback();
|
||||||
|
throw new AdempiereException(ex);
|
||||||
|
}finally{
|
||||||
innerTrx.close();
|
innerTrx.close();
|
||||||
innerTrx = null;
|
innerTrx = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// requery
|
// requery
|
||||||
//cmd_search();
|
//cmd_search();
|
||||||
} // cmd_process
|
} // cmd_process
|
||||||
|
|
Loading…
Reference in New Issue