From 7e72a43c063c1c7728be80db4e7bf0f493eecacc Mon Sep 17 00:00:00 2001 From: yy <yuan.yan@capgemini.com> Date: 星期一, 25 九月 2023 15:49:26 +0800 Subject: [PATCH] Merge branch '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 275bdf2..e428bb7 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