Quintiq file version 2.0 
 | 
#parent: #root 
 | 
StaticMethod CreateData ( 
 | 
  MacroPlan macroPlan 
 | 
) 
 | 
{ 
 | 
  TextBody: 
 | 
  [* 
 | 
    macroPlan.MachineLogisticsCostReportRow( relflush ); 
 | 
    macroPlan.MachineLogisticsCostReportColumn( relflush ); 
 | 
     
 | 
    // 创建行 
 | 
    categories := selectuniquevalues( macroPlan, Product_MP, tempPMP, tempPMP.IsLeaf()                           and 
 | 
                                      exists( tempPMP, AllParent.AsParent, tempPMP1, tempPMP1.ID() = "机加件" ),   
 | 
                                      tempPMP.ParentID() ); 
 | 
    traverse ( categories, Elements, c ) { 
 | 
      macroPlan.MachineLogisticsCostReportRow( relnew, Factory := "大连工厂", Category := c, Index := 0 ); 
 | 
      macroPlan.MachineLogisticsCostReportRow( relnew, Factory := "长春工厂", Category := c, Index := 0 ); 
 | 
    } 
 | 
     
 | 
    // 创建列 
 | 
    indexDate := macroPlan.StartOfPlanning().Date().StartOfMonth(); 
 | 
    for ( i := 0; i < 12; i++ ) { 
 | 
      macroPlan.MachineLogisticsCostReportColumn( relnew, StartDate := indexDate ); 
 | 
      indexDate := indexDate.StartOfNextMonth(); 
 | 
    } 
 | 
     
 | 
    // 创建单元格 
 | 
    traverse ( macroPlan, MachineLogisticsCostReportRow, mlcrr 
 | 
    //           , mlcrr.Factory() = "长春工厂" 
 | 
              ) { // 循环行 
 | 
      info( "当前遍历的行:", mlcrr.Factory(), " ", mlcrr.Category() ); 
 | 
      traverse ( macroPlan, MachineLogisticsCostReportColumn, mlcrc ) { // 循环列 
 | 
       
 | 
        // 机加成本参数 
 | 
        lcm   := select( macroPlan, LogisticsCostMachining, tempLCM, tempLCM.Factory() = mlcrr.Factory() and tempLCM.Product() = mlcrr.Category() 
 | 
                         and tempLCM.StartDate() <= mlcrc.StartDate() and tempLCM.EndDate() >= mlcrc.StartDate().StartOfNextMonth() ); 
 | 
         
 | 
        // 运输成本参数 
 | 
        lct   := select( macroPlan, LogisticsCostTransport, tempLCT,  
 | 
                         tempLCT.Product()     = mlcrr.Category()                                                                                                                         and 
 | 
                         tempLCT.Origin()      = ifexpr( mlcrr.Category() = "AGW", "DL AGW", ifexpr( mlcrr.Factory() = "大连工厂", "DL", "CC" ) + " " + mlcrr.Category() + "外租库" )     and 
 | 
                         tempLCT.Destination() = ifexpr( mlcrr.Category() = "AGW", "CC AGW库房", ifexpr( mlcrr.Factory() = "大连工厂", "DL", "CC" ) + " " + mlcrr.Category() + "线边库" ) ); 
 | 
     
 | 
        // 运输成本参数(调拨费用) 
 | 
        lct1  := select( macroPlan, LogisticsCostTransport, tempLCT,  
 | 
                         tempLCT.Product()     = mlcrr.Category()                                                                                                                         and 
 | 
                         tempLCT.Origin()      = ifexpr( mlcrr.Category() = "AGW", "DL AGW", ifexpr( mlcrr.Factory() = "大连工厂", "CC", "DL" ) + " " + mlcrr.Category() )                and 
 | 
                         tempLCT.Destination() = ifexpr( mlcrr.Category() = "AGW", "CC AGW库房", ifexpr( mlcrr.Factory() = "大连工厂", "DL", "CC" ) + " " + mlcrr.Category() + "外租库" ) ); 
 | 
     
 | 
         // 当前月末最后一天日期 
 | 
        lastDayOfThisMonth := mlcrc.StartDate().StartOfNextMonth() - 1; 
 | 
     
 | 
        cell := mlcrr.MachineLogisticsCostReportCell( relnew ); 
 | 
     
 | 
        // 设置包装费用(包装量 * 包装单价) 
 | 
        packageQuantity := sum( macroPlan, PackagingPlanRow.PackagingPlanCell, tempPPC, 
 | 
                                tempPPC.PackagingPlanRow().Category()             = mlcrr.Category()          and 
 | 
                                tempPPC.PackagingPlanRow().Factory()              = mlcrr.Factory()           and 
 | 
                                tempPPC.PackagingPlanColumn().StartDate().Year()  = mlcrc.StartDate().Year()  and 
 | 
                                tempPPC.PackagingPlanColumn().StartDate().Month() = mlcrc.StartDate().Month(), 
 | 
                                tempPPC.Package() ); 
 | 
        cell.PackingCharges( [Number] ( packageQuantity * guard( lcm.PackagePrice(), 1 ) ) ); 
 | 
     
 | 
        // 设置拆包费用(拆包量 * 拆包单价) 
 | 
        unpackingQuantity := sum( macroPlan, PackagingPlanRow.PackagingPlanCell, tempPPC, 
 | 
                                  tempPPC.PackagingPlanRow().Category()             = mlcrr.Category()          and 
 | 
                                  tempPPC.PackagingPlanRow().Factory()              = mlcrr.Factory()           and 
 | 
                                  tempPPC.PackagingPlanColumn().StartDate().Year()  = mlcrc.StartDate().Year()  and 
 | 
                                  tempPPC.PackagingPlanColumn().StartDate().Month() = mlcrc.StartDate().Month(), 
 | 
                                  tempPPC.Unpacking() ); 
 | 
        cell.UnpackingCost( [Number] ( unpackingQuantity * guard( lcm.UnpackingPrice(), 1 ) ) ); 
 | 
     
 | 
        // 设置缓冲纸费用(包装类 * 缓冲纸单价) 
 | 
        cell.BufferPaperCost( [Number] ( packageQuantity * guard( lcm.BufferPaperPrice(), 1 ) ) ); 
 | 
     
 | 
          // 设置木箱单价 
 | 
        cell.WoodenCratePriceReal( guard( lcm.WoodenCratePrice(), 1 ) ); 
 | 
     
 | 
        // 设置调拨费用(调拨数量 / 包装容量 / 装载容量 * 运输单价) 
 | 
        transferQuantity := sum( macroPlan, TransferPlanRow.TransferPlanCell, tempTPC, 
 | 
                                 tempTPC.TransferPlanRow().Category()                      = mlcrr.Category()                                               and 
 | 
                                 tempTPC.TransferPlanRow().Name()                          = ifexpr( mlcrr.Factory() = "大连工厂", "CC to DL", "DL to CC" ) and 
 | 
                                 guard( tempTPC.TransferPlanColumn().ColumnDate().Year()   = mlcrc.StartDate().Year(), false )                              and 
 | 
                                 guard(  tempTPC.TransferPlanColumn().ColumnDate().Month() = mlcrc.StartDate().Month(), false ), 
 | 
                                 [Number]tempTPC.Value() ); 
 | 
    //    info( "调拨数量:", transferQuantity, "    包装容量:", guard( lcm.PackagingCapacity(), 1 ), "    装载容量:", guard( lct1.LoadingCapacity(), 1 ), "    运输单价:",guard( lct1.TransportPrice(), 1 )  ); 
 | 
        cell.TransferCost( [Number] ( ceil( ceil( transferQuantity / guard( lcm.PackagingCapacity(), 1 ) ) / guard( lct1.LoadingCapacity(), 1 ) ) * guard( lct1.TransportPrice(), 1 ) ) ); 
 | 
     
 | 
        // 外租库入库费用(入库量[包装量] / 包装容量 * 入库单价) 
 | 
        cell.StorageFeesForRentedWarehouses( [Number] ( packageQuantity / guard( lcm.PackagingCapacity(), 1 ) * guard( lcm.WarehousingPrice(), 1 ) ) ); 
 | 
     
 | 
        // 外租库出库费用(出库量[拆包量] / 包装容量 * 出库单价) 
 | 
        cell.OutboundExpensesForRentedWarehouses( [Number] ( unpackingQuantity / guard( lcm.PackagingCapacity(), 1 ) * guard( lcm.OutboundPrice(), 1 ) ) ); 
 | 
     
 | 
        // 外租库运输费用(运输数量 / 包装容量 / 装载容量 * 运输单价) 
 | 
        transportationQuantity := sum( macroPlan, Unit.Lane.LaneLeg.Trip.ProductInTrip, tempPIT, 
 | 
                                       tempPIT.Product_MP().ParentID()                                                  =  mlcrr.Category()                                                                       and 
 | 
                                       tempPIT.Trip().Departure().Date()                                                >= mlcrc.StartDate()                                                                      and 
 | 
                                       tempPIT.Trip().Arrival().Date()                                                  <= lastDayOfThisMonth                                                                     and 
 | 
                                       tempPIT.Trip().LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP().ID()      =  ifexpr( mlcrr.Factory() = "大连工厂", "DL", "CC" ) + " " + mlcrr.Category() + "线边库" and 
 | 
                                       tempPIT.Trip().LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP().ID() =  ifexpr( mlcrr.Factory() = "大连工厂", "DL", "CC" ) + " " + mlcrr.Category() + "外租库", 
 | 
                                       tempPIT.Quantity() 
 | 
                                      ); 
 | 
        transportationQuantity := transportationQuantity + 
 | 
                                  sum( macroPlan, Unit.Lane.LaneLeg.Trip.ProductInTrip, tempPIT, 
 | 
                                       tempPIT.Product_MP().ParentID()                                                  =  mlcrr.Category()                                                                       and 
 | 
                                       tempPIT.Trip().Departure().Date()                                                >= mlcrc.StartDate()                                                                      and 
 | 
                                       tempPIT.Trip().Arrival().Date()                                                  <= lastDayOfThisMonth                                                                     and 
 | 
                                       tempPIT.Trip().LaneLeg().AsOriginStockingPointLeg().StockingPoint_MP().ID()      =  ifexpr( mlcrr.Factory() = "大连工厂", "DL", "CC" ) + " " + mlcrr.Category() + "外租库" and 
 | 
                                       tempPIT.Trip().LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP().ID() =  ifexpr( mlcrr.Factory() = "大连工厂", "DL", "CC" ) + " " + mlcrr.Category() + "线边库", 
 | 
                                       tempPIT.Quantity() 
 | 
                                      ); 
 | 
        cell.ExternalRentalWarehouseTransportationCosts( [Number] ( transportationQuantity / guard( lcm.PackagingCapacity(), 1 ) / guard( lct.LoadingCapacity(), 1 ) * guard( lct.TransportPrice(), 1 ) ) ); 
 | 
     
 | 
        // 外租库仓储费用:仓储数量/包装容量*仓储单价 
 | 
        plannedInventory := sum( macroPlan, Product_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriod, tempPISPIP, 
 | 
                                 tempPISPIP.ProductInStockingPoint_MP().Product_MP().IsLeaf()                                                                 and 
 | 
                                 exists( tempPISPIP.ProductInStockingPoint_MP().Product_MP(), AllParent.AsParent, tempPMP, tempPMP.ID() =  "机加件" )         and 
 | 
                                 tempPISPIP.ProductInStockingPoint_MP().Product_MP().ParentID()                                         =  mlcrr.Category()   and 
 | 
                                 tempPISPIP.Start().Date()                                                                              >= mlcrc.StartDate()  and 
 | 
                                 tempPISPIP.End().Date()                                                                                <= lastDayOfThisMonth and 
 | 
                                 tempPISPIP.ProductInStockingPoint_MP().StockingPointID()                                               =  ifexpr( mlcrr.Factory() = "大连工厂", "DL", "CC" ) + " " + mlcrr.Category() + "外租库", 
 | 
                                 tempPISPIP.PlannedInventoryLevelEnd() ); 
 | 
        cell.RentalWarehouseStorageFees( [Number] ( plannedInventory / guard( lcm.PackagingCapacity(), 1 ) * guard( lcm.StoragePrice(), 1 ) ) ); 
 | 
     
 | 
         
 | 
         
 | 
        // 大连工厂(外租库入库费用、外租库出库费用、外租库运输费用、外租库仓储费用)为0 
 | 
        if ( mlcrr.Factory() = "大连工厂" ) { 
 | 
          cell.StorageFeesForRentedWarehouses( 0 ); 
 | 
          cell.OutboundExpensesForRentedWarehouses( 0 ); 
 | 
          cell.ExternalRentalWarehouseTransportationCosts( 0 ); 
 | 
          cell.RentalWarehouseStorageFees( 0 ); 
 | 
        } 
 | 
         
 | 
        // 预计总费用 
 | 
        cell.EstimatedTotalCost( cell.PackingCharges() + cell.UnpackingCost() + cell.BufferPaperCost() + cell.WoodenCrateCost() + cell.TransferCost() + 
 | 
                                 cell.StorageFeesForRentedWarehouses() + cell.OutboundExpensesForRentedWarehouses() + cell.ExternalRentalWarehouseTransportationCosts() + 
 | 
                                 cell.RentalWarehouseStorageFees() ); 
 | 
     
 | 
        // 系数 
 | 
        cell.Coefficient( 1.05 ); 
 | 
     
 | 
        // 总费用 
 | 
        cell.TotalCost( [Number] ( cell.EstimatedTotalCost() * cell.Coefficient() ) ); 
 | 
         
 | 
        cell.MachineLogisticsCostReportColumn( relset, mlcrc ); 
 | 
      } 
 | 
    } 
 | 
     
 | 
    // 创建SUM行 
 | 
    sumR   := macroPlan.MachineLogisticsCostReportRow( relnew,  Category := "SUM", Factory := "大连工厂", Index := 2 ); 
 | 
    traverse ( macroPlan, MachineLogisticsCostReportColumn, mlcrc ) { 
 | 
      cell := sumR.MachineLogisticsCostReportCell( relnew ); 
 | 
      cell.MachineLogisticsCostReportColumn( relset, mlcrc ); 
 | 
       
 | 
      cell.PackingCharges( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.PackingCharges() ) ); 
 | 
      cell.UnpackingCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.UnpackingCost() ) ); 
 | 
      cell.BufferPaperCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.BufferPaperCost() ) ); 
 | 
      cell.QuantityOfWoodenCrates( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.QuantityOfWoodenCrates() ) ); 
 | 
      cell.WoodenCrateCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.WoodenCrateCost() ) ); 
 | 
      cell.TransferCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.TransferCost() ) ); 
 | 
      cell.StorageFeesForRentedWarehouses( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.StorageFeesForRentedWarehouses() ) ); 
 | 
      cell.OutboundExpensesForRentedWarehouses( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.OutboundExpensesForRentedWarehouses() ) ); 
 | 
      cell.ExternalRentalWarehouseTransportationCosts( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.ExternalRentalWarehouseTransportationCosts() ) ); 
 | 
      cell.RentalWarehouseStorageFees( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.RentalWarehouseStorageFees() ) ); 
 | 
      cell.EstimatedTotalCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.EstimatedTotalCost() ) ); 
 | 
      cell.Coefficient( 1.05 ); 
 | 
      cell.TotalCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.TotalCost() ) ); 
 | 
    } 
 | 
     
 | 
    // 创建SUM行 
 | 
    sumR   := macroPlan.MachineLogisticsCostReportRow( relnew,  Category := "SUM", Factory := "长春工厂", Index := 2 ); 
 | 
    traverse ( macroPlan, MachineLogisticsCostReportColumn, mlcrc ) { 
 | 
      cell := sumR.MachineLogisticsCostReportCell( relnew ); 
 | 
      cell.MachineLogisticsCostReportColumn( relset, mlcrc ); 
 | 
       
 | 
      cell.PackingCharges( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.PackingCharges() ) ); 
 | 
      cell.UnpackingCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.UnpackingCost() ) ); 
 | 
      cell.BufferPaperCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.BufferPaperCost() ) ); 
 | 
      cell.QuantityOfWoodenCrates( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.QuantityOfWoodenCrates() ) ); 
 | 
      cell.WoodenCrateCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.WoodenCrateCost() ) ); 
 | 
      cell.TransferCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.TransferCost() ) ); 
 | 
      cell.StorageFeesForRentedWarehouses( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.StorageFeesForRentedWarehouses() ) ); 
 | 
      cell.OutboundExpensesForRentedWarehouses( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.OutboundExpensesForRentedWarehouses() ) ); 
 | 
      cell.ExternalRentalWarehouseTransportationCosts( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.ExternalRentalWarehouseTransportationCosts() ) ); 
 | 
      cell.RentalWarehouseStorageFees( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.RentalWarehouseStorageFees() ) ); 
 | 
      cell.EstimatedTotalCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.EstimatedTotalCost() ) ); 
 | 
      cell.Coefficient( 1.05 ); 
 | 
      cell.TotalCost( sum( mlcrc, MachineLogisticsCostReportCell, tempMLCRCell, tempMLCRCell.MachineLogisticsCostReportRow().Category() <> "SUM" and tempMLCRCell.MachineLogisticsCostReportRow().Factory() = sumR.Factory(), tempMLCRCell.TotalCost() ) ); 
 | 
    } 
 | 
     
 | 
    // 创建SUM列 
 | 
    sumC   := macroPlan.MachineLogisticsCostReportColumn( relnew, StartDate := Date::MaxDate() ); 
 | 
    traverse ( macroPlan, MachineLogisticsCostReportRow, mlcrr ) { 
 | 
      cell := mlcrr.MachineLogisticsCostReportCell( relnew ); 
 | 
      cell.MachineLogisticsCostReportColumn( relset, sumC ); 
 | 
       
 | 
      cell.PackingCharges( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.PackingCharges() ) ); 
 | 
      cell.UnpackingCost( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.UnpackingCost() ) ); 
 | 
      cell.BufferPaperCost( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.BufferPaperCost() ) ); 
 | 
      cell.QuantityOfWoodenCrates( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.QuantityOfWoodenCrates() ) ); 
 | 
      cell.WoodenCrateCost( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.WoodenCrateCost() ) ); 
 | 
      cell.TransferCost( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.TransferCost() ) ); 
 | 
      cell.StorageFeesForRentedWarehouses( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.StorageFeesForRentedWarehouses() ) ); 
 | 
      cell.OutboundExpensesForRentedWarehouses( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.OutboundExpensesForRentedWarehouses() ) ); 
 | 
      cell.ExternalRentalWarehouseTransportationCosts( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.ExternalRentalWarehouseTransportationCosts() ) ); 
 | 
      cell.RentalWarehouseStorageFees( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.RentalWarehouseStorageFees() ) ); 
 | 
      cell.EstimatedTotalCost( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.EstimatedTotalCost() ) ); 
 | 
      cell.Coefficient( 1.05 );  
 | 
      cell.TotalCost( sum( mlcrr, MachineLogisticsCostReportCell, tempMLCRCell, not tempMLCRCell.MachineLogisticsCostReportColumn().StartDate().IsMaxInfinity(), tempMLCRCell.TotalCost() ) );     
 | 
    } 
 | 
  *] 
 | 
} 
 |