Changeset 17039 for main


Ignore:
Timestamp:
27 Jul 2022, 13:26:21 (2 years ago)
Author:
Henrik Bettermann
Message:

Configure transcript fee calculation.

Location:
main/kofacustom.edocons/trunk/src/kofacustom/edocons
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.edocons/trunk/src/kofacustom/edocons/applicants/browser.py

    r17029 r17039  
    101101    'applicant_id',
    102102    'proc_date',
     103    'courier_tno',
    103104    )
    104105
  • main/kofacustom.edocons/trunk/src/kofacustom/edocons/applicants/interfaces.py

    r17029 r17039  
    6363DESTINATION_COST = {
    6464    #'none': ('To the moon', 1000000000.0, 1),
    65     'nigeria': ('Within Nigeria', 20000.0, 1),
    66     'africa': ('Within Africa ', 30000.0, 2),
    67     'inter': ('International', 35000.0, 3),
    68     'cert_nigeria': ('Certified Copy - Within Nigeria', 13000.0, 4),
    69     'cert_africa': ('Certified Copy - Within Africa', 23000.0, 5),
    70     'cert_inter': ('Certified Copy - International', 28000.0, 6),
     65    'australia': ('Australia', 44500.0, 1),
     66    'india': ('Arab Emirate/China/India/Saudi Arabia', 38500.0, 2),
     67    'ghana': ('Benin/Ghana/South Africa',  37000.0, 3),
     68    'isreal': ('Isreal/Turkey', 33500.0, 4),
     69    'canada': ('Canada', 30500.0, 5),
     70    'germany': ('Finland/France/Germany/Netherlands', 30000.0, 6),
     71    'usa': ('USA', 31750.0, 7),
     72    'uk': ('UK', 25750.0, 8),
     73    'north': ('Nigeria North', 11800.0, 9),
     74    'abuja': ('Abuja/Lokoja', 11200.0, 10),
     75    'south': ('Nigeria South East/South/South West', 10700.0, 11),
    7176    }
    7277
     
    169174    next_kin_phone = PhoneNumber(
    170175        title = _(u'Next of Kin Phone'),
    171         description = u'',
    172176        required = False,
    173177        readonly = False,
     
    500504        )
    501505
    502     course_changed = schema.Choice(
    503         title = _(u'Change of Study Course / Transfer'),
    504         description = u'If yes, select previous course of study.',
    505         source = TranscriptCertificateSource(),
    506         readonly = False,
    507         required = False,
    508         )
     506    #course_changed = schema.Choice(
     507    #    title = _(u'Change of Study Course / Transfer'),
     508    #    description = u'If yes, select previous course of study.',
     509    #    source = TranscriptCertificateSource(),
     510    #    readonly = False,
     511    #    required = False,
     512    #    )
    509513
    510514    spillover_level = schema.Choice(
     
    541545        required = True,
    542546        readonly = False,
     547        )
     548       
     549    curriculum = schema.Bool(
     550        title = _(u'Including curriculum'),
     551        description = u'₦ 5000 will be added to transcript charge',
     552        default = False,
     553        required = False,
    543554        )
    544555
  • main/kofacustom.edocons/trunk/src/kofacustom/edocons/applicants/utils.py

    r17038 r17039  
    1818"""General helper functions and utilities for the application section.
    1919"""
    20 
     20from time import time
     21from datetime import datetime
    2122from kofacustom.nigeria.applicants.utils import NigeriaApplicantsUtils
    2223from waeup.kofa.applicants.workflow import (INITIALIZED,
    2324    STARTED, PAID, ADMITTED, NOT_ADMITTED, SUBMITTED, CREATED)
     25from kofacustom.edocons.applicants.interfaces import DESTINATION_COST
    2426from kofacustom.edocons.interfaces import MessageFactory as _
    2527
     
    8183                return _('Amount could not be determined. Have you saved the form?')
    8284            return
     85        elif applicant.container_code.startswith('tsc'):
     86            if not applicant.charge:
     87                return _(u'No transcript charge selected.')
     88            cost = DESTINATION_COST[applicant.charge][1]
     89            payment.amount_auth = applicant.no_copies * cost
     90            if applicant.curriculum:
     91                payment.amount_auth += applicant.no_copies * 5000
     92            payment.p_category = 'transcript'
     93            return
    8394        payment.p_category = 'application'
    8495        container_fee = container.application_fee
  • main/kofacustom.edocons/trunk/src/kofacustom/edocons/utils/utils.py

    r17031 r17039  
    3636        'application': 'Application Fee',
    3737        #'app_balance': 'Application Fee Balance',
    38         #'transcript': 'Transcript Fee',
     38        'transcript': 'Transcript Fee',
    3939        #'late_registration': 'Late Course Registration Fee',
    4040        #'combi': 'Combi Payment',
Note: See TracChangeset for help on using the changeset viewer.