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 
 |  StaticMethod ValidateInput ( 
 |    output String feedback_o, 
 |    Trip trip, 
 |    Product_MP product, 
 |    Real quantity, 
 |    output String sanitycheckfb_o 
 |  ) declarative remote as Boolean 
 |  { 
 |    Description: 'Validate input by user for product in trip, setting feedback and returning a boolean expression.' 
 |    TextBody: 
 |    [* 
 |      // desmondt May-18-2015 (created) 
 |       
 |      feedback_o := ''; 
 |       
 |      // Negative quantity 
 |      if( quantity < 0 ) 
 |      { 
 |        feedback_o := Translations::MP_ProductInTrip_ValidateInput_IsNegativeQuantity( quantity ); 
 |        sanitycheckfb_o := SanityCheckCategoryLevel::GetSanityCheckCategoryDataIssue(); 
 |      } 
 |       
 |      if( feedback_o <> '' ) 
 |      { 
 |        productname := MacroPlan::GetSubstituteName( guard( product.Name(), '' ) ); 
 |        legname := MacroPlan::GetSubstituteName( guard( trip.LaneLeg().Name(), '' ) ); 
 |        feedback_o := SanityCheckMessage::GetFormattedMessage( ProductInTrip::GetInstanceText( productname, legname, trip.Arrival().Date() ), 
 |                                                               feedback_o ); 
 |      } 
 |       
 |      return feedback_o = ''; 
 |    *] 
 |  } 
 |  
  |