IDEMPIERE-4071 Realized/UnrealizedGainLoss / clear accounts when only one org
This commit is contained in:
parent
c92ca011e1
commit
093c79943a
|
@ -254,8 +254,7 @@ public class Doc_AllocationHdr extends Doc
|
||||||
// if not using clearing accounts, then don't post amtsource
|
// if not using clearing accounts, then don't post amtsource
|
||||||
// change the allocationsource to be writeoff + discount
|
// change the allocationsource to be writeoff + discount
|
||||||
allocationSource = line.getDiscountAmt().add(line.getWriteOffAmt());
|
allocationSource = line.getDiscountAmt().add(line.getWriteOffAmt());
|
||||||
|
payAcct = getPaymentAcct(as, line.getC_Payment_ID());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Normal behavior -- unchanged if using clearing accounts
|
// 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
|
|| getC_Currency_ID() != line.getInvoiceC_Currency_ID())) // allocation <> invoice currency
|
||||||
{
|
{
|
||||||
p_Error = createRealizedGainLoss (line, as, fact, bpAcct, invoice, payAcct, payment,
|
p_Error = createRealizedGainLoss (line, as, fact, bpAcct, invoice, payAcct, payment,
|
||||||
allocationSource, allocationAccounted);
|
allocationSourceForRGL, allocationAccounted);
|
||||||
if (p_Error != null)
|
if (p_Error != null)
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue