Changeset 9154


Ignore:
Timestamp:
4 Sep 2012, 07:07:44 (12 years ago)
Author:
Henrik Bettermann
Message:

Prepare for previous session payments.

Location:
main/waeup.aaue/trunk/src/waeup/aaue/students
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/interfaces.py

    r8867 r9154  
    7171    """
    7272
     73    p_current = schema.Bool(
     74        title = _(u'Current Session Payment'),
     75        default = True,
     76        required = False,
     77        )
     78
    7379    p_level = schema.Int(
    7480        title = _(u'Payment Level'),
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py

    r8961 r9154  
    283283        self.assertEqual(payment.p_item, u'')
    284284        self.assertEqual(error, None)
     285
     286        error, payment = utils.setPaymentDetails('schoolfee',self.student, 2004, 100)
     287        self.assertEqual(error, u'Previous session payment not yet implemented.')
    285288        return
  • main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py

    r8961 r9154  
    4848        return new_session, new_level
    4949
    50     def setPaymentDetails(self, category, student):
     50    def setPaymentDetails(self, category, student,
     51            previous_session=None, previous_level=None):
    5152        """Create Payment object and set the payment data of a student for
    5253        the payment category specified.
     
    5758        amount = 0.0
    5859        error = u''
     60        if previous_session:
     61            return _('Previous session payment not yet implemented.'), None
    5962        p_session = student['studycourse'].current_session
    6063        p_level = student['studycourse'].current_level
     64        p_current = True
    6165        session = str(p_session)
    6266        try:
     
    161165        payment.p_session = p_session
    162166        payment.p_level = p_level
     167        payment.p_current = p_current
    163168        payment.amount_auth = amount
    164169        return None, payment
Note: See TracChangeset for help on using the changeset viewer.