IDEMPIERE-2541 Landed Cost Allocation does not honour delete/void / thanks to Armen Rizal

This commit is contained in:
Carlos Ruiz 2015-07-01 20:22:31 -05:00
parent 5b994458ae
commit cf30ef3581
1 changed files with 3 additions and 3 deletions

View File

@ -1016,13 +1016,13 @@ public class MInvoiceLine extends X_C_InvoiceLine
{
if (isProcessed())
return "Processed";
MLandedCost[] lcs = MLandedCost.getLandedCosts(this);
if (lcs.length == 0)
return "";
StringBuilder sql = new StringBuilder("DELETE C_LandedCostAllocation WHERE C_InvoiceLine_ID=").append(getC_InvoiceLine_ID());
int no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
if (log.isLoggable(Level.INFO)) log.info("Deleted #" + no);
MLandedCost[] lcs = MLandedCost.getLandedCosts(this);
if (lcs.length == 0)
return "";
int inserted = 0;
// *** Single Criteria ***