IDEMPIERE-3869 discount / write off tax corrections in allocation post require inverted Debit/Credit logic in certain scenarios; tax rate added to Fact_Acct tax correction postings
This commit is contained in:
parent
6ef4cff3d2
commit
5d55c6e6ef
|
@ -1047,12 +1047,14 @@ class Doc_AllocationTax
|
|||
for (int i = 0; i < m_facts.size(); i++)
|
||||
{
|
||||
MFactAcct factAcct = (MFactAcct)m_facts.get(i);
|
||||
if (factAcct.getAmtSourceDr().compareTo(total) > 0)
|
||||
if ( (factAcct.getAmtSourceDr().signum() > 0 && factAcct.getAmtSourceDr().compareTo(total) > 0)
|
||||
|| (factAcct.getAmtSourceDr().signum() < 0 && factAcct.getAmtSourceDr().compareTo(total) < 0))
|
||||
{
|
||||
total = factAcct.getAmtSourceDr();
|
||||
m_totalIndex = i;
|
||||
}
|
||||
if (factAcct.getAmtSourceCr().compareTo(total) > 0)
|
||||
if ( (factAcct.getAmtSourceCr().signum() > 0 && factAcct.getAmtSourceCr().compareTo(total) > 0)
|
||||
|| (factAcct.getAmtSourceCr().signum() < 0 && factAcct.getAmtSourceCr().compareTo(total) < 0))
|
||||
{
|
||||
total = factAcct.getAmtSourceCr();
|
||||
m_totalIndex = i;
|
||||
|
|
Loading…
Reference in New Issue