Ignore:
Timestamp:
10 Sep 2020, 09:33:13 (4 years ago)
Author:
Henrik Bettermann
Message:

Implement PG schoolfee payments.

Show provider_amt in payment ticket pages.

Location:
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser.py

    r16180 r16233  
    314314            mergefiles=mergefiles,
    315315            watermark=watermark)
     316
     317class CustomOnlinePaymentDisplayFormPage(NigeriaOnlinePaymentDisplayFormPage):
     318    """ Page to view an online payment ticket. We do not omit provider_amt.
     319    """
     320    form_fields = grok.AutoFields(ICustomStudentOnlinePayment).omit(
     321        'gateway_amt', 'thirdparty_amt', 'p_item','p_combi')
     322    form_fields[
     323        'creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
     324    form_fields[
     325        'payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
     326
     327class CustomExportPDFPaymentSlip(NigeriaExportPDFPaymentSlip):
     328    """Deliver a PDF slip of the context. We do not omit provider_amt.
     329    """
     330    form_fields = grok.AutoFields(ICustomStudentOnlinePayment).omit(
     331        'gateway_amt', 'thirdparty_amt', 'p_item',
     332        'p_split_data','p_combi')
     333    form_fields['creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
     334    form_fields['payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/interfaces.py

    r15859 r16233  
    104104ICustomStudentOnlinePayment['p_level'].order = ICustomStudentOnlinePayment[
    105105    'p_session'].order
     106ICustomStudentOnlinePayment['provider_amt'].order = ICustomStudentOnlinePayment[
     107    'net_amt'].order
    106108
    107109class ICustomCourseTicket(INigeriaCourseTicket):
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/utils.py

    r16223 r16233  
    6161        }
    6262
     63    REQUIRED_PAYMENTS_PG = {
     64        'pg_other': 'PG Other Charges',
     65        }
     66
    6367    def warnCreditsOOR(self, studylevel, course=None):
    6468        """Return message if credits are out of range. In the base
     
    7276
    7377    def _requiredPaymentsMissing(self, student, session):
    74         if student.is_fresh:
     78        if student.is_postgrad:
     79            rp = self.REQUIRED_PAYMENTS_PG
     80        elif student.is_fresh:
    7581            rp = self.REQUIRED_PAYMENTS_FRESH
    7682        else:
     
    213219            p_item = p_item.strip(' + ')
    214220        elif category == 'required_combi':
    215             if student.is_fresh:
    216                 rp = deepcopy(self.REQUIRED_PAYMENTS_FRESH)
     221            if student.is_postgrad:
     222                rp = self.REQUIRED_PAYMENTS_PG
     223            elif student.is_fresh:
     224                rp = self.REQUIRED_PAYMENTS_FRESH
    217225            else:
    218                 rp = deepcopy(self.REQUIRED_PAYMENTS_RETURNING)
     226                rp = self.REQUIRED_PAYMENTS_RETURNING
    219227            for cat in rp:
    220228                fee_name = cat + '_fee'
Note: See TracChangeset for help on using the changeset viewer.