hongji.li
2023-11-03 aefafd2142478d4fb07d6b8b45c3047e247389e0
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 GetHasConformInputLotSizingRequirement (
  output Strings feedback_o,
  output Strings sanitycheckfeedback_o
) declarative remote as Boolean
{
  Description: 'Returns true if the (Operation only) DependentDemand quantity is an integer multiple of input lot size. For sanity check.'
  TextBody:
  [*
    isvalid := this.GetHasConformInputLotSizingRequirement();
    
    if( not isnull( feedback_o ) and  not isvalid )
    {
      gp := this.PeriodTask_MP().MacroPlan().GlobalParameters_MP();
      instance := Translations::MP_Demand_Instance( this, this.GetPISPName(), this.GetPISPIPStart() );
      message := Translations::MP_DependentDemand_ViolateInputLotSize( this, gp.NumberOfDecimals() );
      feedback_o.Add( SanityCheckMessage::GetFormattedMessage( instance, message ) );
      sanitycheckfeedback_o.Add( SanityCheckCategoryLevel::GetSanityCheckCategoryPlanningIssue() );
    }
    
    return isvalid
  *]
}