Changeset 17246 for main/kofacustom.nigeria/trunk/src
- Timestamp:
- 28 Dec 2022, 09:57:26 (23 months ago)
- Location:
- main/kofacustom.nigeria/trunk/src/kofacustom/nigeria
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/payments/interfaces.py
r17242 r17246 18 18 from zope.interface import Attribute 19 19 from zope import schema 20 from waeup.kofa.interfaces import SimpleKofaVocabulary 20 from waeup.kofa.interfaces import ( 21 SimpleKofaVocabulary, ContextualDictSourceFactoryBase) 21 22 from waeup.kofa.payments.interfaces import IPayment 22 23 from kofacustom.nigeria.interfaces import MessageFactory as _ 24 25 class CurrencySymbolSource(ContextualDictSourceFactoryBase): 26 """A payment category source delivers all categories of payments. 27 28 """ 29 DICT_NAME = 'CURRENCY_DICT' 23 30 24 31 class INigeriaOnlinePayment(IPayment): … … 56 63 57 64 # Only defined in kofacustom.nigeria package 65 66 p_currency = schema.Choice( 67 title = _(u'Currency'), 68 source = CurrencySymbolSource(), 69 required = False, 70 default = 'NGN', 71 ) 58 72 59 73 r_pay_reference = schema.TextLine( … … 125 139 INigeriaOnlinePayment['net_amt'].order = INigeriaOnlinePayment[ 126 140 'amount_auth'].order 141 INigeriaOnlinePayment['p_currency'].order = INigeriaOnlinePayment[ 142 'amount_auth'].order -
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/tests/test_export.py
r17242 r17246 123 123 result = open(self.outfile, 'rb').read() 124 124 self.assertMatches( 125 'ac,amount_auth,creation_date,gateway_amt,net_amt,p_category,p_combi,p_curren t,'125 'ac,amount_auth,creation_date,gateway_amt,net_amt,p_category,p_combi,p_currency,p_current,' 126 126 'p_id,p_item,p_level,p_option,p_session,p_split_data,p_state,payment_date,provider_amt,' 127 127 'r_amount_approved,r_card_num,r_code,r_company,r_desc,' 128 128 'r_pay_reference,r_payment_link,thirdparty_amt,student_id,state,' 129 129 'current_session\r\n' 130 '666,12.12,2012-04-01 13:12:01#,,,schoolfee,[], 1,my-id,p-item,'130 '666,12.12,2012-04-01 13:12:01#,,,schoolfee,[],,1,my-id,p-item,' 131 131 '100,,%s,,paid,2012-04-01 14:12:01#,,12.12,' 132 132 '789,r-code,interswitch,,,,,A111111,created,2012\r\n' % (curr_year-6), … … 189 189 result, 190 190 'ac,amount_auth,creation_date,formatted_p_date,gateway_amt,net_amt,' 191 'p_category,p_combi,p_curren t,p_id,p_item,p_level,p_option,p_session,p_split_data,p_state,'191 'p_category,p_combi,p_currency,p_current,p_id,p_item,p_level,p_option,p_session,p_split_data,p_state,' 192 192 'payment_date,provider_amt,r_amount_approved,r_card_num,r_code,' 193 193 'r_company,r_desc,r_pay_reference,r_payment_link,thirdparty_amt,student_id,' … … 195 195 'current_session,entry_session,entry_mode,faccode,depcode,certcode,lga\r\n' 196 196 197 '666,12.12,%s-04-01 13:12:01#,,,,schoolfee,[], 1,my-id,p-item,'197 '666,12.12,%s-04-01 13:12:01#,,,,schoolfee,[],,1,my-id,p-item,' 198 198 '100,,%s,,paid,%s-04-01 14:12:01#,,12.12,,r-code,,,,,,A111111,' 199 199 '234,123,Anna,M.,Tester,f,created,2012,2010,ug_ft,NA,NA,CERT1,\r\n' -
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/utils/utils.py
r16922 r17246 363 363 } 364 364 365 CURRENCY_DICT = { 366 'NGN': u"\N{naira sign} (Naira)", 367 'EUR': u"\N{euro sign} (Euro)", 368 'USD': u"\N{dollar sign} (US Dollar)", 369 'GBP': u"\N{pound sign} (Pound Sterling)", 370 } 371 365 372 @property 366 373 def tzinfo(self):
Note: See TracChangeset for help on using the changeset viewer.