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
|
// end MZ
|
||||||
if (base.signum() != 0)
|
if (base.signum() != 0)
|
||||||
{
|
{
|
||||||
BigDecimal result = getLineNetAmt().multiply(base);
|
double result = getLineNetAmt().multiply(base).doubleValue();
|
||||||
result = result.divide(total, BigDecimal.ROUND_HALF_UP);
|
result /= total.doubleValue();
|
||||||
lca.setAmt(result.doubleValue(), getPrecision());
|
lca.setAmt(result, getPrecision());
|
||||||
}
|
}
|
||||||
if (!lca.save()){
|
if (!lca.save()){
|
||||||
msgreturn = new StringBuilder("Cannot save line Allocation = ").append(lca);
|
msgreturn = new StringBuilder("Cannot save line Allocation = ").append(lca);
|
||||||
|
@ -1212,9 +1212,9 @@ public class MInvoiceLine extends X_C_InvoiceLine
|
||||||
// end MZ
|
// end MZ
|
||||||
if (base.signum() != 0)
|
if (base.signum() != 0)
|
||||||
{
|
{
|
||||||
BigDecimal result = getLineNetAmt().multiply(base);
|
double result = getLineNetAmt().multiply(base).doubleValue();
|
||||||
result = result.divide(total, BigDecimal.ROUND_HALF_UP);
|
result /= total.doubleValue();
|
||||||
lca.setAmt(result.doubleValue(), getPrecision());
|
lca.setAmt(result, getPrecision());
|
||||||
}
|
}
|
||||||
if (!lca.save()){
|
if (!lca.save()){
|
||||||
msgreturn = new StringBuilder("Cannot save line Allocation = ").append(lca);
|
msgreturn = new StringBuilder("Cannot save line Allocation = ").append(lca);
|
||||||
|
|
Loading…
Reference in New Issue