| 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
 | | Quintiq file version 2.0 |  | #parent: #root |  | StaticMethod ValidateInput ( |  |   output String feedback_o, |  |   LaneLegCosts laneLegCosts, |  |   LaneLegs owners, |  |   Account_MP account, |  |   String costDriver, |  |   Date start, |  |   String timeUnit, |  |   Number lengthOfTime, |  |   Real cost, |  |   StockingPoint_MP origin, |  |   StockingPoint_MP destination |  | ) declarative remote as Boolean |  | { |  |   TextBody: |  |   [* |  |     // Validate input 1.check valid input 2.check uniqueness |  |     sanityfb := ''; |  |     isValid := true; |  |      |  |     // Batch/single create/edit only need the value, thus account cost is n/a |  |     isValid := AccountCost::ValidateInput( feedback_o, |  |                                            sanityfb, |  |                                            account, |  |                                            costDriver, |  |                                            start, |  |                                            timeUnit, |  |                                            lengthOfTime, |  |                                            cost, |  |                                            null( AccountCost ) ); // Separate uniqueness checking below for both create & edit |  |      |  |      |  |     if( isValid ) |  |     { |  |       if( origin = destination ) |  |       { |  |         feedback_o := Translations::MP_LaneLeg_ViolateHasSameOriginAndDesination(); |  |       } |  |       else |  |       { |  |         // Check unique cost then display customized tooltip in WC |  |         LaneLegCost::GetIsUniqueCost( feedback_o, laneLegCosts, owners, guard( account.Name(), '' ), costDriver, start ); |  |       } |  |     } |  |     return feedback_o=''; |  |   *] |  | } | 
 |