From e528264b38b96ad2f59ba9d7ab5d5b17385cb777 Mon Sep 17 00:00:00 2001 From: Administrator <renhui.hao@capgemini.com> Date: 星期日, 24 九月 2023 18:58:45 +0800 Subject: [PATCH] Merge remote-tracking branch 'refs/remotes/origin/dev' --- _Main/BL/Type_CustomerOrder/StaticMethod_CreateOrUpdate.qbl | 31 ++++++++++++++++++++++++++++--- 1 files changed, 28 insertions(+), 3 deletions(-) diff --git a/_Main/BL/Type_CustomerOrder/StaticMethod_CreateOrUpdate.qbl b/_Main/BL/Type_CustomerOrder/StaticMethod_CreateOrUpdate.qbl index e885859..3ec5f41 100644 --- a/_Main/BL/Type_CustomerOrder/StaticMethod_CreateOrUpdate.qbl +++ b/_Main/BL/Type_CustomerOrder/StaticMethod_CreateOrUpdate.qbl @@ -62,9 +62,34 @@ priorityName, salesSegmentName, currencyId, unitOfMeasureName, false, customerName, customerId, orderId, orderLineId, true, true, true ); } else { - result.Update( product, stockingPoint, orderDate, quantity, price, - priorityName, salesSegmentName, currencyId, unitOfMeasureName, - false, customerName, customerId, orderId, orderLineId, true, true, true ); + if( result.ProductID() = productId + and result.StockingPointID() = stockingPointId + and result.StartDate() = orderDate + and result.Quantity() = quantity + and result.Price() = price + and result.PriorityName() = priorityName + and result.SalesSegmentName() = salesSegmentName + and result.CurrencyID() = currencyId + and result.UnitOfMeasureName() = unitOfMeasureName + and result.CustomerName() = customerName + and result.CustomerID() = customerId + and result.OrderID() = orderId + and result.OrderLineID() = orderLineId ){ + info( "No need to update this order: " + id ); + }else{ + if( result.IsLocked() = true ){ + pispips := selectset( result, ProductInStockingPoint_MP.ProductInStockingPointInPeriod, pispip, true ); + pispipLeafs := selectset( pispips, + Elements.astype( ProductInStockingPointInPeriodPlanningLeaf ), + pispip, + true ); + ProductInStockingPointInPeriod::LockUnlockPlanning( pispipLeafs, false, true ); + } + result.Update( product, stockingPoint, orderDate, quantity, price, + priorityName, salesSegmentName, currencyId, unitOfMeasureName, + false, customerName, customerId, orderId, orderLineId, true, true, true ); + result.IsLocked( false ); + } } return result; *] -- Gitblit v1.9.3