From e39194248bc3502665d3d802cc07a01c0be8675d Mon Sep 17 00:00:00 2001
From: hongjli <3117313295@qq.com>
Date: 星期二, 26 九月 2023 16:55:42 +0800
Subject: [PATCH] bug fix

---
 _Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration2.qbl |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration2.qbl b/_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration2.qbl
index 3f70ca5..c4dcdf4 100644
--- a/_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration2.qbl
+++ b/_Main/BL/Type_CapacityAllocationResults/StaticMethod_IterativeGeneration2.qbl
@@ -25,6 +25,9 @@
           PeriodTaskOperation as pto : {
             info( "Operation鍛ㄦ湡浠诲姟..." );     
             traverse ( ns, PeriodTask_MP.astype( PeriodTaskOperation ).DependentDemand, dd ) {
+              if ( numberOfLayers = 1 ) {
+                currentLayerDependentDemandQuantity := ns.Quantity();
+              }
               currentLayerDependentDemandQuantity := currentLayerDependentDemandQuantity                     * 
                                                      ns.ProcessOutput().astype( OperationOutput ).Quantity() *
                                                      dd.ProcessInput().astype( OperationInput ).Quantity();
@@ -58,7 +61,7 @@
                                                         Description           := "",
                                                         ID                    := OS::GenerateGUIDAsString(),
                                                         ProductID             := ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID(),
-                                                        StockingPointID       := "",
+                                                        StockingPointID       := ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().StockingPointID(),
                                                         UserQuantity          := currentLayerDependentDemandQuantity,
                                                         ManufacturedDate      := Date::MinDate()
                                                        );

--
Gitblit v1.9.3