Quintiq file version 2.0
|
#parent: #root
|
StaticMethod ValidateDefaultInventoryHoldingCosts (
|
output String feedback_o,
|
output String sanitycheckfeedback_o,
|
MacroPlan macroplan,
|
String defaultAccountForInventoryValue,
|
Boolean hasabsolutecostforinventoryholding,
|
Real defaultabsolutecostforinventoryholding,
|
Real defaultannualinterestrateforinventoryholding
|
) declarative remote as Boolean
|
{
|
TextBody:
|
[*
|
// Validate default inventory holding cost
|
if( defaultAccountForInventoryValue = ''
|
or not exists( macroplan, Account_MP, acc, acc.Name() = defaultAccountForInventoryValue ) )
|
{
|
feedback_o := Translations::MP_GlobalParameters_MP_ValidateInput_IsInvalidAccount();
|
sanitycheckfeedback_o := SanityCheckCategoryLevel::GetSanityCheckCategoryDataIssue();
|
}
|
else if( hasabsolutecostforinventoryholding and defaultabsolutecostforinventoryholding <= 0 )
|
{
|
feedback_o := Translations::MP_GlobalParameters_MP_ValidateInput_IsInvalidAbsoluteCost( defaultabsolutecostforinventoryholding );
|
sanitycheckfeedback_o := SanityCheckCategoryLevel::GetSanityCheckCategoryDataIssue();
|
}
|
else if( not hasabsolutecostforinventoryholding and defaultannualinterestrateforinventoryholding <= 0 )
|
{
|
feedback_o := Translations::MP_GlobalParameters_MP_ValidateInput_IsInvalidAnnualInterestRate( defaultannualinterestrateforinventoryholding );
|
sanitycheckfeedback_o := SanityCheckCategoryLevel::GetSanityCheckCategoryDataIssue();
|
}
|
|
return feedback_o = '';
|
*]
|
}
|