Changeset 6877
- Timestamp:
- 13 Oct 2011, 06:06:11 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/students
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
r6876 r6877 37 37 IStudentPersonal, IStudentBase, IStudentStudyCourse, 38 38 IStudentAccommodation, IStudentClearanceEdit, IStudentStudyLevel, 39 ICourseTicket, ICourseTicketAdd, IStudentPaymentsContainer 39 ICourseTicket, ICourseTicketAdd, IStudentPaymentsContainer, 40 IStudentOnlinePayment 40 41 ) 41 42 from waeup.sirp.students.catalog import search … … 45 46 from waeup.sirp.students.utils import getPaymentDetails 46 47 from waeup.sirp.browser.resources import toggleall 47 from waeup.sirp.payments.interfaces import IOnlinePayment48 48 49 49 # Save function used for save methods in manager pages … … 107 107 """A breadcrumb for course lists. 108 108 """ 109 grok.context(I OnlinePayment)109 grok.context(IStudentOnlinePayment) 110 110 111 111 @property … … 857 857 grok.name('addop') 858 858 grok.require('waeup.handleStudent') 859 form_fields = grok.AutoFields(I OnlinePayment).select(859 form_fields = grok.AutoFields(IStudentOnlinePayment).select( 860 860 'p_category') 861 861 #grok.template('addpaymentpage') … … 872 872 payment.p_id = "p%s" % timestamp 873 873 (payment.amount_auth, 874 payment.p_item, 874 payment.p_item, payment.p_session, 875 875 payment.surcharge_1, 876 876 payment.surcharge_2, … … 889 889 """ Page to view an online payment ticket 890 890 """ 891 grok.context(I OnlinePayment)891 grok.context(IStudentOnlinePayment) 892 892 grok.name('index') 893 893 grok.require('waeup.viewStudent') 894 form_fields = grok.AutoFields(I OnlinePayment)894 form_fields = grok.AutoFields(IStudentOnlinePayment) 895 895 form_fields['creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') 896 896 form_fields['payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') -
main/waeup.sirp/trunk/src/waeup/sirp/students/interfaces.py
r6874 r6877 11 11 contextual_reg_num_source, contextual_mat_num_source, 12 12 ) 13 from waeup.sirp.payments.interfaces import IPaymentsContainer 13 from waeup.sirp.payments.interfaces import IPaymentsContainer, IOnlinePayment 14 14 15 15 class IStudentsContainer(IWAeUPObject): … … 320 320 """ 321 321 322 class IStudentOnlinePayment(IOnlinePayment): 323 """A student payment via payment gateways. 324 325 """ 326 327 p_session = schema.Choice( 328 title = u'Payment Session', 329 source = academic_sessions_vocab, 330 required = False, 331 ) 332 333 IStudentOnlinePayment['p_session'].order = IStudentOnlinePayment[ 334 'p_item'].order 335 322 336 # Interfaces for students only 323 337 -
main/waeup.sirp/trunk/src/waeup/sirp/students/payments.py
r6875 r6877 21 21 from zope.component.interfaces import IFactory 22 22 from zope.interface import implementedBy 23 from waeup.sirp.students.interfaces import IStudentPaymentsContainer, IStudentNavigation 23 from waeup.sirp.students.interfaces import ( 24 IStudentPaymentsContainer, IStudentNavigation, IStudentOnlinePayment) 24 25 from waeup.sirp.payments import PaymentsContainer, OnlinePayment 25 from waeup.sirp.payments.interfaces import IOnlinePayment26 26 from waeup.sirp.utils.helpers import attrs_to_fields 27 27 … … 44 44 """This is an online payment. 45 45 """ 46 grok.implements(I OnlinePayment, IStudentNavigation)47 grok.provides(I OnlinePayment)46 grok.implements(IStudentOnlinePayment, IStudentNavigation) 47 grok.provides(IStudentOnlinePayment) 48 48 49 49 def __init__(self): -
main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py
r6876 r6877 22 22 23 23 def getPaymentDetails(category, student): 24 #import pdb; pdb.set_trace() 25 session_string = academic_sessions_vocab.by_value[ 26 student['studycourse'].current_session].title 24 p_session = student['studycourse'].current_session 27 25 surcharge_1 = surcharge_2 = surcharge_3 = 0 26 p_item = u'' 28 27 if category == 'transfer': 29 28 amount = 500 30 item = u'Session %s' % session_string31 29 elif category == 'gown': 32 30 amount = 500 33 item = u'Session %s' % session_string34 31 elif category == 'hostel_maintenance': 35 32 amount = 300 36 item = u'Session %s' % session_string37 33 elif category == 'schoolfee': 38 34 surcharge_1 = 1500 # BT amount 39 35 surcharge_2 = 300 # Interswitch amount 40 36 amount = getSchoolFee(student, surcharge_1 + surcharge_2) 41 item = u'Session %s' % session_string 42 return amount, item, surcharge_1, surcharge_2, surcharge_3 37 code = student['studycourse'].certificate.code 38 #session_string = academic_sessions_vocab.by_value[p_session + 1].title 39 p_item = code 40 p_session += 1 41 return amount, p_item, p_session, surcharge_1, surcharge_2, surcharge_3 43 42 44 43 # To be moved to the FUTMinna customization package
Note: See TracChangeset for help on using the changeset viewer.