xiaoding721
2024-11-18 dad14c2cf836e8074918c915070662ef00eb8359
_Main/BL/Type_PackagingPlanCell/StaticMethod_Package.qbl
@@ -46,6 +46,13 @@
          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 );