1003628 Incorrect Landed Cost Allocation calculation. Fixed rounding issue.
This commit is contained in:
parent
d186c35265
commit
cd58305761
|
@ -1089,9 +1089,9 @@ public class MInvoiceLine extends X_C_InvoiceLine
|
|||
// end MZ
|
||||
if (base.signum() != 0)
|
||||
{
|
||||
BigDecimal result = getLineNetAmt().multiply(base);
|
||||
result = result.divide(total, BigDecimal.ROUND_HALF_UP);
|
||||
lca.setAmt(result.doubleValue(), getPrecision());
|
||||
double result = getLineNetAmt().multiply(base).doubleValue();
|
||||
result /= total.doubleValue();
|
||||
lca.setAmt(result, getPrecision());
|
||||
}
|
||||
if (!lca.save()){
|
||||
msgreturn = new StringBuilder("Cannot save line Allocation = ").append(lca);
|
||||
|
@ -1212,9 +1212,9 @@ public class MInvoiceLine extends X_C_InvoiceLine
|
|||
// end MZ
|
||||
if (base.signum() != 0)
|
||||
{
|
||||
BigDecimal result = getLineNetAmt().multiply(base);
|
||||
result = result.divide(total, BigDecimal.ROUND_HALF_UP);
|
||||
lca.setAmt(result.doubleValue(), getPrecision());
|
||||
double result = getLineNetAmt().multiply(base).doubleValue();
|
||||
result /= total.doubleValue();
|
||||
lca.setAmt(result, getPrecision());
|
||||
}
|
||||
if (!lca.save()){
|
||||
msgreturn = new StringBuilder("Cannot save line Allocation = ").append(lca);
|
||||
|
|
Loading…
Reference in New Issue