FORMAT==100
FEEDSTRINGS;
SKIPCHECK;

#******************************************************
# Check if rules apply to this scenario
#******************************************************
#[]=N:
#  IF(ATTRS('Version', !Version, 'Link to Drivers') @= 'Y',
#    CONTINUE,
#    STET
#  );

#********************************************
# Stets
#********************************************
['Actual']=STET;
['2006']=STET;
['2007']=STET;
['2008']=STET;

['Local','Annual Salary', {'HONG KONG','SINGAPORE'}]=N:
  IF(DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Position Grade') @= '',
    STET,
    DB('LabourAssumptions',!Currency,!Version,!FiscalYear,
    DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Position Grade'),
    !Region,
    'Std Annual Salary')
  );

['Local','Annual Salary']=N:
  IF(DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Position Grade') @= '',
    STET,
    DB('LabourAssumptions',!Currency,!Version,!FiscalYear,
    DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Position Grade'),
    ELPAR('Region',!Region,1),
    'Std Annual Salary')
  );


['Local','Monthly Salary']=N:
  ['Annual Salary']\12;

FEEDERS;

#********************************************
# INTERNAL FEEDERS
#********************************************
['Local','Region']=>
  ['Local','Annual Salary'];

['Local','Region']=>
  ['Local','Monthly Salary'];

#********************************************
# EXTERNAL FEEDERS
# LabourNewCosts Cube
#********************************************
['Local','FTE']=>
  DB('LabourNewCosts',!Currency,!Version,!FiscalYear,'Total Year',
  DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Department'),
  !Region,
  !Item,'FTE');

['Local','FTE']=>
  DB('LabourNewCosts',!Currency,!Version,!FiscalYear,'Total Year',
  DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Department'),
  !Region,
  !Item,'Monthly Salary');

['Local','FTE']=>
  DB('LabourNewCosts',!Currency,!Version,!FiscalYear,'Total Year',
  DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Department'),
  !Region,
  !Item,'Monthly Salary After Inc');

['Local','FTE']=>
  DB('LabourNewCosts',!Currency,!Version,!FiscalYear,'Total Year',
  DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Department'),
  !Region,
  !Item,'Superannuation');

['Local','FTE']=>
  DB('LabourNewCosts',!Currency,!Version,!FiscalYear,'Total Year',
  DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Department'),
  !Region,
  !Item,'Workcover');

['Local','FTE']=>
  DB('LabourNewCosts',!Currency,!Version,!FiscalYear,'Total Year',
  DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Department'),
  !Region,
  !Item,'LSL');

['Local','FTE']=>
  DB('LabourNewCosts',!Currency,!Version,!FiscalYear,'Total Year',
  DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Department'),
  !Region,  !Item,'Payroll Tax');

['Local','FTE']=>
  DB('LabourNewCosts',!Currency,!Version,!FiscalYear,'Total Year',
  DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Department'),
  !Region,
  !Item,'Other');

['Local','FTE']=>
  DB('LabourNewCosts',!Currency,!Version,!FiscalYear,'Total Year',
  DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Department'),
  !Region,
  !Item,'Communication Costs');

['Local','FTE']=>
  DB('LabourNewCosts',!Currency,!Version,!FiscalYear,'Total Year',
  DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Department'),
  !Region,
  !Item,'Motor Vehicle Costs');

['Local','FTE']=>
  DB('LabourNewCosts',!Currency,!Version,!FiscalYear,'Total Year',
  DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Department'),
  !Region,
  !Item,'Staff Expenses');

#********************************************
# EXTERNAL FEEDERS
# LabourTotalCosts Cube
#********************************************
['Local','FTE']=>
  DB('LabourTotalCosts',!Currency,!Version,!FiscalYear,'Total Year',
  DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Department'),
  !Region,  'New FTEs');

['Local','FTE']=>
  DB('LabourTotalCosts',!Currency,!Version,!FiscalYear,'Total Year',
  DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Department'),
  !Region,
  'Planned Salaries');

['Local','FTE']=>
  DB('LabourTotalCosts',!Currency,!Version,!FiscalYear,'Total Year',
  DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Department'),
  !Region,
  'Superannuation');

['Local','FTE']=>
  DB('LabourTotalCosts',!Currency,!Version,!FiscalYear,'Total Year',
  DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Department'),
  !Region,
  'Workcover');

['Local','FTE']=>
  DB('LabourTotalCosts',!Currency,!Version,!FiscalYear,'Total Year',
  DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Department'),
  !Region,
  'LSL');

['Local','FTE']=>
  DB('LabourTotalCosts',!Currency,!Version,!FiscalYear,'Total Year',
  DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Department'),
  !Region,  'Payroll Tax');

['Local','FTE']=>
  DB('LabourTotalCosts',!Currency,!Version,!FiscalYear,'Total Year',
  DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Department'),
  !Region,
  'Other');

['Local','FTE']=>
  DB('LabourTotalCosts',!Currency,!Version,!FiscalYear,'Total Year',
  DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Department'),
  !Region,
  'Communication Costs');

['Local','FTE']=>
  DB('LabourTotalCosts',!Currency,!Version,!FiscalYear,'Total Year',
  DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Department'),
  !Region,
  'Motor Vehicle Costs');

['Local','FTE']=>
  DB('LabourTotalCosts',!Currency,!Version,!FiscalYear,'Total Year',
  DB('LabourNewInputs',!Currency,!Version,!FiscalYear,!Region,!Item,'Department'),
  !Region,
  'Staff Expenses');

