" is zero or less.");
if (!product.isVerified())
throw new AdempiereUserError("@Error@ Product "+product.getName()+" is not verified");
// Create the Inventory record
MInventory inv = new MInventory(getCtx(), 0, get_TrxName());
inv.setM_Warehouse_ID(loc.getM_Warehouse_ID());
inv.setClientOrg(getAD_Client_ID(), Env.getAD_Org_ID(getCtx()));
inv.addDescription("From BOM " + bom.getValue());
inv.setZPacksDocumentNo();
inv.save(get_TrxName());
// Add the packed product inventory line and then copy lines from the BOM
addPackedProductLine(pack, product, inv, chargeID);
copyBOMLines(bom, pack, product, inv, chargeID);
// Assign the new inventory to the pack
pack.setM_Inventory_ID(inv.getM_Inventory_ID());
pack.save(get_TrxName());
// Return the message to be shown in the status bar. The SrvProcess will
// commit all changes to the database made as part of the get_TrxName()
// transaction.
return "Physical Inventory "+inv.getDocumentNo()+" created.";
} // doIt