1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
| Quintiq file version 2.0
| #parent: #root
| Method VerifyUpdateSalesDemand (
| MacroPlan macroplan,
| Reals qtys,
| Booleans isexcludes
| )
| {
| Description: "Each test can update sales demands' quantity and isExclude from fulfillment KPIs."
| TextBody:
| [*
| isallupdated := false;
|
| for( i := 1; i <= qtys.Size(); i++ )
| {
| isallupdated := true;
| sd := select( macroplan, SalesDemand, s, s.ID() = this.GetTestSalesDemandID( i ) );
|
| if( not isnull( sd ) )
| {
| qty := qtys.Element( i - 1);
| isexclude := isexcludes.Element( i - 1 );
|
| sd.Update( sd.Product_MP(), sd.StockingPoint_MP(), sd.StartDate(), sd.EndDate(),
| qty, [Real]i, sd.PriorityName(), sd.DemandUncertaintyPercentage(),
| sd.SalesSegmentName(), sd.CurrencyID(), sd.UnitOfMeasureName(), isexclude, not sd.IsManuallyConfigured() );
|
| isallupdated := isallupdated and sd.Quantity() = qty;
| }
| }
|
| this.Run().AssertTrue( isallupdated, this.SetErrorInfo( 'Some sales demands has quantity not updated' ) );
| *]
| InterfaceProperties { Accessibility: 'Module' }
| }
|
|