Quintiq file version 2.0
|
#parent: #root
|
StaticMethod CanBePegged (
|
output String feedback_o,
|
Supply_MP supply,
|
Demand_MP demand
|
) declarative remote as Boolean
|
{
|
Description: 'Validate the creation of fulfillment, called from designer'
|
TextBody:
|
[*
|
// boon kiat Jul-31-2013 (created)
|
|
feedback_o := '';
|
|
if( supply.ProductInStockingPointInPeriodPlanning().ProductInStockingPoint_MP() <> demand.GetPISPIP().ProductInStockingPoint_MP() )
|
{
|
feedback_o := Translations::MP_Fulfillment_CanBePegged_InvalidProductInStockingPoint();
|
}
|
else if( supply.GetPeriodStart() > demand.GetPeriodStart() )
|
{
|
feedback_o := Translations::MP_Fulfillment_CanBePegged_InvalidPeriod();
|
}
|
else if( supply.GetAvailableQuantityForPegging() <= 0 )
|
{
|
feedback_o := Translations::MP_Fulfillment_CanBePegged_IsAvailableQuantityGreaterThanZero();
|
}
|
|
return feedback_o = '';
|
*]
|
}
|