## Script (Python) "getSchoolFee"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=brain=None
##title=
##
# $Id: getSchoolFee.py 2194 2007-09-11 19:55:07Z henrik $
"""
return SchoolFee
"""

fee1 = ("ART",
        "SSC",
        "LAW",
        "EDU",
        )
session_fees = {'99': ('22200','23700'),
                '00': ('22200','23700'),
                '01': ('22200','23700'),
                '02': ('22200','23700'),
                '03': ('22200','23700'),
                '04': ('22200','23700'),
                '05': ('22200','23700'),
                '06': ('22200','23700'),
                }
pt_fees = {
            "DIF":{'description':"Diploma in French",'returning':"17700",'new':"32200"},
            "DTA":{'description':"Diploma in Theatre Arts",'returning':"19700",'new':"34200"},
            "DISD":{'description':"Diploma in International Studies",'returning':"27700",'new':"42200"},
            "DFA":{'description':"Diploma in Fine & Applied Arts",'returning':"19700",'new':"34200"},
            "DAE":{'description':"Diploma in Agric Econs",'returning':"25700",'new':"41700"},
            "DFS":{'description':"Diploma in Fishery, Forestry & Wildlife",'returning':"22700",'new':"38700"},
            "DAC":{'description':"Diploma in Agric Crop Science",'returning':"19700",'new':"35700"},
            "DFBS":{'description':"Diploma in Food & Brewering Science",'returning':"22700",'new':"38700"},
            "DIA":{'description':"Diploma in Accounting",'returning':"27700",'new':"42200"},
            "DBF":{'description':"Diploma in Banking & Finance",'returning':"27700",'new':"42200"},
            "DAIC":{'description':"Diploma in Applied Industrial Chemistry",'returning':"22700",'new':"38700"},
            "DAM":{'description':"Diploma in Applied Microbiology",'returning':"22700",'new':"38700"},
            "DIG":{'description':"Diploma in Geology",'returning':"25700",'new':"41700"},
            "DSLT":{'description':"Diploma in Science Lab Tech.",'returning':"25700",'new':"41700"},
            "DES":{'description':"Diploma in Environmental Science",'returning':"22700",'new':"38700"},
            "DICE":{'description':"Diploma in Computer Engineering",'returning':"27700",'new':"43700"},
            "DICHE":{'description':"Diploma in Chemical Engineering",'returning':"27700",'new':"43700"},
            "DDP":{'description':"Diploma in Data Processing",'returning':"27700",'new':"43700"},
            "DCG":{'description':"Diploma in Cartography",'returning':"19700",'new':"34200"},
            "DSW":{'description':"Diploma in Social Works",'returning':"25700",'new':"40200"},
            "DIL":{'description':"Diploma in Law",'returning':"27700",'new':"42200"},
            "DHT":{'description':"Diploma in Recreation, Hotel & Tourism Management",'returning':"27700",'new':"42200"},
            "DIE":{'description':"Diploma in Epidermiology",'returning':"27700",'new':"42200"},
            "CIE":{'description':"Certificate in Epidermiology",'returning':"21200",'new':"36200"},
            "CEHD":{'description':"Certificate in early Child Health & Development",'returning':"21200",'new':"36200"},
            "DLS":{'description':"Diploma in Library & Information Science",'returning':"24200",'new':"37200"},
            "BFA":{'description':"Bachelor in Fine & Applied Arts",'returning':"27700",'new':"42200"},
            "BTA":{'description':"Bachelor in Theatre Arts",'returning':"27700",'new':"42200"},
            "BEL":{'description':"Bachelor in English",'returning':"27700",'new':"42200"},
            "BFR":{'description':"Bachelor in French",'returning':"27700",'new':"42200"},
            "BISD":{'description':"Bachelor in International Studies & Diplomacy",'returning':"27700",'new':"42200"},
            "BAE":{'description':"Bachelor in Agric Econs",'returning':"32700",'new':"48700"},
            "BAN":{'description':"Bachelor in Animal Science",'returning':"27700",'new':"43700"},
            "BAC":{'description':"Bachelor in Crop Science",'returning':"27700",'new':"43700"},
            "BAS":{'description':"Bachelor in Soil Science",'returning':"27700",'new':"43700"},
            "BIA":{'description':"Bachelor in Accounting",'returning':"32700",'new':"47200"},
            "BBF":{'description':"Bachelor in Banking & Finance",'returning':"32700",'new':"47200"},
            "BLG":{'description':"Bachelor in Local Govt. Admin.",'returning':"22700",'new':"37200"},
            "BPA":{'description':"Bachelor in Public Admin.",'returning':"32700",'new':"47200"},
            "BSW":{'description':"Bachelor in Social Works",'returning':"27700",'new':"42200"},
            "BES":{'description':"Bachelor in Environmental Science",'returning':"27700",'new':"43700"},
            "BSLT":{'description':"Bachelor in Science Lab. Tech.",'returning':"27700",'new':"43700"},
            "BIP":{'description':"Bachelor in Industrial Physics",'returning':"27700",'new':"43700"},
            "BSCS":{'description':"Bachelor in Statistics & Computer",'returning':"29700",'new':"45700"},
            "BEEL":{'description':"Bachelor in Electronic & Electrical Engineering",'returning':"32700",'new':"48700"},
            "BECV":{'description':"Bachelor in Civil Engineering",'returning':"32700",'new':"48700"},
            "BEMCH":{'description':"Bachelor in Mechanical Engineering",'returning':"32700",'new':"48700"},
            "BEPE":{'description':"Bachelor in Petroleum Engineering",'returning':"32700",'new':"48700"},
            "BESTR":{'description':"Bachelor in Structural Engineering",'returning':"32700",'new':"48700"},
            "BECE":{'description':"Bachelor in Chemical Engineering",'returning':"32700",'new':"48700"},
            "BPRE":{'description':"Bachelor in Production Engineering",'returning':"32700",'new':"48700"},
            "LLBPT":{'description':"Bachelor in Law",'returning':"32700",'new':"48700"},
            "ODPT":{'description':"Doctor of Optometry",'returning':"42700",'new':"58700"},
            "PHARMD":{'description':"Doctor of Pharmacy",'returning':"44700",'new':"58700"},
            "CPA":{'description':"Certificate in Public Admin",'returning':"21200",'new':"35200"},
            "DHAM":{'description':"Diploma in Health Management",'returning':"24200",'new':"37200"},
            "DNAM":{'description':"Diploma in Nursing Admin & Management",'returning':"27200",'new':"40200"},
            "DPA":{'description':"Diploma in Public Admin",'returning':"27200",'new':"40200"},
            "DHS":{'description':"Diploma in Primary Health Care & Statistics",'returning':"27200",'new':"40200"},
            "ADHFM":{'description':"Advanced Diploma in Health Care Financing and Management",'returning':"29200",'new':"42200"},
            "DAE":{'description':"Diploma in Adult Education",'returning':"20200",'new':"33200"},
            "DME":{'description':"Diploma in Maths Education",'returning':"23200",'new':"36200"},
            "DPE":{'description':"Diploma in Physical Education",'returning':"23200",'new':"36200"},
            "DHE":{'description':"Diploma in Health Education",'returning':"23200",'new':"36200"},
            "DEC":{'description':"Diploma in Early Childhood Education",'returning':"20200",'new':"33200"},
            "DLS":{'description':"Diploma in Library & Information Science",'returning':"24200",'new':"37200"}
         }

#sessionstring = "School Fee for Session %s" % context.portal_vocabularies.sessions.get(session)
# sessionstring = "School Fee for Session %s" % context.sessions_voc(key=session)
# fee_1_data = ("22200",sessionstring)
# fee_2_data = ("23700",sessionstring)

# if faculty in fee1:
#     return fee_1_data
# return fee_2_data
d = {}
if brain.mode.endswith('_ft'):
    f = 1
    if brain.faculty in fee1:
        f = 0
    d['new'] = session_fees[brain.session][f]
    d['returning'] = 'not set'
    d['description'] = "School Fee for Session %s" % context.sessions_voc(key=brain.session)
if pt_fees.has_key(brain.course):
    d = pt_fees[brain.course]
    d['description'] = "School Fee for Session %s, %s" % (context.sessions_voc(key=brain.session),
                                                         d['description'])
return d

