IDEMPIERE-4593 Error completing a Standard Sales Order with Shipper and Calculated Freight Cost Rule (#454)

This commit is contained in:
Carlos Ruiz 2020-12-10 13:57:25 +01:00 committed by GitHub
parent e017046dac
commit 4d96ac1f8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -96,7 +96,9 @@ public class SalesOrderRateInquiryProcess extends SvrProcess
else if (ol.getM_Product_ID() > 0) else if (ol.getM_Product_ID() > 0)
{ {
MProduct product = new MProduct(getCtx(), ol.getM_Product_ID(), get_TrxName()); MProduct product = new MProduct(getCtx(), ol.getM_Product_ID(), get_TrxName());
if (product.isService())
continue;
BigDecimal weight = product.getWeight(); BigDecimal weight = product.getWeight();
if (weight == null || weight.compareTo(BigDecimal.ZERO) == 0) if (weight == null || weight.compareTo(BigDecimal.ZERO) == 0)
throw new AdempiereException("No weight defined for product " + product.toString()); throw new AdempiereException("No weight defined for product " + product.toString());
@ -250,7 +252,9 @@ public class SalesOrderRateInquiryProcess extends SvrProcess
else if (ol.getM_Product_ID() > 0) else if (ol.getM_Product_ID() > 0)
{ {
MProduct product = new MProduct(ctx, ol.getM_Product_ID(), trxName); MProduct product = new MProduct(ctx, ol.getM_Product_ID(), trxName);
if (product.isService())
continue;
BigDecimal weight = product.getWeight(); BigDecimal weight = product.getWeight();
if (weight == null || weight.compareTo(BigDecimal.ZERO) == 0) if (weight == null || weight.compareTo(BigDecimal.ZERO) == 0)
throw new AdempiereException("No weight defined for product " + product.toString()); throw new AdempiereException("No weight defined for product " + product.toString());

View File

@ -1550,7 +1550,9 @@ public class MOrder extends X_C_Order implements DocAction
else if (ol.getM_Product_ID() > 0) else if (ol.getM_Product_ID() > 0)
{ {
MProduct product = new MProduct(getCtx(), ol.getM_Product_ID(), get_TrxName()); MProduct product = new MProduct(getCtx(), ol.getM_Product_ID(), get_TrxName());
if (product.isService())
continue;
BigDecimal weight = product.getWeight(); BigDecimal weight = product.getWeight();
if (weight == null || weight.compareTo(BigDecimal.ZERO) == 0) if (weight == null || weight.compareTo(BigDecimal.ZERO) == 0)
{ {