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

@ -240,11 +240,14 @@ public class MPackage extends X_M_Package
int packageMPSCount = DB.getSQLValue(get_TrxName(), sb.toString(), getM_Package_ID());
if (getBoxCount() > 0 && getBoxCount() - packageMPSCount > 0)
{
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;
}