Changeset 15842


Ignore:
Timestamp:
25 Nov 2019, 11:02:44 (5 years ago)
Author:
Henrik Bettermann
Message:

Show correct buttons if payment state in ('paid', 'waived', 'scholarship').

Location:
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants/browser.py

    r15796 r15842  
    6565    @property
    6666    def target_url(self):
    67         if not self.context.r_company:
     67        if not self.context.p_state in ('waived', 'scholarship') \
     68            and not self.context.r_company:
    6869            return ''
    6970        return self.view.url(self.view.context, self.target)
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/browser.py

    r15770 r15842  
    9292            self.context.student.current_session, self.context):
    9393            return ''
    94         if self.context.p_state in ('paid', 'waived'):
     94        if self.context.p_state in ('paid', 'waived', 'scholarship'):
    9595            return ''
    9696        return self.view.url(self.view.context, self.target)
     
    106106            self.context.__parent__.__parent__.year, self.context):
    107107            return ''
    108         if self.context.p_state in ('paid', 'waived'):
     108        if self.context.p_state in ('paid', 'waived', 'scholarship'):
    109109            return ''
    110110        return self.view.url(self.view.context, self.target)
     
    163163            self.context.student.current_session, self.context):
    164164            return
    165         if self.context.p_state in ('paid', 'waived'):
     165        if self.context.p_state in ('paid', 'waived', 'scholarship'):
    166166            self.flash(_('This ticket has already been paid.'), type='danger')
    167167            return
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/remita/applicantsbrowser.py

    r15770 r15842  
    7272            self.context.__parent__.__parent__.year, self.context):
    7373            return ''
    74         if self.context.p_state in ('paid', 'waived'):
     74        if self.context.p_state in ('paid', 'waived', 'scholarship'):
    7575            return ''
    7676        return self.view.url(self.view.context, self.target)
     
    113113            self.context.__parent__.__parent__.year, self.context):
    114114            return
    115         if self.context.p_state in ('paid', 'waived'):
     115        if self.context.p_state in ('paid', 'waived', 'scholarship'):
    116116            self.flash(_('This ticket has already been paid.'), type='danger')
    117117            return
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/remita/studentsbrowser.py

    r15825 r15842  
    8181            self.context.student.current_session, self.context):
    8282            return ''
    83         if self.context.p_state in ('paid', 'waived'):
     83        if self.context.p_state in ('paid', 'waived', 'scholarship'):
    8484            return ''
    8585        return self.view.url(self.view.context, self.target)
     
    123123            self.context.student.current_session, self.context):
    124124            return
    125         if self.context.p_state in ('paid', 'waived'):
     125        if self.context.p_state in ('paid', 'waived', 'scholarship'):
    126126            self.flash(_('This ticket has already been paid.'), type='danger')
    127127            return
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/remita/webservices.py

    r15351 r15842  
    9696                continue
    9797            ticket = results[0]
    98             if ticket.p_state == 'waived':
     98            if ticket.p_state in ('waived', 'scholarship'):
    9999                failed += 1
    100100                continue
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/browser.py

    r15826 r15842  
    392392        tabledata.append(sorted(
    393393            [value for value in self.context['payments'].values()
    394              if value.p_state in ('paid', 'waived')], key=lambda value: value.p_session))
     394             if value.p_state in ('paid', 'waived', 'scholarship')],
     395             key=lambda value: value.p_session))
    395396        tableheader.append([(P_ID,'p_id', 4.2),
    396397                         #(CD,'creation_date', 3),
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/viewlets.py

    r15826 r15842  
    6060    @property
    6161    def target_url(self):
    62         if not self.context.r_company:
     62        if not self.context.p_state in ('waived', 'scholarship') \
     63            and not self.context.r_company:
    6364            return ''
    6465        return self.view.url(self.view.context, self.target)
Note: See TracChangeset for help on using the changeset viewer.