lihongji
2024-08-07 aad9856b9f6bc4debd611639ac2a2fb678b6ed71
_Main/BL/Type_PackagingPlanCell/StaticMethod_GenerateReport.qbl
@@ -66,7 +66,7 @@
    Transaction::Transaction().Propagate( relation( PackagingPlanCell, Next ) );
    
    // 设置包装&拆包-数量
    traverse ( macroPlan, PackagingPlanRow, ppr, ppr.ProductID() = "Windshield" and ppr.StockingPointID() = "Bosch" ) {
    traverse ( macroPlan, PackagingPlanRow, ppr, ( ppr.ProductID() = "Windshield" and ppr.StockingPointID() = "Bosch" ) or ( ppr.ProductID() = "Windshield" and ppr.StockingPointID() = "Components (Spain)" ) ) {
      traverse ( ppr, PackagingPlanCell, ppc/*, ppc.StartDate() = Date::Construct( 2020, 4, 1 )*/ ) {
        // 设置包装数量
        if ( ppc.PackagingInventory() < ppc.Out() ) { // 包装库存是否小于调出
@@ -94,6 +94,16 @@
            prePPC := prePPC.Previous();
          }
        }
        // 设置拆包数量
        if ( ppc.TransferIn() > 0.0 ) { // 有调入数量
          // 获取包装lotsize
          ppls                 := select( macroPlan, PackagingPlanLotSize, tempPPLS, tempPPLS.Factory() =  ppc.PackagingPlanRow().Factory()    and
                                                                                     tempPPLS.ProductID() = ppc.PackagingPlanRow().ProductID() );
          // 设置拆包值
          ppc.Unpacking( ppc.TransferIn() );
        }
      }
    }
  *]