From 6f15693d25602dda1f6765994c37c4c05ac23442 Mon Sep 17 00:00:00 2001 From: lihongji <3117313295@qq.com> Date: 星期六, 02 十一月 2024 18:29:18 +0800 Subject: [PATCH] BUG修复 --- _Main/BL/Type_MachineLogisticsCostReportCell/StaticMethod_CreateData.qbl | 39 ++++++++++++++++++++++++--------------- 1 files changed, 24 insertions(+), 15 deletions(-) diff --git a/_Main/BL/Type_MachineLogisticsCostReportCell/StaticMethod_CreateData.qbl b/_Main/BL/Type_MachineLogisticsCostReportCell/StaticMethod_CreateData.qbl index dac2ffe..8e153df 100644 --- a/_Main/BL/Type_MachineLogisticsCostReportCell/StaticMethod_CreateData.qbl +++ b/_Main/BL/Type_MachineLogisticsCostReportCell/StaticMethod_CreateData.qbl @@ -39,12 +39,12 @@ 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() + "绾胯竟搴�" ) ); - + // 褰撳墠鏈堟湯鏈�鍚庝竴澶╂棩鏈� lastDayOfThisMonth := mlcrc.StartDate().StartOfNextMonth() - 1; - + cell := mlcrr.MachineLogisticsCostReportCell( relnew ); - + // 璁剧疆鍖呰璐圭敤锛堝寘瑁呴噺 * 鍖呰鍗曚环锛� packageQuantity := sum( macroPlan, PackagingPlanRow.PackagingPlanCell, tempPPC, tempPPC.PackagingPlanRow().Category() = mlcrr.Category() and @@ -53,7 +53,7 @@ tempPPC.PackagingPlanColumn().StartDate().Month() = mlcrc.StartDate().Month(), tempPPC.Package() ); cell.PackingCharges( packageQuantity * guard( lcm.PackagePrice(), 1 ) ); - + // 璁剧疆鎷嗗寘璐圭敤锛堟媶鍖呴噺 * 鎷嗗寘鍗曚环锛� unpackingQuantity := sum( macroPlan, PackagingPlanRow.PackagingPlanCell, tempPPC, tempPPC.PackagingPlanRow().Category() = mlcrr.Category() and @@ -62,13 +62,13 @@ tempPPC.PackagingPlanColumn().StartDate().Month() = mlcrc.StartDate().Month(), tempPPC.Unpacking() ); cell.UnpackingCost( unpackingQuantity * guard( lcm.UnpackingPrice(), 1 ) ); - + // 璁剧疆缂撳啿绾歌垂鐢紙鍖呰绫� * 缂撳啿绾稿崟浠凤級 cell.BufferPaperCost( packageQuantity * guard( lcm.BufferPaperPrice(), 1 ) ); - + // 璁剧疆鏈ㄧ鍗曚环 cell.WoodenCratePriceReal( guard( lcm.WoodenCratePrice(), 1 ) ); - + // 璁剧疆璋冩嫧璐圭敤锛堣皟鎷ㄦ暟閲� / 鍖呰瀹归噺 / 瑁呰浇瀹归噺 * 杩愯緭鍗曚环锛� transferQuantity := sum( macroPlan, TransferPlanRow.TransferPlanCell, tempTPC, tempTPC.TransferPlanRow().Category() = mlcrr.Category() and @@ -77,13 +77,13 @@ guard( tempTPC.TransferPlanColumn().ColumnDate().Month() = mlcrc.StartDate().Month(), false ), [Number]tempTPC.Value() ); cell.TransferCost( [Number] ( [Number] ( transferQuantity / guard( lcm.PackagingCapacity(), 1 ) ) / guard( lct.LoadingCapacity(), 1 ) ) * guard( lct.TransportPrice(), 1 ) ); - + // 澶栫搴撳叆搴撹垂鐢紙鍏ュ簱閲廩鍖呰閲廬 / 鍖呰瀹归噺 * 鍏ュ簱鍗曚环锛� cell.StorageFeesForRentedWarehouses( packageQuantity / guard( lcm.PackagingCapacity(), 1 ) * guard( lcm.WarehousingPrice(), 1 ) ); - + // 澶栫搴撳嚭搴撹垂鐢紙鍑哄簱閲廩鎷嗗寘閲廬 / 鍖呰瀹归噺 * 鍑哄簱鍗曚环锛� cell.OutboundExpensesForRentedWarehouses( 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 @@ -102,9 +102,8 @@ tempPIT.Trip().LaneLeg().AsDestinationStockingPointLeg().StockingPoint_MP().ID() = ifexpr( mlcrr.Factory() = "澶ц繛宸ュ巶", "DL", "CC" ) + " " + mlcrr.Category() + "绾胯竟搴�", tempPIT.Quantity() ); - cell.ExternalRentalWarehouseTransportationCosts( 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 @@ -115,15 +114,25 @@ tempPISPIP.ProductInStockingPoint_MP().StockingPointID() = ifexpr( mlcrr.Factory() = "澶ц繛宸ュ巶", "DL", "CC" ) + " " + mlcrr.Category() + "澶栫搴�", tempPISPIP.PlannedInventoryLevelEnd() ); cell.RentalWarehouseStorageFees( 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( cell.EstimatedTotalCost() * cell.Coefficient() ); -- Gitblit v1.9.3