Ignore:
Timestamp:
25 Jan 2017, 09:26:29 (8 years ago)
Author:
Henrik Bettermann
Message:

Configure clearance fee.

Location:
main/kofacustom.coewarri/trunk/src/kofacustom/coewarri
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.coewarri/trunk/src/kofacustom/coewarri/interfaces.py

    r14336 r14455  
    3838        )
    3939
    40     clearance_fee = schema.Float(
    41         title = _(u'Acceptance Fee'),
     40    clearance_fee_1 = schema.Float(
     41        title = _(u'Acceptance Fee NCE Prog.'),
     42        default = 0.0,
     43        required = False,
     44        )
     45
     46    clearance_fee_2 = schema.Float(
     47        title = _(u'Acceptance Fee Degree Prog.'),
    4248        default = 0.0,
    4349        required = False,
  • main/kofacustom.coewarri/trunk/src/kofacustom/coewarri/students/tests/test_utils.py

    r14344 r14455  
    2525        configuration.academic_session = 2016
    2626        self.app['configuration'].addSessionConfiguration(configuration)
    27         self.app['configuration']['2016'].clearance_fee = 10234.0
     27        self.app['configuration']['2016'].clearance_fee_1 = 10300.0
     28        self.app['configuration']['2016'].clearance_fee_2 = 20300.0
    2829
    2930        error, payment = utils.setPaymentDetails('schoolfee',self.student)
     
    4950
    5051        error, payment = utils.setPaymentDetails('clearance',self.student)
    51         self.assertEqual(payment.amount_auth, 15234.0)
     52        self.assertEqual(payment.amount_auth, 25300.0)
    5253        self.assertEqual(payment.p_item, u'CERT1')
    5354
     
    5657        self.assertEqual(payment.amount_auth, 69500.0)
    5758        error, payment = utils.setPaymentDetails('clearance',self.student)
    58         self.assertEqual(payment.amount_auth, 10234.0)
     59        self.assertEqual(payment.amount_auth, 20300.0)
     60
     61        self.student['studycourse'].certificate.study_mode = 'nce_ft'
     62        error, payment = utils.setPaymentDetails('clearance',self.student)
     63        self.assertEqual(payment.amount_auth, 10300.0)
    5964        return
  • main/kofacustom.coewarri/trunk/src/kofacustom/coewarri/students/utils.py

    r14347 r14455  
    106106            except (AttributeError, TypeError):
    107107                return _('Study course data are incomplete.'), None
    108             amount = academic_session.clearance_fee
     108            if student.current_mode == 'ug_ft':
     109                amount = academic_session.clearance_fee_2
     110            else:
     111                amount = academic_session.clearance_fee_1
    109112            if local_nonlocal(student) == 'non-local':
    110113                amount += 5000.0
Note: See TracChangeset for help on using the changeset viewer.