Open yamelsenih opened 5 months ago
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Bug report
When a payroll is being posted and there is a negative difference, a balancing error is generated.
Generally, when posting a payroll document, you should take it to the balancing account if there is a difference.
There is a problem here because you are comparing absolute values:
if (totalDebit.abs().compareTo(totalCredit.abs()) > 0) {
regTotal = fact.createLine(null, acct, getC_Currency_ID(), null, totalDebit.subtract(totalCredit));
} else {
regTotal = fact.createLine(null, acct, getC_Currency_ID(), totalCredit.abs().subtract(totalDebit.abs()), null);
}
Bug report
Cuando se está contabilizando una nómina y se tiene una diferencia negativa se genera un error de balanceo.
Steps to reproduce
Screenshot or Gif
Expected behavior
Por lo general al contabilizar un documento de nómina debe llevarlo a la cuenta de balanceo si hay diferencia.
Aquí hay un problema porque está comparando valores absolutos:
Contexto Adicional
https://github.com/adempiere/adempiere/issues/4305 https://github.com/adempiere/adempiere/pull/4306