From e7cd85ca4240460798e65ad02dd384469297d88a Mon Sep 17 00:00:00 2001 From: Elaine Tan Date: Mon, 29 Apr 2013 17:56:23 +0800 Subject: [PATCH] IDEMPIERE-862 Create lines from MPS Lines function is not working - fix create package mps based on the box count --- org.adempiere.base/src/org/compiere/model/MPackage.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/MPackage.java b/org.adempiere.base/src/org/compiere/model/MPackage.java index 18076db9f7..2e769b9483 100644 --- a/org.adempiere.base/src/org/compiere/model/MPackage.java +++ b/org.adempiere.base/src/org/compiere/model/MPackage.java @@ -241,9 +241,12 @@ public class MPackage extends X_M_Package if (getBoxCount() > 0 && getBoxCount() - packageMPSCount > 0) { - MPackageMPS packageMPS = new MPackageMPS(getCtx(), 0, get_TrxName()); - packageMPS.setM_Package_ID(getM_Package_ID()); - packageMPS.saveEx(); + for (int i = 0; i < getBoxCount() - packageMPSCount; i++) + { + MPackageMPS packageMPS = new MPackageMPS(getCtx(), 0, get_TrxName()); + packageMPS.setM_Package_ID(getM_Package_ID()); + packageMPS.saveEx(); + } } return success;