IDEMPIERE-3637 Invoice vendor re-price is not recalculating taxes

This commit is contained in:
Carlos Ruiz 2018-02-09 23:20:37 +01:00
parent 969d02f63c
commit 1216407472
2 changed files with 5 additions and 2 deletions

View File

@ -92,7 +92,10 @@ public class OrderRePrice extends SvrProcess
for (int i = 0; i < lines.length; i++) for (int i = 0; i < lines.length; i++)
{ {
lines[i].setPrice(invoice.getM_PriceList_ID(), invoice.getC_BPartner_ID()); lines[i].setPrice(invoice.getM_PriceList_ID(), invoice.getC_BPartner_ID());
lines[i].saveEx(); if (lines[i].is_Changed()) {
lines[i].setTaxAmt();
lines[i].saveEx();
}
} }
invoice = new MInvoice (getCtx(), p_C_Invoice_ID, null); invoice = new MInvoice (getCtx(), p_C_Invoice_ID, null);
BigDecimal newPrice = invoice.getGrandTotal(); BigDecimal newPrice = invoice.getGrandTotal();

View File

@ -457,7 +457,7 @@ public class MInvoiceLine extends X_C_InvoiceLine
BigDecimal TaxAmt = Env.ZERO; BigDecimal TaxAmt = Env.ZERO;
if (getC_Tax_ID() == 0) if (getC_Tax_ID() == 0)
return; return;
// setLineNetAmt(); setLineNetAmt();
MTax tax = MTax.get (getCtx(), getC_Tax_ID()); MTax tax = MTax.get (getCtx(), getC_Tax_ID());
if (tax.isDocumentLevel() && m_IsSOTrx) // AR Inv Tax if (tax.isDocumentLevel() && m_IsSOTrx) // AR Inv Tax
return; return;