|  |  | 
 |  |  |                                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; | 
 |  |  |   *] |