| | |
| | | canPackagingQuantity := ifexpr( ceil( needPackagingQuantity / ppls.LotSize() ) < floor( ppnc.MaximumDailyPackagingQuantity() / ppls.LotSize() ), |
| | | ceil( needPackagingQuantity / ppls.LotSize() ), |
| | | floor( ppnc.MaximumDailyPackagingQuantity() / ppls.LotSize() ) ) * ppls.LotSize(); |
| | | // 改类下其他产品包装总和 |
| | | categoryPackageQuantity := sum( indexPPCell, PackagingPlanColumn.PackagingPlanCell, tempPPCell, |
| | | tempPPCell <> indexPPCell and |
| | | tempPPCell.PackagingPlanRow().Factory() = indexPPCell.PackagingPlanRow().Factory() and |
| | | tempPPCell.PackagingPlanRow().Category() = indexPPCell.PackagingPlanRow().Category(), |
| | | tempPPCell.Package() ); |
| | | canPackagingQuantity := minvalue( [Number] ( ppnc.MaximumDailyPackagingQuantity() - categoryPackageQuantity ), canPackagingQuantity ); |
| | | // info( "开始包装的日期:", indexPPCell.StartDate().Format( "Y-M2-D2" ), " 能包装的数量:", canPackagingQuantity ); |
| | | |
| | | indexPPCell.Package( canPackagingQuantity ); |