Ignore:
Timestamp:
12 Feb 2025, 01:22:42 (40 hours ago)
Author:
Henrik Bettermann
Message:

Revise DESTINATION_COST. Keep old items.

Location:
main/waeup.uniben/trunk/src/waeup/uniben/applicants
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/interfaces.py

    r18007 r18014  
    117117DESTINATION_COST = {
    118118    #'none': ('To the moon', 1000000000.0, 1),
    119     'nigeria': ('Local (Within Nigeria)', 25000.0, 1),
    120     #'africa': ('Within Africa ', 30000.0, 2),
    121     'inter': ('International', 35000.0, 3),
    122     #'cert_nigeria': ('Certified Copy - Within Nigeria', 13000.0, 4),
    123     #'cert_africa': ('Certified Copy - Within Africa', 23000.0, 5),
    124     #'cert_inter': ('Certified Copy - International', 28000.0, 6),
     119    'nigeria': ('Within Nigeria (deprecated)', 20000.0, 1),
     120    'africa': ('Within Africa (deprecated)', 30000.0, 2),
     121    'inter': ('International (deprecated)', 35000.0, 3),
     122    'cert_nigeria': ('Certified Copy - Within Nigeria (deprecated)', 13000.0, 4),
     123    'cert_africa': ('Certified Copy - Within Africa (deprecated)', 23000.0, 5),
     124    'cert_inter': ('Certified Copy - International (deprecated)', 28000.0, 6),
     125    'nigeria2': ('Local (Within Nigeria)', 25000.0, 1),
     126    'inter2': ('International', 35000.0, 3),
    125127    }
    126128
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/tests/test_browser.py

    r18008 r18014  
    352352        applicant_url = self.browser.url
    353353        self.browser.getControl("Create and make online").click()
     354        self.assertTrue('This fee is outdated' in self.browser.contents)
     355        self.browser.getLink("Application record").click()
     356        self.browser.getControl(name="form.charge").value = ['nigeria2']
     357        self.browser.getControl("Save").click()
     358        self.browser.getControl("Create and make online").click()
    354359        self.assertTrue('Payment ticket created' in self.browser.contents)
    355360        self.assertTrue('<span>50000.0</span>' in self.browser.contents)
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/utils.py

    r17964 r18014  
    138138            if not applicant.charge:
    139139                return _(u'No transcript charge selected.')
     140            if 'deprecated' in DESTINATION_COST[applicant.charge][0]:
     141                return _(u'This fee is outdated. Please select the current ranscript charge.')
    140142            cost = DESTINATION_COST[applicant.charge][1]
    141143            payment.amount_auth = applicant.no_copies * cost
Note: See TracChangeset for help on using the changeset viewer.