IDEMPIERE-862 Create lines from MPS Lines function is not working - fix create package mps based on the box count

This commit is contained in:
Elaine Tan 2013-04-29 17:56:23 +08:00
parent bf2b40f8d8
commit e7cd85ca42
1 changed files with 6 additions and 3 deletions

View File

@ -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;