| | |
| | | macroPlan.CC_EngineRackRow( relflush ); |
| | | macroPlan.CC_EngineRackColumn( relflush ); |
| | | |
| | | sumNumberOfEmptyShelves := 0.0; |
| | | sumStorageFeesForRentedWarehouses := 0.0; |
| | | sumOutboundExpensesForRentedWarehouses := 0.0; |
| | | sumExternalRentalWarehouseTransportationCosts := 0.0; |
| | | sumRentalWarehouseStorageFees := 0.0; |
| | | sumCleaningCost := 0.0; |
| | | sumEstimatedTotalCost := 0.0; |
| | | sumTotalCost := 0.0; |
| | | |
| | | // åå»ºè¡ |
| | | genrations := selectuniquevalues( macroPlan, Product_MP, tempPMP, tempPMP.Generation().TrimBoth() <> "", tempPMP.Generation() ); |
| | | mqbmlbs := selectuniquevalues( macroPlan, Product_MP, tempPMP, tempPMP.MQBMLB().TrimBoth() <> "", tempPMP.MQBMLB() ); |
| | | traverse ( genrations, Elements, g ) { |
| | | traverse ( mqbmlbs, Elements, m ) { |
| | | macroPlan.CC_EngineRackRow( relnew, Generation := g, MLB_MQB := m ); |
| | | macroPlan.CC_EngineRackRow( relnew, Generation := g, MLB_MQB := m, Index := 1 ); |
| | | } |
| | | } |
| | | |
| | |
| | | tempPISPIP.PlannedInventoryLevelEnd() ); |
| | | cell.PackagingCapacity( guard( lce.PackagingCapacity(), 1 ) ); |
| | | cell.PlannedInventory( plannedInventory ); |
| | | cell.NumberOfEmptyShelves( guard( [Number] ( cell.TotalQuantityOfMaterialRacks() - ( plannedInventory / lce.PackagingCapacity() ) ), 0 ) ); |
| | | sumNumberOfEmptyShelves := sumNumberOfEmptyShelves + cell.NumberOfEmptyShelves(); |
| | | |
| | | // å¤ç§åºå
¥åºè´¹ç¨ï¼å卿ºéé / å
è£
容é[åä¸åæ´] * ææ¶å
¥åºåä»·ï¼ |
| | | engineSales := sum( macroPlan, FSImportData, tempFSID, |
| | |
| | | tempFSID.StartDate().Year() = ccerc.StartDate().Year() and |
| | | tempFSID.StartDate().Month() = ccerc.StartDate().Month(), |
| | | tempFSID.Quantity() ); |
| | | |
| | | cell.StorageFeesForRentedWarehouses( [Number] ( engineSales / guard( lce.PackagingCapacity(), 1 ) * guard( lcmr.WarehousingPrice(), 1 ) ) ); |
| | | sumStorageFeesForRentedWarehouses := sumStorageFeesForRentedWarehouses + cell.StorageFeesForRentedWarehouses(); |
| | | |
| | | // å¤ç§åºåºåºè´¹ç¨ï¼å卿ºäº§é / å
è£
容é[åä¸åæ´] * ææ¶åºåºåä»·ï¼ |
| | | engineProductions := sum( macroPlan, FPImportData, tempFPID, |
| | |
| | | tempFPID.StartDate().Month() = ccerc.StartDate().Month(), |
| | | tempFPID.Quantity() ); |
| | | cell.OutboundExpensesForRentedWarehouses( [Number] ( engineProductions / guard( lce.PackagingCapacity(), 1 ) ) * guard( lcmr.OutboundPrice(), 1 ) ); |
| | | sumOutboundExpensesForRentedWarehouses := sumOutboundExpensesForRentedWarehouses + cell.OutboundExpensesForRentedWarehouses(); |
| | | |
| | | // å¤ç§åºè¿è¾è´¹ç¨ï¼å卿ºè¿è¾é / å
è£
容é / è£
载容éï¼åä¸åæ´ï¼ * ææ¶è¿è¾åä»· |
| | | transportationQuantity := sum( macroPlan, Unit.Lane.LaneLeg.Trip.ProductInTrip, tempPIT, |
| | |
| | | ); |
| | | // info( "æ¶é´ï¼", ccerc.StartDate().Format( "Y-M2-D2" ), " è¿è¾æ°æ®ï¼", transportationQuantity, " è¿è¾åä»·ï¼", lct.TransportPrice() ); |
| | | cell.ExternalRentalWarehouseTransportationCosts( transportationQuantity / guard( lce.PackagingCapacity(), 1 ) / guard( lct.LoadingCapacity(), 1 ) * guard( lct.TransportPrice(), 1 ) ); |
| | | sumExternalRentalWarehouseTransportationCosts := sumExternalRentalWarehouseTransportationCosts + cell.ExternalRentalWarehouseTransportationCosts(); |
| | | |
| | | // å¤ç§åºä»å¨è´¹ç¨ï¼ææ¶æ»æ°é - å卿ºåºå / å
è£
容éï¼åä¸åæ´ï¼ï¼åä¹ä»¥ç©ºææ¶ä»å¨åä»·å¾å°ç©ºææ¶ä»å¨è´¹ç¨ãå卿ºåºååActual inventorieséåå°é¿æ¥å¤ç§åºè¯¥å卿ºçä»å¨éï¼ææ¶æ»æ°ééè¦æå¨ç»´æ¤ã |
| | | cell.UnitPriceOfEmptyShelfStorage( lcmr.StoragePrice() ); |
| | | cell.RentalWarehouseStorageFees( guard( ( cell.TotalQuantityOfMaterialRacks() - [Number]( plannedInventory / lce.PackagingCapacity() ) ) * lcmr.StoragePrice(), 0 ) ); |
| | | sumRentalWarehouseStorageFees := sumRentalWarehouseStorageFees + cell.RentalWarehouseStorageFees(); |
| | | |
| | | // æ¸
æ´è´¹ç¨ï¼å卿ºå
¥åºé / å
è£
容é * ææ¶æ¸
æ´åä»·ãå卿ºå
¥åºéåå卿ºééï¼å
è£
容éåèªå卿ºææ¬è¡¨ãææ¶æ¸
æ´åä»·åææ¶ææ¬è¡¨ã |
| | | cell.CleaningCost( engineSales / guard( lce.PackagingCapacity(), 1 ) * lcmr.CleanPrice() ); |
| | | sumCleaningCost := sumCleaningCost + cell.CleaningCost(); |
| | | |
| | | // é¢è®¡æ»è´¹ç¨ |
| | | cell.EstimatedTotalCost( cell.StorageFeesForRentedWarehouses() + |
| | | cell.OutboundExpensesForRentedWarehouses() + |
| | | cell.ExternalRentalWarehouseTransportationCosts() + |
| | | cell.RentalWarehouseStorageFees() + |
| | | cell.CleaningCost() |
| | | ); |
| | | sumEstimatedTotalCost := sumEstimatedTotalCost + cell.EstimatedTotalCost(); |
| | | |
| | | // ç³»æ° |
| | | cell.Coefficient( 1 ); |
| | | |
| | | // æ»è´¹ç¨ |
| | | cell.TotalCost( cell.EstimatedTotalCost() * cell.Coefficient() ); |
| | | sumTotalCost := sumTotalCost + cell.TotalCost(); |
| | | |
| | | cell.CC_EngineRackColumn( relset, ccerc ); |
| | | } |
| | | } |
| | | |
| | | // å建SUMè¡ |
| | | sumR := macroPlan.CC_EngineRackRow( relnew, Generation := "SUM", MLB_MQB := "", Index := 2 ); |
| | | traverse ( macroPlan, CC_EngineRackColumn, ccerc ) { |
| | | cell := sumR.CC_EngineRackCell( relnew ); |
| | | |
| | | cell.NumberOfEmptyShelves( sumNumberOfEmptyShelves ); |
| | | cell.StorageFeesForRentedWarehouses( sumStorageFeesForRentedWarehouses ); |
| | | cell.OutboundExpensesForRentedWarehouses( sumOutboundExpensesForRentedWarehouses ); |
| | | cell.ExternalRentalWarehouseTransportationCosts( sumExternalRentalWarehouseTransportationCosts ); |
| | | cell.RentalWarehouseStorageFees( sumRentalWarehouseStorageFees ); |
| | | cell.CleaningCost( sumCleaningCost ); |
| | | cell.EstimatedTotalCost( sumEstimatedTotalCost ); |
| | | cell.TotalCost( sumTotalCost ); |
| | | |
| | | cell.CC_EngineRackColumn( relset, ccerc ); |
| | | } |
| | | *] |
| | | } |