kthiemann 2008-06-23 08:49:57 +00:00
parent cd3551160d
commit cb9e7efa69
1 changed files with 2 additions and 3 deletions

View File

@ -1086,7 +1086,7 @@ class Doc_AllocationTax
} // createEntries
/**
* Calc Amount tax / (total-tax) * amt
* Calc Amount tax / total * amt
* @param tax tax
* @param total total
* @param amt reduction amt
@ -1101,8 +1101,7 @@ class Doc_AllocationTax
|| amt.signum() == 0)
return Env.ZERO;
//
BigDecimal devisor = total.subtract(tax);
BigDecimal multiplier = tax.divide(devisor, 10, BigDecimal.ROUND_HALF_UP);
BigDecimal multiplier = tax.divide(total, 10, BigDecimal.ROUND_HALF_UP);
BigDecimal retValue = multiplier.multiply(amt);
if (retValue.scale() > precision)
retValue = retValue.setScale(precision, BigDecimal.ROUND_HALF_UP);