Ignore:
Timestamp:
20 Oct 2019, 20:06:20 (5 years ago)
Author:
Henrik Bettermann
Message:

Print signatures on course registration slip.

Configure bank account.

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

Legend:

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

    r15684 r15696  
    7575        xmldict['provider_item_name'] = PROVIDER_ITEM_NAME
    7676        # Institution data
    77         xmldict['institution_acct'] = '00000000'
    78         xmldict['institution_bank_id'] = '00'
    79         xmldict['institution_amt'] = '0.0'
     77        xmldict['institution_acct'] = '0040484781'
     78        xmldict['institution_bank_id'] = '31'
    8079        provider_amt = 0.0
    8180        self.pay_item_id = '103' # must be provided by Interswitch
     
    136135        xmldict = {}
    137136        provider_amt = 400.0
    138         xmldict['institution_acct'] = '00000000000'
    139         xmldict['institution_bank_id'] = '00'
     137        xmldict['institution_acct'] = '0040484781'
     138        xmldict['institution_bank_id'] = '31'
    140139        xmldict['detail_ref'] = self.context.p_id
    141140        xmldict['provider_amt'] = 100 * provider_amt
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/interswitch/tests.py

    r15663 r15696  
    7979            self.browser.contents)
    8080        self.assertTrue(
    81             'item_name="Tuition Plus (total amount)" item_amt="3985000" bank_id="00" acct_num="00000000"' in
     81            'item_name="Tuition Plus (total amount)" item_amt="3970000" bank_id="31" acct_num="0040484781"' in
    8282            self.browser.contents)
    8383
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser.py

    r15563 r15696  
    3939    NigeriaExportPDFPaymentSlip,
    4040    NigeriaExportPDFClearanceSlip,
     41    NigeriaExportPDFCourseRegistrationSlip,
    4142    )
    4243
     
    4647from kofacustom.iuokada.interfaces import MessageFactory as _
    4748
     49class CustomExportPDFCourseRegistrationSlip(
     50    NigeriaExportPDFCourseRegistrationSlip):
     51    """Deliver a PDF slip of the context.
     52    """
     53
     54    def _signatures(self):
     55        return (
     56                ['Student Signature'],
     57                ['HoD / Course Adviser Signature'],
     58                ['College Officer Signature'],
     59                ['Dean Signature']
     60                )
     61
     62    #def _sigsInFooter(self):
     63    #    return (_('Student'),
     64    #            _('HoD / Course Adviser'),
     65    #            _('College Officer'),
     66    #            _('Dean'),
     67    #            )
     68    #    return ()
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/tests/test_browser.py

    r15563 r15696  
    3131from waeup.kofa.students.accommodation import BedTicket
    3232from waeup.kofa.testing import FunctionalTestCase
     33from waeup.kofa.browser.tests.test_pdf import samples_dir
    3334from waeup.kofa.interfaces import (
    3435    IExtFileStore, IFileStoreNameChooser)
     
    4445    def test_dummytest(self):
    4546        return
     47
     48
     49class StudentUITests(StudentsFullSetup):
     50    # Tests for Student class views and pages
     51
     52    layer = FunctionalLayer
     53
     54    def test_student_course_registration(self):
     55        IWorkflowState(self.student).setState('school fee paid')
     56        self.browser.open(self.login_path)
     57        self.browser.getControl(name="form.login").value = self.student_id
     58        self.browser.getControl(name="form.password").value = 'spwd'
     59        self.browser.getControl("Login").click()
     60        # Now students can add the current study level
     61        self.browser.getLink("Study Course").click()
     62        self.browser.getLink("Add course list").click()
     63        self.assertMatches('...Add current level 100 (Year 1)...',
     64                           self.browser.contents)
     65        self.browser.getControl("Create course list now").click()
     66        # Students can open the pdf course registration slip
     67        self.browser.open(
     68            self.student_path + '/studycourse/100/course_registration_slip.pdf')
     69        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     70        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
     71        path = os.path.join(samples_dir(), 'course_registration_slip.pdf')
     72        open(path, 'wb').write(self.browser.contents)
     73        print "Sample PDF course_registration_slip.pdf written to %s" % path
Note: See TracChangeset for help on using the changeset viewer.