| Quintiq file version 2.0 | 
| #parent: #root | 
| Method SetDefaultValueFromProductInStockingPointInPeriod ( | 
|   ProductInStockingPointInPeriod pispip | 
| ) id:Method_DialogCreateEditCustomerOrder_SetDefaultValueFromProductInStockingPointInPeriod | 
| { | 
|   #keys: '[142576.0.84643269]' | 
|   Body: | 
|   [* | 
|     // Set default values for creating sales demand from product planning context menu | 
|     data := Dialog.Data(); | 
|      | 
|     // Use PISPIP's start and end date | 
|     data.StartDate( pispip.Start().Date() ); | 
|     data.EndDate( pispip.End().Date() ); | 
|     data.Currency_MP( relset, MacroPlan.BaseCurrency() ); | 
|      | 
|     // Use default priority | 
|     priority := SalesDemandBase::GetDefaultPriority( MacroPlan ); | 
|     data.Priority( relset, priority ); | 
|      | 
|     // Use stocking point's UoM | 
|     uom := pispip.ProductInStockingPoint_MP().UnitOfMeasure_MP(); | 
|     data.UnitOfMeasure_MP( relset, uom ); | 
|   *] | 
| } |