Ignore:
Timestamp:
4 Jun 2015, 12:11:22 (10 years ago)
Author:
Henrik Bettermann
Message:

Let's disable NCE 1 payments online (undo r13022).

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

Legend:

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

    r13022 r13030  
    387387          'Download admission letter' in self.browser.contents)
    388388        return
     389
     390    def test_payment_disabled(self):
     391        self.certificate.study_mode = 'nce_ft'
     392        IWorkflowState(self.student).setState('cleared')
     393        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
     394        self.browser.open(self.payments_path)
     395        self.browser.getLink("Add current session payment ticket").click()
     396        self.browser.getControl(name="form.p_category").value = ['schoolfee']
     397        self.browser.getControl("Create ticket").click()
     398        self.assertMatches('...ticket created...',
     399                           self.browser.contents)
     400        self.app['configuration']['2004'].payment_disabled = ['sf_nce1']
     401        self.browser.getLink("Add current session payment ticket").click()
     402        self.browser.getControl(name="form.p_category").value = ['schoolfee']
     403        self.browser.getControl("Create ticket").click()
     404        self.assertMatches('...Payment temporarily disabled...',
     405                           self.browser.contents)
     406        self.certificate.study_mode = 'ug_ft'
     407        self.browser.open(self.payments_path)
     408        self.browser.getLink("Add current session payment ticket").click()
     409        self.browser.getControl(name="form.p_category").value = ['schoolfee']
     410        self.browser.getControl("Create ticket").click()
     411        self.assertMatches('...ticket created...',
     412                           self.browser.contents)
     413        return
  • main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py

    r13022 r13030  
    203203                    else:
    204204                        amount = 14825
    205                     ################################
    206                     # Payment disabled on 29/05/15 #
    207                     ################################
    208                     amount = 0.0
    209205                # NCE II
    210206                elif student.current_level in (100, 110, 120) and \
     
    391387        return _('(see payment slip)')
    392388
     389    def _isPaymentDisabled(self, p_session, category, student):
     390        academic_session = self._getSessionConfiguration(p_session)
     391        if category == 'schoolfee':
     392            if 'sf_all' in academic_session.payment_disabled:
     393                return True
     394            if 'sf_nce1' in academic_session.payment_disabled and \
     395                student.current_level == 100 and student.state == CLEARED and \
     396                student.current_mode == 'nce_ft':
     397                return True
     398        return False
     399
    393400    SEPARATORS_DICT = {
    394401        'form.fst_sit_fname': _(u'First Sitting Record'),
  • main/waeup.fceokene/trunk/src/waeup/fceokene/utils/utils.py

    r11913 r13030  
    5050        }
    5151
     52    DISABLE_PAYMENT_GROUP_DICT = {
     53        'sf_all': 'School Fee - All Students',
     54        'sf_nce1': 'School Fee - NCE I Fresh Students',
     55        }
     56
    5257    SELECTABLE_PAYMENT_CATEGORIES = deepcopy(PAYMENT_CATEGORIES)
    5358
Note: See TracChangeset for help on using the changeset viewer.