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:
parent
bf2b40f8d8
commit
e7cd85ca42
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue