Changeset 15255 for main/kofacustom.dspg


Ignore:
Timestamp:
29 Nov 2018, 12:26:38 (6 years ago)
Author:
Henrik Bettermann
Message:

Add many new payment categories.

Location:
main/kofacustom.dspg/trunk/src/kofacustom/dspg
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/interfaces.py

    r15067 r15255  
    338338        )
    339339
     340    eng_1_fee = schema.Float(
     341        title = _(u'School of English Dues I'),
     342        default = 0.0,
     343        required = True,
     344        )
     345
     346    eng_2_fee = schema.Float(
     347        title = _(u'School of English Dues II'),
     348        default = 0.0,
     349        required = True,
     350        )
     351
     352    sbs_1_fee = schema.Float(
     353        title = _(u'SBS Pack I'),
     354        default = 0.0,
     355        required = True,
     356        )
     357
     358    sps_2_fee = schema.Float(
     359        title = _(u'SBS Pack I'),
     360        default = 0.0,
     361        required = True,
     362        )
     363
     364    bfn_fee = schema.Float(
     365        title = _(u'BFN Pack'),
     366        default = 0.0,
     367        required = True,
     368        )
     369
     370    mkt_fee = schema.Float(
     371        title = _(u'MKT Pack'),
     372        default = 0.0,
     373        required = True,
     374        )
     375
     376    mcn_fee = schema.Float(
     377        title = _(u'MCN Pack'),
     378        default = 0.0,
     379        required = True,
     380        )
     381
     382    otm_fee = schema.Float(
     383        title = _(u'OTM Pack'),
     384        default = 0.0,
     385        required = True,
     386        )
     387
     388    acct_fee = schema.Float(
     389        title = _(u'ACCT Pack'),
     390        default = 0.0,
     391        required = True,
     392        )
     393
     394    bam_fee = schema.Float(
     395        title = _(u'BAM Pack'),
     396        default = 0.0,
     397        required = True,
     398        )
     399
     400    pom_fee = schema.Float(
     401        title = _(u'POM Pack'),
     402        default = 0.0,
     403        required = True,
     404        )
     405
     406    hrm_fee = schema.Float(
     407        title = _(u'HRM Pack'),
     408        default = 0.0,
     409        required = True,
     410        )
     411
     412
    340413    def getSessionString():
    341414        """Returns the session string from the vocabulary.
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch/browser.py

    r15248 r15255  
    251251</item_details>
    252252</payment_item_detail>""" % xmldict
    253         # dep_sug payments are treated completely separately. The following lines
     253
     254
     255        # Some payments are treated completely separately. The following lines
    254256        # override the configuration above.
     257
    255258        if self.context.p_category == 'dep_sug':
    256259            self.pay_item_id = '102' # We use school fee item id
     
    270273</item_details>
    271274</payment_item_detail>""" % xmldict
     275
     276        if self.context.p_category == 'eng_1':
     277            self.pay_item_id = '118'
     278            xmltext = """<payment_item_detail>
     279<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     280<item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="8" acct_num="2024473077" />
     281</item_details>
     282</payment_item_detail>""" % xmldict
     283
     284        if self.context.p_category == 'eng_2':
     285            self.pay_item_id = '119'
     286            xmltext = """<payment_item_detail>
     287<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     288<item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="8" acct_num="2024473077" />
     289</item_details>
     290</payment_item_detail>""" % xmldict
     291
     292        if self.context.p_category == 'sbs_1':
     293            self.pay_item_id = '120'
     294            # amount_auth is being ignored. However, the sum of all split payments
     295            # must coincide with the amount_auth configured in students/utils.py
     296            xmldict['amt1'] = 100 * 800
     297            xmldict['amt2'] = 100 * 1000
     298            xmldict['amt3'] = 100 * 500
     299
     300            xmltext = """<payment_item_detail>
     301<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     302<item_detail item_id="1" item_name="SBS Dues I" item_amt="%(amt1)d" bank_id="11" acct_num="0010772626" />
     303<item_detail item_id="2" item_name="Journal fee" item_amt="%(amt2)d" bank_id="11" acct_num="0010772626" />
     304<item_detail item_id="3" item_name="ABSOBS" item_amt="%(amt3)d" bank_id="8" acct_num="2008185712" />
     305</item_details>
     306</payment_item_detail>""" % xmldict
     307
     308        if self.context.p_category == 'sbs_2':
     309            self.pay_item_id = '123'
     310            # amount_auth is being ignored. However, the sum of all split payments
     311            # must coincide with the amount_auth configured in students/utils.py
     312            xmldict['amt1'] = 100 * 300
     313            xmldict['amt2'] = 100 * 500
     314            xmltext = """<payment_item_detail>
     315<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     316<item_detail item_id="1" item_name="SBS Dues II" item_amt="%(amt1)d" bank_id="11" acct_num="0010772626" />
     317<item_detail item_id="2" item_name="ABSOBS" item_amt="%(amt2)d" bank_id="8" acct_num="2008185712" />
     318</item_details>
     319</payment_item_detail>""" % xmldict
     320
     321        if self.context.p_category == 'bfn':
     322            self.pay_item_id = '125'
     323            xmltext = """<payment_item_detail>
     324<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     325<item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="11" acct_num="0048039049" />
     326</item_details>
     327</payment_item_detail>""" % xmldict
     328
     329        if self.context.p_category == 'mkt':
     330            self.pay_item_id = '127'
     331            # amount_auth is being ignored. However, the sum of all split payments
     332            # must coincide with the amount_auth configured in students/utils.py
     333            xmldict['amt1'] = 100 * 500
     334            xmldict['amt2'] = 100 * 500
     335            xmltext = """<payment_item_detail>
     336<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     337<item_detail item_id="1" item_name="MKT Dues" item_amt="%(amt1)d" bank_id="11" acct_num="0048297823" />
     338<item_detail item_id="2" item_name="NAMS" item_amt="%(amt2)d" bank_id="8" acct_num="2032309812" />
     339</item_details>
     340</payment_item_detail>""" % xmldict
     341
     342        if self.context.p_category == 'mcn':
     343            self.pay_item_id = '129'
     344            # amount_auth is being ignored. However, the sum of all split payments
     345            # must coincide with the amount_auth configured in students/utils.py
     346            xmldict['amt1'] = 100 * 500
     347            xmldict['amt2'] = 100 * 500
     348            xmltext = """<payment_item_detail>
     349<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     350<item_detail item_id="1" item_name="MCN Dues" item_amt="%(amt1)d" bank_id="11" acct_num="0010789213" />
     351<item_detail item_id="2" item_name="AMCOS" item_amt="%(amt2)d" bank_id="8" acct_num="3020253234" />
     352</item_details>
     353</payment_item_detail>""" % xmldict
     354
     355        if self.context.p_category == 'otm':
     356            self.pay_item_id = '131'
     357            # amount_auth is being ignored. However, the sum of all split payments
     358            # must coincide with the amount_auth configured in students/utils.py
     359            xmldict['amt1'] = 100 * 500
     360            xmldict['amt2'] = 100 * 500
     361            xmltext = """<payment_item_detail>
     362<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     363<item_detail item_id="1" item_name="OTM Dues" item_amt="%(amt1)d" bank_id="8" acct_num="3068446702" />
     364<item_detail item_id="2" item_name="NAOTM" item_amt="%(amt2)d" bank_id="11" acct_num="0036652027" />
     365</item_details>
     366</payment_item_detail>""" % xmldict
     367
     368        if self.context.p_category == 'acct':
     369            self.pay_item_id = '134'
     370            # amount_auth is being ignored. However, the sum of all split payments
     371            # must coincide with the amount_auth configured in students/utils.py
     372            xmldict['amt1'] = 100 * 3000
     373            xmldict['amt2'] = 100 * 500
     374            xmldict['amt3'] = 100 * 500
     375            xmltext = """<payment_item_detail>
     376<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     377<item_detail item_id="1" item_name="Profession Accreditation" item_amt="%(amt1)d" bank_id="11" acct_num="0040285084" />
     378<item_detail item_id="2" item_name="ACCT Dues" item_amt="%(amt2)d" bank_id="11" acct_num="0036184955" />
     379<item_detail item_id="3" item_name="NAPAS" item_amt="%(amt3)d" bank_id="11" acct_num="2008498661" />
     380</item_details>
     381</payment_item_detail>""" % xmldict
     382
     383        if self.context.p_category == 'bam':
     384            self.pay_item_id = '136'
     385            # amount_auth is being ignored. However, the sum of all split payments
     386            # must coincide with the amount_auth configured in students/utils.py
     387            xmldict['amt1'] = 100 * 500
     388            xmldict['amt2'] = 100 * 500
     389            xmltext = """<payment_item_detail>
     390<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     391<item_detail item_id="1" item_name="BAM Dues" item_amt="%(amt1)d" bank_id="11" acct_num="0010788058" />
     392<item_detail item_id="2" item_name="NABAS" item_amt="%(amt2)d" bank_id="8" acct_num="2006936848" />
     393</item_details>
     394</payment_item_detail>""" % xmldict
     395
     396        if self.context.p_category == 'pom':
     397            self.pay_item_id = '138'
     398            # amount_auth is being ignored. However, the sum of all split payments
     399            # must coincide with the amount_auth configured in students/utils.py
     400            xmldict['amt1'] = 100 * 500
     401            xmldict['amt2'] = 100 * 500
     402            xmltext = """<payment_item_detail>
     403<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     404<item_detail item_id="1" item_name="POM Dues" item_amt="%(amt1)d" bank_id="11" acct_num="0096851444" />
     405<item_detail item_id="2" item_name="NAMS" item_amt="%(amt2)d" bank_id="8" acct_num="2033423003" />
     406</item_details>
     407</payment_item_detail>""" % xmldict
     408
     409        if self.context.p_category == 'hrm':
     410            self.pay_item_id = '140'
     411            # amount_auth is being ignored. However, the sum of all split payments
     412            # must coincide with the amount_auth configured in students/utils.py
     413            xmldict['amt1'] = 100 * 500
     414            xmldict['amt2'] = 100 * 500
     415            xmltext = """<payment_item_detail>
     416<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     417<item_detail item_id="1" item_name="HRM Dues" item_amt="%(amt1)d" bank_id="11" acct_num="0096858546" />
     418<item_detail item_id="2" item_name="NAMS" item_amt="%(amt2)d" bank_id="8" acct_num="2033423003" />
     419</item_details>
     420</payment_item_detail>""" % xmldict
     421
    272422
    273423        self.xml_data = """<input type="hidden" name="xml_data" value='%s'  />""" % xmltext
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch/tests.py

    r15215 r15255  
    203203        self.assertTrue('<item_detail item_id="2" item_name="School Fee 2" item_amt="1030000" bank_id="123" acct_num="1002883141" />'
    204204            in self.browser.contents)
    205         self.assertTrue('<item_detail item_id="3" item_name="BT Education" item_amt="280000" bank_id="8" acct_num="2028964403" />'
     205        self.assertTrue('<item_detail item_id="3" item_name="WAEAC" item_amt="280000" bank_id="8" acct_num="2028964403" />'
    206206            in self.browser.contents)
    207207        self.assertTrue('<item_detail item_id="4" item_name="Technology Fee" item_amt="120000" bank_id="307" acct_num="5100189030" />'
     
    376376        self.assertTrue('<item_detail item_id="2" item_name="Application 2" item_amt="10000" bank_id="123" acct_num="1002883141" />'
    377377            in self.browser.contents)
    378         self.assertTrue('<item_detail item_id="3" item_name="BT Education" item_amt="50000" bank_id="8" acct_num="2028964403" />'
     378        self.assertTrue('<item_detail item_id="3" item_name="WAEAC" item_amt="50000" bank_id="8" acct_num="2028964403" />'
    379379            in self.browser.contents)
    380380
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/utils.py

    r15222 r15255  
    204204            else:
    205205                return _(u'No bed allocated.'), None
    206         elif category == 'carryover1':
    207             amount = 10000.0
    208         elif category == 'carryover2':
    209             amount = 10000.0
    210         elif category == 'carryover3':
    211             amount = 10000.0
    212         elif category == 'carryover4':
    213             amount = 13000.0
    214206        elif category == 'dep_sug':
    215207            amount = 3150.0 # includes GATEWAY_AMT
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/utils/utils.py

    r15220 r15255  
    112112        'olevel_results_1': 'O Level Results Verification 1',
    113113        'olevel_results_2': 'O Level Results Verification 2',
     114        'eng_1':'School of English Dues I',
     115        'eng_2':'School of English Dues II',
     116        'sbs_1':'SBS Pack I',
     117        'sbs_2':'SBS Pack II',
     118        'bfn':'BFN Pack',
     119        'mkt':'MKT Pack',
     120        'mcn':'MCN Pack',
     121        'otm':'OTM Pack',
     122        'acct':'ACCT Pack',
     123        'bam':'BAM Pack',
     124        'pom':'POM Pack',
     125        'hrm':'HRM Pack',
    114126        }
    115127
     
    164176        'olevel_results_1': 'O Level Results Verification 1',
    165177        'olevel_results_2': 'O Level Results Verification 2',
     178        'eng_1':'School of English Dues I',
     179        'eng_2':'School of English Dues II',
     180        'sbs_1':'SBS Pack I',
     181        'sbs_2':'SBS Pack II',
     182        'bfn':'BFN Pack',
     183        'mkt':'MKT Pack',
     184        'mcn':'MCN Pack',
     185        'otm':'OTM Pack',
     186        'acct':'ACCT Pack',
     187        'bam':'BAM Pack',
     188        'pom':'POM Pack',
     189        'hrm':'HRM Pack',
    166190        }
    167191
Note: See TracChangeset for help on using the changeset viewer.