| 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
 | | Quintiq file version 2.0 |  | #parent: #root |  | Method VerifyTransportPlannedValue ( |  |   Account_MP account, |  |   String accountCostName, |  |   LaneLeg laneleg, |  |   DateTime startDate, |  |   DateTime endDate, |  |   Real lotSize, |  |   Real lotCost |  | ) |  | { |  |   Description: 'Verify correct calculated lot cost for transportation account' |  |   TextBody: |  |   [* |  |     accountCost := select( account, AccountCost, ac, ac.DisplayName() = accountCostName ); |  |      |  |     actualCost := 0.0; |  |     traverse( laneleg, Trip, t, t.Departure() >= startDate and t.Arrival() <= endDate ) |  |     { |  |       actualCost := actualCost + ( t.Load() / lotSize ) * lotCost; |  |     } |  |      |  |     expectedCost := 0.0; |  |     traverse( laneleg, Lane.Unit.PlanningUnitPeriod.Period_MP, period ) |  |     { |  |       expectedCost := expectedCost + accountCost.GetActualCosts( period ); |  |     } |  |      |  |     this.Run().AssertEqual( expectedCost, actualCost, 'Transportation lot cost does not match the cost in the account' ); |  |   *] |  |   InterfaceProperties { Accessibility: 'Module' } |  | } | 
 |