IDEMPIERE-3853 Bug in Auto Allocation / IDEMPIERE-378

This commit is contained in:
Carlos Ruiz 2018-12-25 21:39:37 +01:00
parent a1de492e9e
commit f3851b4688
1 changed files with 1 additions and 1 deletions

View File

@ -1004,7 +1004,7 @@ public class MAllocationHdr extends X_C_AllocationHdr implements DocAction
else if (invoice != null) else if (invoice != null)
{ {
// adjust open balance by discount and write off amounts. // adjust open balance by discount and write off amounts.
BigDecimal amt = MConversionRate.convertBase(getCtx(), line.getWriteOffAmt().add(line.getDiscountAmt()), BigDecimal amt = MConversionRate.convertBase(getCtx(), allocAmt.negate(),
getC_Currency_ID(), invoice.getDateAcct(), invoice.getC_ConversionType_ID(), getAD_Client_ID(), getAD_Org_ID()); getC_Currency_ID(), invoice.getDateAcct(), invoice.getC_ConversionType_ID(), getAD_Client_ID(), getAD_Org_ID());
if (amt == null) if (amt == null)
{ {