Changeset 10806 for main/kofacustom.ekodisco/trunk/src/kofacustom
- Timestamp:
- 28 Nov 2013, 17:33:07 (11 years ago)
- Location:
- main/kofacustom.ekodisco/trunk/src/kofacustom/ekodisco
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.ekodisco/trunk/src/kofacustom/ekodisco/browser/pages.py
r10786 r10806 56 56 """ 57 57 form_fields = grok.AutoFields(ICertificate).select( 58 'title', 'code', 'application_category' )58 'title', 'code', 'application_category', 'school_fee_1') 59 59 60 60 class CustomCertificatePage(CertificatePage): … … 62 62 """ 63 63 form_fields = grok.AutoFields(ICertificate).select( 64 'title', 'code', 'application_category' )64 'title', 'code', 'application_category', 'school_fee_1') 65 65 66 66 class CustomCertificateManageFormPage(CertificateManageFormPage): … … 69 69 70 70 form_fields = grok.AutoFields(ICertificate).select( 71 'title', 'application_category' )71 'title', 'application_category', 'school_fee_1') -
main/kofacustom.ekodisco/trunk/src/kofacustom/ekodisco/locales/en/LC_MESSAGES/waeup.kofa.po
r10804 r10806 310 310 311 311 msgid "admitted" 312 msgstr " approved"312 msgstr "contract approved" 313 313 314 314 msgid "Start new session" … … 324 324 msgstr "Subscription Slip" 325 325 326 msgid "Initial School Fee" 327 msgstr "Annual Meter Charge" 328 329 msgid "school fee paid" 330 msgstr "meter fee paid" 331 -
main/kofacustom.ekodisco/trunk/src/kofacustom/ekodisco/students/utils.py
r10770 r10806 30 30 # refix 31 31 STUDENT_ID_PREFIX = u'X' 32 33 def setPaymentDetails(self, category, student, 34 previous_session, previous_level): 35 """Create Payment object and set the payment data of a student for 36 the payment category specified. 37 38 """ 39 p_item = u'' 40 amount = 0.0 41 if previous_session: 42 if previous_session < student['studycourse'].entry_session: 43 return _('The previous session must not fall below ' 44 'your entry session.'), None 45 if category == 'schoolfee': 46 # School fee is always paid for the following session 47 if previous_session > student['studycourse'].current_session: 48 return _('This is not a previous session.'), None 49 else: 50 if previous_session > student['studycourse'].current_session - 1: 51 return _('This is not a previous session.'), None 52 p_session = previous_session 53 p_level = previous_level 54 p_current = False 55 else: 56 p_session = student['studycourse'].current_session 57 p_level = student['studycourse'].current_level 58 p_current = True 59 academic_session = self._getSessionConfiguration(p_session) 60 if academic_session == None: 61 return _(u'Session configuration object is not available.'), None 62 # Determine fee. 63 if category == 'schoolfee': 64 try: 65 certificate = student['studycourse'].certificate 66 p_item = certificate.code 67 except (AttributeError, TypeError): 68 return _('Contract data are incomplete.'), None 69 amount = getattr(certificate, 'school_fee_1', 0.0) 70 if amount in (0.0, None): 71 return _('Amount could not be determined.'), None 72 for key in student['payments'].keys(): 73 ticket = student['payments'][key] 74 if ticket.p_state == 'paid' and\ 75 ticket.p_category == category and \ 76 ticket.p_item == p_item and \ 77 ticket.p_session == p_session: 78 return _('This type of payment has already been made.'), None 79 payment = createObject(u'waeup.StudentOnlinePayment') 80 timestamp = ("%d" % int(time()*10000))[1:] 81 payment.p_id = "p%s" % timestamp 82 payment.p_category = category 83 payment.p_item = p_item 84 payment.p_session = p_session 85 payment.p_level = p_level 86 payment.p_current = p_current 87 payment.amount_auth = amount 88 return None, payment -
main/kofacustom.ekodisco/trunk/src/kofacustom/ekodisco/utils/utils.py
r10792 r10806 39 39 40 40 PAYMENT_CATEGORIES = { 41 ' electricity': 'Electricity',41 'schoolfee': 'Meter Charge', 42 42 'application': 'Not applicable', 43 'schoolfee': 'Not applicable',44 43 } 45 44
Note: See TracChangeset for help on using the changeset viewer.