yanweiyuan3
2023-08-09 588bc7829387dfc761cc25f06f77d4c81818bd10
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
Quintiq file version 2.0
#parent: #root
Method GetHasAllowedCostDriver (
  output Strings feedback_o,
  output Strings sanitycheckfb
) declarative remote as Boolean
{
  Description:
  [*
    For product value and cost, returns true if the cost driver of this account cost is valid based on the KT.
    Since we cannot do the check in AccountAssignment because ProductValueAndCost do not have account assignment,
    The check is implemented here.
  *]
  TextBody:
  [*
    // soh yee Jan-2-2014 (created)
    
    valid := this.HasAllowedCostDriver();
    
    if( not isnull( feedback_o ) and not valid )
    {
      feedback_o.Add( SanityCheckMessage::GetFormattedMessage( this.GetInstanceText(),
                                                               Translations::MP_AccountAssignment_ViolateHasValidCostDriver( this.CostDriver() ) ) );
      sanitycheckfb.Add( SanityCheckCategoryLevel::GetSanityCheckCategoryDataIssue() );                                                           
    }
    
    return valid;
  *]
}