Quintiq file version 2.0 #parent: #root Method UpdateUOMAndCurrencyBasedOnPISP () id:Method_DialogCreateEditCustomerOrder_UpdateUOMAndCurrencyBasedOnPISP { #keys: '[142576.0.84643275]' Body: [* // When user changes the selection of product or stocking point, // we update the UOM based on their selection PISP, if no such // PISP can be found, we just make the UOM the default one product := SelectionProduct.Data() sp := guard( SelectionStockingPoint.Data(), null( StockingPoint_MP ) ) uom := MacroPlan.DefaultUnitOfMeasure(); if( not isnull( product ) ) { pisp := select( product, ProductInStockingPoint_MP, e, e.StockingPoint_MP() = sp ) uom := guard( pisp.UnitOfMeasure_MP(), uom ) } SelectionUnitOfMeasure.Data( uom ); Dialog.SetCurrencyAndUOMForLabels(); *] }