[ 1583825 ] No tax recalculation after line changes

This commit is contained in:
deathmeat 2007-03-21 17:55:40 +00:00
parent 8da50e3567
commit 0b426b1aad
2 changed files with 59 additions and 41 deletions

View File

@ -835,6 +835,15 @@ public class MInvoiceLine extends X_C_InvoiceLine
return false;
}
// deathmeat: [ 1583825 ] No tax recalculation after line changes
if((MInvoiceTax.get(this, getPrecision(),
true, get_TrxName()).getTaxAmt().doubleValue() == 0.0D))
{
// Tax line total is zero, delete the line
MInvoiceTax.get(this, getPrecision(),
true, get_TrxName()).delete(true, get_TrxName());
}
// Update Invoice Header
String sql = "UPDATE C_Invoice i"
+ " SET TotalLines="

View File

@ -911,6 +911,15 @@ public class MOrderLine extends X_C_OrderLine
if (!tax.save(get_TrxName()))
return false;
// deathmeat: [ 1583825 ] No tax recalculation after line changes
if((MOrderTax.get(this, getPrecision(),
true, get_TrxName()).getTaxAmt().doubleValue() == 0.0D))
{
// Tax line total is zero, delete the line
MOrderTax.get(this, getPrecision(),
true, get_TrxName()).delete(true, get_TrxName());
}
// Update Order Header
String sql = "UPDATE C_Order i"
+ " SET TotalLines="