Changeset 9733


Ignore:
Timestamp:
27 Nov 2012, 18:56:08 (12 years ago)
Author:
Henrik Bettermann
Message:

Extend webservice and return reg_number too.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/payment.py

    r9506 r9733  
    9494
    9595    @property
    96     def reg_or_matric_number(self):
    97         "Matric number or reg number of payee"
     96    def reg_number(self):
     97        "Reg number of payee"
    9898        return self.context.__parent__.reg_number
    9999
    100100    @property
     101    def matric_number(self):
     102        return ''
     103
     104    @property
    101105    def faculty(self):
    102         "Faculty of payee"
    103106        return ''
    104107
    105108    @property
    106109    def department(self):
    107         "Department of payee"
    108110        return ''
    109111
  • main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py

    r9533 r9733  
    134134    display_fullname = Attribute('Name of  payee')
    135135    id = Attribute('Id of payee')
    136     reg_or_matric_number = Attribute('Matric number or reg number of payee')
     136    reg_number = Attribute('Reg number of payee')
     137    matric_number = Attribute('Matric number of payee')
    137138    faculty = Attribute('Faculty of payee')
    138139    department = Attribute('Department of payee')
  • main/waeup.kofa/trunk/src/waeup/kofa/students/payments.py

    r9506 r9733  
    158158
    159159    @property
    160     def reg_or_matric_number(self):
     160    def matric_number(self):
    161161        "Matric number or reg number of payee"
    162162        return self.context.student.matric_number
     163
     164    @property
     165    def reg_number(self):
     166        "Reg number or reg number of payee"
     167        return self.context.student.reg_number
    163168
    164169    @property
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r9716 r9733  
    26632663            'FULL_NAME=Anna Tester&FACULTY=fac1&DEPARTMENT=dep1'
    26642664            '&PAYMENT_ITEM=My Certificate&PAYMENT_CATEGORY=School Fee'
    2665             '&ACADEMIC_SESSION=2004/2005&MATRIC_NUMBER=234&FEE_AMOUNT=0.0')
     2665            '&ACADEMIC_SESSION=2004/2005&MATRIC_NUMBER=234&REG_NUMBER=123'
     2666            '&FEE_AMOUNT=0.0')
    26662667        self.browser.open('http://localhost/app/paymentrequest?NONSENSE=nonsense')
    26672668        self.assertEqual(self.browser.contents, '-1')
  • main/waeup.kofa/trunk/src/waeup/kofa/webservices.py

    r9632 r9733  
    5454            owner = IPaymentWebservice(results[0])
    5555            full_name = owner.display_fullname
    56             matric_number = owner.reg_or_matric_number
     56            reg_number = owner.reg_number
     57            matric_number = owner.matric_number
    5758            faculty = owner.faculty
    5859            department = owner.department
     
    7374            'ACADEMIC_SESSION=%s&' +
    7475            'MATRIC_NUMBER=%s&' +
     76            'REG_NUMBER=%s&' +
    7577            'FEE_AMOUNT=%s') % (full_name, faculty,
    7678            department, payment_item, payment_category,
    77             academic_session, matric_number, amount)
     79            academic_session, matric_number, reg_number, amount)
    7880        return
    7981
Note: See TracChangeset for help on using the changeset viewer.