IDEMPIERE-3281 Wrong Tax Correction posting at Write Off / integrate patch from Anton Fildan
This commit is contained in:
parent
b56a83ff55
commit
cbfc3ac88f
|
@ -1049,10 +1049,17 @@ class Doc_AllocationTax
|
|||
total, m_WriteOffAmt, precision);
|
||||
if (amount.signum() != 0)
|
||||
{
|
||||
fact.createLine (line, m_WriteOffAccount,
|
||||
as.getC_Currency_ID(), amount, null);
|
||||
fact.createLine (line, taxAcct,
|
||||
as.getC_Currency_ID(), null, amount);
|
||||
if (m_IsSOTrx) {
|
||||
fact.createLine (line, m_WriteOffAccount,
|
||||
as.getC_Currency_ID(), amount, null);
|
||||
fact.createLine (line, taxAcct,
|
||||
as.getC_Currency_ID(), null, amount);
|
||||
} else {
|
||||
fact.createLine (line, m_WriteOffAccount,
|
||||
as.getC_Currency_ID(), amount.negate(), null);
|
||||
fact.createLine (line, taxAcct,
|
||||
as.getC_Currency_ID(), null, amount.negate());
|
||||
}
|
||||
}
|
||||
}
|
||||
// Original Tax is CR - need to correct it DR
|
||||
|
@ -1062,10 +1069,17 @@ class Doc_AllocationTax
|
|||
total, m_WriteOffAmt, precision);
|
||||
if (amount.signum() != 0)
|
||||
{
|
||||
fact.createLine (line, taxAcct,
|
||||
as.getC_Currency_ID(), amount, null);
|
||||
fact.createLine (line, m_WriteOffAccount,
|
||||
as.getC_Currency_ID(), null, amount);
|
||||
if(m_IsSOTrx) {
|
||||
fact.createLine (line, taxAcct,
|
||||
as.getC_Currency_ID(), amount, null);
|
||||
fact.createLine (line, m_WriteOffAccount,
|
||||
as.getC_Currency_ID(), null, amount);
|
||||
} else {
|
||||
fact.createLine (line, taxAcct,
|
||||
as.getC_Currency_ID(), amount.negate(), null);
|
||||
fact.createLine (line, m_WriteOffAccount,
|
||||
as.getC_Currency_ID(), null, amount.negate());
|
||||
}
|
||||
}
|
||||
}
|
||||
} // WriteOff
|
||||
|
|
Loading…
Reference in New Issue