FORMAT==100
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;

['6410 Airfare']=N:
  IF(ATTRS('Period', !Period, 'Description') @= DB('TravelPlans',!Currency,!Version,!FiscalYear,!Department,!Region,!TripList,'Month of Trip'),
    DB('TravelPlans',!Currency,!Version,!FiscalYear,!Department,!Region,!TripList,'6410 Airfare'),
    0
  );

['6407 Lodging']=N:
  IF(ATTRS('Period', !Period, 'Description') @= DB('TravelPlans',!Currency,!Version,!FiscalYear,!Department,!Region,!TripList,'Month of Trip'),
    DB('TravelPlans',!Currency,!Version,!FiscalYear,!Department,!Region,!TripList,'6407 Lodging'),
    0
  );

['6402 Transportation']=N:
  IF(ATTRS('Period', !Period, 'Description') @= DB('TravelPlans',!Currency,!Version,!FiscalYear,!Department,!Region,!TripList,'Month of Trip'),
    DB('TravelPlans',!Currency,!Version,!FiscalYear,!Department,!Region,!TripList,'6402 Transportation'),
    0
  );

['6405 Meals']=N:
  IF(ATTRS('Period', !Period, 'Description') @= DB('TravelPlans',!Currency,!Version,!FiscalYear,!Department,!Region,!TripList,'Month of Trip'),
    DB('TravelPlans',!Currency,!Version,!FiscalYear,!Department,!Region,!TripList,'6405 Meals'),
    0
  );

['6406 Entertainment']=N:
  IF(ATTRS('Period', !Period, 'Description') @= DB('TravelPlans',!Currency,!Version,!FiscalYear,!Department,!Region,!TripList,'Month of Trip'),
    DB('TravelPlans',!Currency,!Version,!FiscalYear,!Department,!Region,!TripList,'6406 Entertainment'),
    0
  );

['6409 Mileage Exp']=N:
  IF(ATTRS('Period', !Period, 'Description') @= DB('TravelPlans',!Currency,!Version,!FiscalYear,!Department,!Region,!TripList,'Month of Trip'),
    DB('TravelPlans',!Currency,!Version,!FiscalYear,!Department,!Region,!TripList,'6409 Mileage Exp'),
    0
  );

FEEDERS;

#*******************************************************
# EXTERNAL FEEDERS - GL
#*******************************************************
['Local','Budget Entry','All Trips','6407 Lodging']=>
    DB('GL',!Currency,!Version,!FiscalYear,!Period,!Department,!Region,'6407','Amount');

['Local','Budget Entry','All Trips','6402 Transportation']=>
    DB('GL',!Currency,!Version,!FiscalYear,!Period,!Department,!Region,'6402','Amount');

['Local','Budget Entry','All Trips','6405 Meals']=>
    DB('GL',!Currency,!Version,!FiscalYear,!Period,!Department,!Region,'6405','Amount');

['Local','Budget Entry','All Trips','6406 Entertainment']=>
    DB('GL',!Currency,!Version,!FiscalYear,!Period,!Department,!Region,'6406 ','Amount');

['Local','Budget Entry','All Trips','6409 Mileage Exp']=>
    DB('GL',!Currency,!Version,!FiscalYear,!Period,!Department,!Region,'6409 ','Amount');

['Local','Budget Entry','All Trips','6410 Airfare']=>
    DB('GL',!Currency,!Version,!FiscalYear,!Period,!Department,!Region,'6410','Amount');
