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
| Quintiq file version 2.0
| #parent: #root
| Method CreatePeriodTaskOperation (
| Period_MP period,
| ProductInStockingPoint_MP productinstockingpoint,
| Operation operation,
| Real quantity
| ) as PeriodTaskOperation
| {
| TextBody:
| [*
| periodtaskoperation := null( PeriodTaskOperation );
|
| if( this.Run().AssertNotIsNull( productinstockingpoint, "Product in stockingpoint is null!" ) )
| {
| pispip := select( productinstockingpoint, ProductInStockingPointInPeriod, p,
| p.Period_MP() = period );
|
| if( this.Run().AssertNotIsNull( pispip, "Product in stocking point in period is null!" ) )
| {
| pispip.CreateUpdateOperationNewSupplies( operation, quantity );
| periodtaskoperation := select( operation, PeriodTask_MP.astype( PeriodTaskOperation ), pto, pto.UserQuantity() <> 0 );
| }
| }
|
| return periodtaskoperation;
| *]
| InterfaceProperties { Accessibility: 'Module' }
| }
|
|