Changeset 16003 for main/waeup.aaue/trunk/src/waeup/aaue
- Timestamp:
- 13 Feb 2020, 17:53:17 (5 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/applicants/browser.py
r15994 r16003 27 27 IExtFileStore, IFileStoreNameChooser, IKofaUtils) 28 28 from zope.formlib.textwidgets import BytesDisplayWidget 29 from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget 29 30 from waeup.kofa.utils.helpers import string_from_bytes, file_size 30 31 from waeup.kofa.applicants.browser import ( 31 ApplicantCheckStatusPage, ApplicantBaseDisplayFormPage,32 ApplicantCheckStatusPage, 32 33 AdditionalFile) 33 34 from waeup.kofa.applicants.workflow import STARTED, PAID … … 58 59 IFedexRequest, 59 60 IRecruitment, 61 ICustomApplicantOnlinePayment, 60 62 ) 61 63 … … 252 254 form_fields = grok.AutoFields(IFedexRequest).omit( 253 255 'locked', 'suspended') 256 return form_fields 254 257 if self.target is not None and self.target == 'rec': 255 258 form_fields = grok.AutoFields(IRecruitment).omit( … … 343 346 return '<br /><br />' + note 344 347 if self.target is not None and self.target in ( 345 'trans', 'cert', 'ver', 'send' ):348 'trans', 'cert', 'ver', 'send', 'fedex'): 346 349 return 347 350 if self.context.sex == 'm': … … 382 385 elif self.target is not None and self.target == 'cert': 383 386 form_fields = grok.AutoFields(ICertificateRequest).omit( 387 'locked', 'suspended') 388 elif self.target is not None and self.target == 'fedex': 389 form_fields = grok.AutoFields(IFedexRequest).omit( 384 390 'locked', 'suspended') 385 391 else: … … 650 656 return '' 651 657 658 class ApplicantBaseDisplayFormPage(CustomApplicantDisplayFormPage): 659 grok.context(ICustomApplicant) 660 grok.name('base') 661 662 @property 663 def form_fields(self): 664 if self.context.__parent__.prefix in ('fedex',): 665 form_fields = grok.AutoFields(IFedexRequest).select( 666 'applicant_id', 'trans_id', 'email',) 667 else: 668 form_fields = grok.AutoFields(ICustomApplicant).select( 669 'applicant_id', 'reg_number', 'email', 'course1') 670 if self.context.__parent__.prefix in ('special',): 671 form_fields['reg_number'].field.title = u'Identification Number' 672 return form_fields 673 return form_fields 674 652 675 class CustomExportPDFPaymentSlipPage(NigeriaExportPDFPaymentSlipPage): 676 677 form_fields = grok.AutoFields(ICustomApplicantOnlinePayment).omit( 678 'ac', 'provider_amt', 'gateway_amt', 'thirdparty_amt', 'p_item', 679 'p_split_data') 680 form_fields['creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') 681 form_fields['payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') 653 682 654 683 @property 655 684 def payment_slip_download_warning(self): 656 685 return '' 686 687 def render(self): 688 if self.payment_slip_download_warning: 689 self.flash(self.payment_slip_download_warning, type='danger') 690 self.redirect(self.url(self.context)) 691 return 692 applicantview = ApplicantBaseDisplayFormPage(self.context.__parent__, 693 self.request) 694 students_utils = getUtility(IStudentsUtils) 695 return students_utils.renderPDF(self,'payment_slip.pdf', 696 self.context.__parent__, applicantview, note=self.note) 657 697 658 698 class CustomApplicantCheckStatusPage(ApplicantCheckStatusPage): -
main/waeup.aaue/trunk/src/waeup/aaue/interswitch/browser.py
r15992 r16003 143 143 elif self.applicant.__parent__.prefix == 'fedex': 144 144 provider_amt = 0.0 145 self.institution_acct = ' 1010041670'146 self.institution_bank_id = '1 17'145 self.institution_acct = '0001115694' 146 self.institution_bank_id = '10' 147 147 xmldict = {} 148 148 xmldict['detail_ref'] = self.context.p_id … … 178 178 <item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" /> 179 179 <item_detail item_id="2" item_name="%(provider_item_name)s" item_amt="%(provider_amt)d" bank_id="%(provider_bank_id)s" acct_num="%(provider_acct)s" /> 180 <item_detail item_id="3" item_name="FedEx" item_amt="%(fedex_amt)d" bank_id="1 17" acct_num="1010041670" />180 <item_detail item_id="3" item_name="FedEx" item_amt="%(fedex_amt)d" bank_id="10" acct_num="0001115694" /> 181 181 </item_details> 182 182 </payment_item_detail>""" % xmldict
Note: See TracChangeset for help on using the changeset viewer.