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