Quintiq file version 2.0
|
#parent: #root
|
Method SetSalesDemandQuantity (
|
MacroPlan macroplan,
|
String salesDemandInfo
|
)
|
{
|
TextBody:
|
[*
|
// Get sales demand, adjust quantity
|
traverse( salesDemandInfo.Tokenize( String::NewLine() ), Elements, sdinfo )
|
{
|
|
sd := sdinfo.Tokenize( ',' );
|
product := sd.Element( 0 ).TrimBoth();
|
stockingPoint := sd.Element( 1 ).TrimBoth();
|
salesSegment := sd.Element( 2 ).TrimBoth();
|
start := this.ConvertToDateTime( sd.Element( 3 ), macroplan );
|
qty := this.ConvertToReal( sd.Element( 4 ) );
|
demand := select( macroplan, SalesDemand, e, e.ProductID() = product
|
and e.StockingPointID() = stockingPoint
|
and e.SalesSegmentName() = salesSegment
|
and e.StartDate() = start.Date() );
|
demand.Update( demand.Product_MP(), demand.StockingPoint_MP(), demand.StartDate(), demand.EndDate(), qty, demand.Price(), demand.Priority(), demand.DemandUncertaintyPercentage(), demand.SalesSegment_MP(), demand.Currency_MP(), demand.UnitOfMeasure_MP(), demand.IsExcludedFromFulfillmentKPI(), false );
|
}
|
*]
|
InterfaceProperties { Accessibility: 'Module' }
|
}
|