Changeset 9153 for main


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

Prepare for previous session payments.

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

Legend:

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

    r8868 r9153  
    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.fceokene/trunk/src/waeup/fceokene/students/tests/test_browser.py

    r9143 r9153  
    243243        self.assertEqual(payment.p_item, u'')
    244244        self.assertEqual(error, None)
     245
     246        error, payment = utils.setPaymentDetails('schoolfee',self.student, 2004, 100)
     247        self.assertEqual(error, u'Previous session payment not yet implemented.')
    245248        return
  • main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py

    r9143 r9153  
    4949        return new_session, new_level
    5050
    51     def setPaymentDetails(self, category, student):
     51    def setPaymentDetails(self, category, student,
     52            previous_session=None, previous_level=None):
    5253        """Create Payment object and set the payment data of a student for
    5354        the payment category specified.
     
    5859        amount = 0.0
    5960        error = u''
     61        if previous_session:
     62            return _('Previous session payment not yet implemented.'), None
    6063        p_session = student['studycourse'].current_session
    6164        p_level = student['studycourse'].current_level
     65        p_current = True
    6266        session = str(p_session)
    6367        try:
     
    207211        payment.p_session = p_session
    208212        payment.p_level = p_level
     213        payment.p_current = p_current
    209214        payment.amount_auth = float(amount)
    210215        return None, payment
Note: See TracChangeset for help on using the changeset viewer.