Changeset 17126


Ignore:
Timestamp:
12 Oct 2022, 07:57:34 (2 years ago)
Author:
Henrik Bettermann
Message:

Disable balance payment and payments by installments for BMS students.

Location:
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/viewlets.py

    r16410 r17126  
    9898    grok.require('waeup.payStudent')
    9999
     100    @property
     101    def target_url(self):
     102        if self.context.student.depcode == 'BMS':
     103            return ''
     104        return self.view.url(self.view.context, self.target)
     105
    100106class GetMatricNumberActionButton(ManageActionButton):
    101107    grok.order(10)
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/utils/utils.py

    r16747 r17126  
    143143
    144144    def selectable_payment_categories(self, student):
    145         return self.SELECTABLE_PAYMENT_CATEGORIES
     145        spc = deepcopy(self.SELECTABLE_PAYMENT_CATEGORIES)
     146        if student.depcode == 'BMS':
     147            del spc['schoolfee40']
     148            del spc['secondinstal']
     149        return spc
    146150
    147151    PREVIOUS_PAYMENT_CATEGORIES = {
Note: See TracChangeset for help on using the changeset viewer.