Quintiq file version 2.0
|
#parent: #root
|
Function CalcBaseCost
|
{
|
TextBody:
|
[*
|
// Calculate BaseCost and BaseCostWithinKPIHorizon
|
cost := 0.0;
|
costwithinhorizon := 0.0;
|
|
// Calculate costs depending on what the cost driver is, i.e.fixed
|
if( this.CostDriver() = Translations::MP_AccountAssignmentCostDriverFixed() )
|
{
|
accountcost := this.GetAccountCost();
|
this.GetBaseFixedCost( cost, costwithinhorizon, accountcost );
|
}
|
|
// or Staffing
|
else if( this.CostDriver() = Translations::MP_AccountAssignmentCostDriverStaffing() )
|
{
|
accountcost := this.GetAccountCost();
|
this.GetBaseCostForStaffing( cost, costwithinhorizon, accountcost );
|
}
|
// or NrOfUnits
|
else if( this.CostDriver() = Translations::MP_AccountAssignmentCostDriverNrOfUnits() )
|
{
|
accountcost := this.GetAccountCost();
|
this.GetBaseCostForNumberOfUnits( cost, costwithinhorizon, accountcost );
|
}
|
// or Volume
|
else if( this.CostDriver() = Translations::MP_AccountAssignmentCostDriverVolume() )
|
{
|
this.GetBaseCostForVolume( cost, costwithinhorizon );
|
}
|
// or Time
|
else if( this.CostDriver() = Translations::MP_AccountAssignmentCostDriverTime() )
|
{
|
this.GetBaseCostForTime( cost, costwithinhorizon );
|
}
|
// or Lot
|
else if( this.CostDriver() = Translations::MP_AccountAssignmentCostDriverLot() )
|
{
|
this.GetBaseCostForLot( cost, costwithinhorizon );
|
}
|
// or Changeover
|
else if( this.CostDriver() = Translations::MP_AccountAssignmentCostDriverChangeover() )
|
{
|
this.GetBaseCostForChangeover( cost, costwithinhorizon );
|
}
|
// or One-time cost
|
else if( this.CostDriver() = Translations::MP_AccountAssignmentCostDriverOneTime() )
|
{
|
this.GetBaseCostForOneTimeCost( cost, costwithinhorizon );
|
}
|
|
this.BaseCost( cost );
|
this.BaseCostWithinKPIHorizon( costwithinhorizon );
|
*]
|
}
|