| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 | | Quintiq file version 2.0 |  | #parent: #root |  | Method GetRequiredLot ( |  |   Real quantity |  | ) declarative remote as Number |  | { |  |   Description: 'Return the lot required for passed in quantity if there is lot size defined for the trip' |  |   TextBody: |  |   [* |  |     // soh yee Jun-9-2015 (created) |  |      |  |     value := 0; |  |      |  |     if( this.HasLotSize() ) |  |     { |  |       /* Ceil the lot used |  |          e.g: UnfulfilledQuantity = 512, LotSize = 10, 512 / 10 = 51.2 ceil -> 52 |  |          52 lot will be take into capacity calculation instead of 51 */ |  |       value := ceil( quantity / this.LotSize() ); |  |     } |  |      |  |     return value; |  |   *] |  | } | 
 |