IDEMPIERE-4071 Realized/UnrealizedGainLoss / clear accounts when only one org

This commit is contained in:
Nicolas Micoud 2019-10-14 17:25:45 +02:00
parent c92ca011e1
commit 093c79943a
1 changed files with 2 additions and 3 deletions

View File

@ -254,8 +254,7 @@ public class Doc_AllocationHdr extends Doc
// if not using clearing accounts, then don't post amtsource
// change the allocationsource to be writeoff + discount
allocationSource = line.getDiscountAmt().add(line.getWriteOffAmt());
payAcct = getPaymentAcct(as, line.getC_Payment_ID());
} else {
// Normal behavior -- unchanged if using clearing accounts
@ -437,7 +436,7 @@ public class Doc_AllocationHdr extends Doc
|| getC_Currency_ID() != line.getInvoiceC_Currency_ID())) // allocation <> invoice currency
{
p_Error = createRealizedGainLoss (line, as, fact, bpAcct, invoice, payAcct, payment,
allocationSource, allocationAccounted);
allocationSourceForRGL, allocationAccounted);
if (p_Error != null)
return null;
}