Changeset 13374


Ignore:
Timestamp:
1 Nov 2015, 14:11:52 (9 years ago)
Author:
Henrik Bettermann
Message:

Configure new payment categories. School fee amounts are now set via certificates not session configuration objects.

Location:
main/waeup.aaue/trunk/src/waeup/aaue
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/etranzact/tests.py

    r12975 r13374  
    5252        # Managers can add online payment tickets
    5353        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
    54         self.app['configuration']['2004'].school_fee_1 = 1234.0
     54        self.student['studycourse'].certificate.school_fee_1 = 1234.0
    5555        self.browser.open(self.payments_path)
    5656        IWorkflowState(self.student).setState('cleared')
     57        self.student.nationality = u'NG'
    5758        self.browser.open(self.payments_path + '/addop')
    5859        self.browser.getControl(name="form.p_category").value = ['clearance']
  • main/waeup.aaue/trunk/src/waeup/aaue/interfaces.py

    r13357 r13374  
    2929    """A session configuration object.
    3030    """
    31 
    32     # Base fees, do not remove.
    33 
    34     #school_fee_base = schema.Float(
    35     #    title = _(u'School Fee Instalments'),
    36     #    default = 0.0,
    37     #    required = True,
    38     #    )
    39 
    40     #school_fee = schema.Float(
    41     #    title = _(u'School Fee (not FP)'),
    42     #    default = 0.0,
    43     #    required = True,
    44     #    )
    45 
    46     school_fee_1 = schema.Float(
    47         title = _(u'Regular Initial School Fee'),
    48         default = 0.0,
    49         required = True,
    50         )
    51 
    52     school_fee_2 = schema.Float(
    53         title = _(u'Returning School Fee'),
    54         default = 0.0,
    55         required = True,
    56         )
    57 
    58     school_fee_3 = schema.Float(
    59         title = _(u'FP Initial School Fee'),
    60         default = 0.0,
    61         required = True,
    62         )
    6331
    6432    application_fee = schema.Float(
     
    13098        )
    13199
     100    welfare_fee = schema.Float(
     101        title = _(u'AAU Student Welfare Assurance Fee'),
     102        default = 0.0,
     103        required = True,
     104        )
     105
     106    union_fee = schema.Float(
     107        title = _(u'Students\' Union Due'),
     108        default = 0.0,
     109        required = True,
     110        )
     111
     112    lapel_fee = schema.Float(
     113        title = _(u'AAU Lapel/File Fee'),
     114        default = 0.0,
     115        required = True,
     116        )
     117
     118    matric_gown_fee = schema.Float(
     119        title = _(u'Matriculation Gown Fee'),
     120        default = 0.0,
     121        required = True,
     122        )
     123
     124    concessional_fee = schema.Float(
     125        title = _(u'Concessional Fee'),
     126        default = 0.0,
     127        required = True,
     128        )
     129
     130    medical_fee = schema.Float(
     131        title = _(u'Medical Student Acceptance Fee'),
     132        default = 0.0,
     133        required = True,
     134        )
     135
    132136    coursereg_deadline = schema.Datetime(
    133137        title = _(u'Course Reg. Deadline'),
  • main/waeup.aaue/trunk/src/waeup/aaue/interswitch/tests.py

    r13017 r13374  
    111111    def test_interswitch_form_school_fees(self):
    112112        self.student['studycourse'].entry_session = 2013
    113         self.app['configuration']['2004'].school_fee_1 = 51750.0
     113        self.student['studycourse'].certificate.school_fee_1 = 51750.0
    114114        # Manager can access InterswitchForm
    115115        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py

    r13359 r13374  
    124124        self.assertMatches('...Amount could not be determined...',
    125125                           self.browser.contents)
    126         self.app['configuration']['2004'].school_fee_1 = 6666.0
    127126        #self.browser.getControl(name="form.p_category").value = ['schoolfee']
    128127        # Accepotance fee must be paid first
     
    136135        cpt_value = ctrl.options[0]
    137136        # School fee payment ticket can be added ...
     137        self.student['studycourse'].certificate.school_fee_1 = 6666.0
     138        self.student.nationality = u'NG'
    138139        self.browser.open(self.payments_path + '/addop')
    139140        self.browser.getControl(name="form.p_category").value = ['schoolfee']
     
    235236
    236237    def test_manage_payments_bypass_ac_creation(self):
    237         self.app['configuration']['2004'].school_fee_1 = 6666.0
     238        self.student['studycourse'].certificate.school_fee_1 = 6666.0
     239        self.student.nationality = u'NG'
    238240        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
    239241        self.browser.open(self.payments_path)
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_utils.py

    r13359 r13374  
    5252        self.app['configuration']['2004'].clearance_fee = 1234.0
    5353        self.app['configuration']['2004'].clearance_fee_fp = 3456.0
    54         self.app['configuration']['2004'].school_fee_1 = 6666.0
     54        self.student['studycourse'].certificate.school_fee_1 = 6666.0
     55        self.student['studycourse'].certificate.school_fee_2 = 7777.0
     56        self.student.nationality = u'NG'
    5557        utils = getUtility(IStudentsUtils)
    5658
     
    5860        configuration.academic_session = 2005
    5961        self.app['configuration'].addSessionConfiguration(configuration)
    60         self.app['configuration']['2005'].school_fee_2 = 7777.0
    6162
    6263        error, payment = utils.setPaymentDetails('schoolfee',self.student)
  • main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py

    r13359 r13374  
    121121        elif category == 'hostel_maintenance':
    122122            amount = academic_session.maint_fee
     123        elif category == 'welfare':
     124            amount = academic_session.welfare_fee
     125        elif category == 'union':
     126            amount = academic_session.union_fee
     127        elif category == 'lapel':
     128            amount = academic_session.lapel_fee
     129        elif category == 'matric_gown':
     130            amount = academic_session.matric_gown_fee
     131        elif category == 'concessional':
     132            amount = academic_session.concession_fee
     133        elif category == 'medical':
     134            amount = academic_session.medical_fee
    123135        elif category == 'clearance':
    124136            if student.faccode == 'FP':
     
    136148                return _('Study course data are incomplete.'), None
    137149            if student.state == CLEARED:
    138                 if student.faccode == 'FP':
    139                     amount = academic_session.school_fee_3
     150                if student.is_foreigner:
     151                    amount = getattr(certificate, 'school_fee_3', 0.0)
    140152                else:
    141                     amount = academic_session.school_fee_1
    142             elif student.state == RETURNING or\
    143                 (student.is_postgrad and student.state == PAID):
    144                 academic_session = self._getSessionConfiguration(p_session)
    145                 if academic_session == None:
    146                     return _(u'Session configuration object is not available.'), None
    147                 if student.state == RETURNING:
    148                     p_session, p_level = self.getReturningData(student)
    149                 else:
    150                     # Returning postgraduate students also pay for the
    151                     # next session but their level always remains the same.
    152                     p_session += 1
     153                    amount = getattr(certificate, 'school_fee_1', 0.0)
     154            elif student.state == RETURNING:
     155                # In case of returning school fee payment the payment session
     156                # and level contain the values of the session the student
     157                # has paid for.
     158                p_session, p_level = self.getReturningData(student)
    153159                try:
    154160                    academic_session = grok.getSite()[
     
    156162                except KeyError:
    157163                    return _(u'Session configuration object is not available.'), None
    158                 amount = academic_session.school_fee_2
     164                if student.is_foreigner:
     165                    amount = getattr(certificate, 'school_fee_4', 0.0)
     166                else:
     167                    amount = getattr(certificate, 'school_fee_2', 0.0)
    159168            else:
    160169                return _('Wrong state.'), None
  • main/waeup.aaue/trunk/src/waeup/aaue/utils/utils.py

    r13348 r13374  
    3939        'transcript': 'Transcript Fee',
    4040        'late_registration': 'Late Course Registration Fee',
     41        'welfare': 'AAU Student Welfare Assurance Fee',
     42        'union': 'Students\' Union Due',
     43        'lapel': 'AAU Lapel/File Fee',
     44        'matric_gown': 'Matriculation Gown Fee',
     45        'concessional': 'Concessional Fee',
     46        'medical': 'Medical Student Acceptance Fee',
    4147        }
    4248
     
    4652        #'schoolfee_2': 'School Fee 2nd instalment',
    4753        'clearance': 'Acceptance Fee',
    48         #'hostel_maintenance': 'Hostel Maintenance Fee',
     54        'hostel_maintenance': 'Hostel Maintenance Fee',
    4955        'application': 'Application Fee',
    5056        #'gown': 'Gown Hire Fee',
     
    5359        'transcript': 'Transcript Fee',
    5460        'late_registration': 'Late Course Registration Fee',
     61        'welfare': 'AAU Student Welfare Assurance Fee',
     62        'union': 'Students\' Union Due',
     63        'lapel': 'AAU Lapel/File Fee',
     64        'matric_gown': 'Matriculation Gown Fee',
     65        'concessional': 'Concessional Fee',
     66        'medical': 'Medical Student Acceptance Fee',
    5567        }
    5668
Note: See TracChangeset for help on using the changeset viewer.