From aea4e1017a55cab800b25a792767ea5ede36c243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Garc=C3=ADa?= Date: Wed, 26 Feb 2014 09:51:15 -0500 Subject: [PATCH] IDEMPIERE-1769 RMA Line with product and charge --- .../src/org/adempiere/model/CalloutRMA.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/org.adempiere.base.callout/src/org/adempiere/model/CalloutRMA.java b/org.adempiere.base.callout/src/org/adempiere/model/CalloutRMA.java index 586fb5f66d..5fc2be2af1 100644 --- a/org.adempiere.base.callout/src/org/adempiere/model/CalloutRMA.java +++ b/org.adempiere.base.callout/src/org/adempiere/model/CalloutRMA.java @@ -85,10 +85,14 @@ public class CalloutRMA extends CalloutEngine { if (invoiceLine_ID != 0) { MInvoiceLine invoiceLine = new MInvoiceLine(ctx, invoiceLine_ID, null); - if (invoiceLine.getM_Product_ID() != 0) + if (invoiceLine.getM_Product_ID() != 0) { mTab.setValue(MRMALine.COLUMNNAME_M_Product_ID, invoiceLine.getM_Product_ID()); - if (invoiceLine.getC_Charge_ID() != 0) + mTab.setValue(MRMALine.COLUMNNAME_C_Charge_ID, null); + } + if (invoiceLine.getC_Charge_ID() != 0) { mTab.setValue(MRMALine.COLUMNNAME_C_Charge_ID, invoiceLine.getC_Charge_ID()); + mTab.setValue(MRMALine.COLUMNNAME_M_Product_ID, null); + } mTab.setValue(MRMALine.COLUMNNAME_Qty, invoiceLine.getQtyEntered()); mTab.setValue(MRMALine.COLUMNNAME_Amt, invoiceLine.getPriceEntered()); mTab.setValue(MRMALine.COLUMNNAME_C_Tax_ID, invoiceLine.getC_Tax_ID()); @@ -102,10 +106,14 @@ public class CalloutRMA extends CalloutEngine { else if (iol.getC_OrderLine_ID() != 0) { MOrderLine orderLine = new MOrderLine(ctx, iol.getC_OrderLine_ID(), null); - if (orderLine.getM_Product_ID() != 0) + if (orderLine.getM_Product_ID() != 0) { mTab.setValue(MRMALine.COLUMNNAME_M_Product_ID, orderLine.getM_Product_ID()); - if (orderLine.getC_Charge_ID() != 0) + mTab.setValue(MRMALine.COLUMNNAME_C_Charge_ID, null); + } + if (orderLine.getC_Charge_ID() != 0) { mTab.setValue(MRMALine.COLUMNNAME_C_Charge_ID, orderLine.getC_Charge_ID()); + mTab.setValue(MRMALine.COLUMNNAME_M_Product_ID, null); + } mTab.setValue(MRMALine.COLUMNNAME_Qty, orderLine.getQtyEntered()); mTab.setValue(MRMALine.COLUMNNAME_Amt, orderLine.getPriceEntered()); mTab.setValue(MRMALine.COLUMNNAME_C_Tax_ID, orderLine.getC_Tax_ID());