Changeset 15218 for main


Ignore:
Timestamp:
8 Nov 2018, 12:45:03 (6 years ago)
Author:
Henrik Bettermann
Message:

Implement special application (for supplementary payments).

Location:
main/kofacustom.edopoly/trunk/src/kofacustom/edopoly
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/applicants/applicant.py

    r15131 r15218  
    2626from kofacustom.nigeria.applicants.applicant import NigeriaApplicant
    2727from kofacustom.edopoly.applicants.interfaces import(
    28     ICustomApplicant, ICustomUGApplicantEdit, ICustomPGApplicantEdit, IPUTMEApplicantEdit)
     28    ICustomApplicant, ICustomUGApplicantEdit, ICustomPGApplicantEdit,
     29    IPUTMEApplicantEdit, ICustomSpecialApplicant)
    2930
    3031class CustomApplicant(NigeriaApplicant):
    3132
    3233    grok.implements(ICustomApplicant, ICustomUGApplicantEdit,
    33         ICustomPGApplicantEdit, IPUTMEApplicantEdit)
     34        ICustomPGApplicantEdit, IPUTMEApplicantEdit, ICustomSpecialApplicant)
    3435    grok.provides(ICustomApplicant)
    3536
  • main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/applicants/browser.py

    r15171 r15218  
    4747    ICustomUGApplicantEdit, ICustomUGApplicant,
    4848    ICustomPGApplicantEdit, ICustomPGApplicant,
    49     ICustomApplicant,)
     49    ICustomApplicant, ICustomSpecialApplicant,)
    5050
    5151from kofacustom.edopoly.interfaces import MessageFactory as _
     
    8585    def form_fields(self):
    8686        target = getattr(self.context.__parent__, 'prefix', None)
     87        if self.context.special:
     88            return grok.AutoFields(ICustomSpecialApplicant)
    8789        form_fields = grok.AutoFields(ICustomUGApplicant)
    8890        for field in UG_OMIT_DISPLAY_FIELDS:
     
    217219    @property
    218220    def form_fields(self):
     221        if self.context.special:
     222            form_fields = grok.AutoFields(ICustomSpecialApplicant)
     223            form_fields['applicant_id'].for_display = True
     224            return form_fields
    219225        target = getattr(self.context.__parent__, 'prefix', None)
    220226        form_fields = grok.AutoFields(ICustomUGApplicant)
     
    231237    @property
    232238    def form_fields(self):
     239        if self.context.special:
     240            form_fields = grok.AutoFields(ICustomSpecialApplicant).omit(
     241                'locked', 'suspended')
     242            form_fields['applicant_id'].for_display = True
     243            return form_fields
    233244        target = getattr(self.context.__parent__, 'prefix', None)
    234245        form_fields = grok.AutoFields(ICustomUGApplicantEdit)
  • main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/applicants/interfaces.py

    r15169 r15218  
    2828from waeup.kofa.schema import FormattedDate, TextLineChoice
    2929from waeup.kofa.students.vocabularies import nats_vocab, GenderSource
    30 from waeup.kofa.applicants.interfaces import contextual_reg_num_source
     30from waeup.kofa.applicants.interfaces import (
     31    contextual_reg_num_source, ISpecialApplicant)
    3132from kofacustom.nigeria.applicants.interfaces import (
    3233    LGASource, high_qual, high_grade, exam_types,
     
    225226    """
    226227
     228class ICustomSpecialApplicant(ISpecialApplicant):
     229    """
     230    """
    227231
    228232class ICustomApplicant(ICustomUGApplicant, ICustomPGApplicant):
  • main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/applicants/utils.py

    r15110 r15218  
    4242        'pre': ['Pre-Degree Studies', 'PRE'],
    4343        'ct': ['Certificate Programmes', 'CT'],
     44        'special': ['Supplementary Payment', 'SP'],
    4445        }
    4546
  • main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/interfaces.py

    r15183 r15218  
    123123        )
    124124
     125    medical_fee = schema.Float(
     126        title = _(u'Medical Fee'),
     127        default = 0.0,
     128        required = False,
     129        )
     130
     131    conv_nd_fee = schema.Float(
     132        title = _(u'Convocation Fee ND'),
     133        default = 0.0,
     134        required = False,
     135        )
     136
     137    conv_hnd_fee = schema.Float(
     138        title = _(u'Convocation Fee ND'),
     139        default = 0.0,
     140        required = False,
     141        )
     142
    125143    def getSessionString():
    126144        """Returns the session string from the vocabulary.
  • main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/interswitch/browser.py

    r15137 r15218  
    4949httplib.HTTPSConnection.debuglevel = 0
    5050HTTPS = True
     51
     52SPECIAL_PAYMENT_PARAMS = {
     53
     54    'conv_nd': ('101', 2000.0, '0031913976', '121'),
     55    'conv_hnd': ('101', 2000.0, '0031913976', '121'),
     56    }
     57
    5158
    5259class CustomInterswitchPageStudent(InterswitchPageStudent):
     
    155162        xmldict['institution_item_name'] = self.context.category
    156163        xmldict['institution_name'] = INSTITUTION_NAME
     164        if self.context.p_category in SPECIAL_PAYMENT_PARAMS.keys():
     165            self.pay_item_id = SPECIAL_PAYMENT_PARAMS[self.context.p_category][0]
     166            provider_amt = SPECIAL_PAYMENT_PARAMS[self.context.p_category][1]
     167            xmldict['institution_acct'] = SPECIAL_PAYMENT_PARAMS[self.context.p_category][2]
     168            xmldict['institution_bank_id'] = SPECIAL_PAYMENT_PARAMS[self.context.p_category][3]
    157169        # Interswitch amount is not part of the xml data
    158170        if provider_amt == 0:
  • main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/utils/utils.py

    r15193 r15218  
    5858        'admission_checking': 'Admission Checking Fee',
    5959        'medical': 'Medical Fee',
     60        'conv_nd': 'Convocation ND',
     61        'conv_hnd': 'Convocation HND',
    6062        }
    6163
    62     SELECTABLE_PAYMENT_CATEGORIES = deepcopy(PAYMENT_CATEGORIES)
    63 
     64    SELECTABLE_PAYMENT_CATEGORIES = {
     65        'schoolfee': 'Tuition/Exams Fee',
     66        'clearance': 'Acceptance Fee',
     67        'bed_allocation': 'Accommodation Booking Fee',
     68        'hostel_maintenance': 'Hostel Maintenance Fee',
     69        'application': 'Application Fee',
     70        'ict_entre': 'ICT and Entrepreneur Fee',
     71        'logbook_combo': 'Logbook Combo Fee',
     72        'siwess_combo': 'SIWESS Combo Fee',
     73        'transcript': 'Transcript Fee',
     74        'certificate': 'Certificate Fee',
     75        'certificate_confirm': 'Certificate Confirmation Fee',
     76        'late_registration': 'Late Course Registration Fee',
     77        'final_clearance': 'Final Clearance Fee',
     78        'union': 'Student Union Dues',
     79        'admission_checking': 'Admission Checking Fee',
     80        'medical': 'Medical Fee',
     81        #'conv_nd': 'Convocation ND',
     82        #'conv_hnd': 'Convocation HND',
     83        }
    6484    PREVIOUS_PAYMENT_CATEGORIES = deepcopy(SELECTABLE_PAYMENT_CATEGORIES)
    6585
     
    86106        }
    87107
     108    SPECIAL_APP_DICT = {
     109        'conv_nd': 'Convocation ND',
     110        'conv_hnd': 'Convocation HND',
     111        }
     112
    88113    STUDY_MODES_DICT = {
    89114        'ug_ft': 'Undergraduate Full Time (not used in EdoPoly)',
Note: See TracChangeset for help on using the changeset viewer.