Changeset 13414 for main/waeup.aaue/trunk/src/waeup/aaue
- Timestamp:
- 9 Nov 2015, 07:08:21 (9 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/interswitch/browser.py
r13410 r13414 49 49 50 50 51 def dynamic_gateway_amt(fee): 52 return GATEWAY_AMT 51 def gateway_net_amt(fee): 52 if fee > GATEWAY_AMT: 53 return fee - GATEWAY_AMT 54 return 0.0 53 55 54 56 def contr_agreement(student): … … 87 89 xmldict['provider_bank_id'] = PROVIDER_BANK_ID 88 90 xmldict['provider_item_name'] = PROVIDER_ITEM_NAME 89 xmldict['institution_amt'] = 100 * (self.context.amount_auth - provider_amt - GATEWAY_AMT) 91 xmldict['institution_amt'] = 100 * ( 92 self.context.amount_auth - provider_amt - GATEWAY_AMT) 90 93 xmldict['institution_item_name'] = self.context.p_category 91 94 xmldict['institution_name'] = INSTITUTION_NAME … … 189 192 joint_venture_amt = 1100.0 190 193 aaue_share_amt = 1000.0 191 student_union_due_amt = academic_session.union_fee - \192 dynamic_gateway_amt(academic_session.union_fee)193 student_welfare_assurance_amt = academic_session.welfare_fee - \194 dynamic_gateway_amt(academic_session.welfare_fee)194 student_union_due_amt = gateway_net_amt( 195 academic_session.union_fee) 196 student_welfare_assurance_amt = gateway_net_amt( 197 academic_session.welfare_fee) 195 198 xmldict['institution_bank_id'] = '7' 196 199 xmldict['institution_acct'] = '1014847058' … … 204 207 joint_venture_amt = 1000.0 205 208 aaue_share_amt = 1500.0 206 student_union_due_amt = academic_session.union_fee - \207 dynamic_gateway_amt(academic_session.union_fee)208 student_welfare_assurance_amt = academic_session.welfare_fee - \209 dynamic_gateway_amt(academic_session.welfare_fee)209 student_union_due_amt = gateway_net_amt( 210 academic_session.union_fee) 211 student_welfare_assurance_amt = gateway_net_amt( 212 academic_session.welfare_fee) 210 213 xmldict['institution_bank_id'] = '117' 211 214 xmldict['institution_acct'] = '1010827641' … … 220 223 xmldict['student_welfare_assurance_amt'] = 100 * student_welfare_assurance_amt 221 224 xmldict['institution_amt'] = 100 * ( 222 self.context.amount_auth225 gateway_net_amt(self.context.amount_auth) 223 226 - provider_amt 224 227 - joint_venture_amt 225 228 - aaue_share_amt 226 229 - student_union_due_amt 227 - student_welfare_assurance_amt 228 - dynamic_gateway_amt(self.context.amount_auth)) 230 - student_welfare_assurance_amt) 229 231 xmltext = """<payment_item_detail> 230 232 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> … … 240 242 # Schoolfee without additional fees 241 243 xmldict['institution_amt'] = 100 * ( 242 self.context.amount_auth244 gateway_net_amt(self.context.amount_auth) 243 245 - provider_amt 244 246 - joint_venture_amt 245 - aaue_share_amt 246 - dynamic_gateway_amt(self.context.amount_auth)) 247 - aaue_share_amt) 247 248 xmltext = """<payment_item_detail> 248 249 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> … … 273 274 if self.context.p_category.endswith('_incl'): 274 275 # Clearance including additional fees 275 gown_fee_amt = academic_session.matric_gown_fee - \ 276 dynamic_gateway_amt(academic_session.matric_gown_fee) 277 aaue_fl_fee_amt = academic_session.lapel_fee - \ 278 dynamic_gateway_amt(academic_session.lapel_fee) 276 gown_fee_amt = gateway_net_amt(academic_session.matric_gown_fee) 277 aaue_lf_fee_amt = gateway_net_amt(academic_session.lapel_fee) 279 278 xmldict['gown_fee_amt'] = 100 * gown_fee_amt 280 xmldict['aaue_ fl_fee_amt'] = 100 * aaue_fl_fee_amt279 xmldict['aaue_lf_fee_amt'] = 100 * aaue_lf_fee_amt 281 280 xmldict['institution_amt'] = 100 * ( 282 self.context.amount_auth281 gateway_net_amt(self.context.amount_auth) 283 282 - gown_fee_amt 284 - aaue_fl_fee_amt 285 - dynamic_gateway_amt(self.context.amount_auth)) 283 - aaue_lf_fee_amt) 286 284 xmltext = """<payment_item_detail> 287 285 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 288 286 <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" /> 289 287 <item_detail item_id="2" item_name="Matriculation Gown Fee" item_amt="%(gown_fee_amt)d" bank_id="51" acct_num="5060020947" /> 290 <item_detail item_id="3" item_name="AAU File-Lapel Fee" item_amt="%(aaue_ fl_fee_amt)d" bank_id="51" acct_num="4010660109" />288 <item_detail item_id="3" item_name="AAU File-Lapel Fee" item_amt="%(aaue_lf_fee_amt)d" bank_id="51" acct_num="4010660109" /> 291 289 </item_details> 292 290 </payment_item_detail>""" % xmldict … … 295 293 # Clearance without additional fees 296 294 xmldict['institution_amt'] = 100 * ( 297 self.context.amount_auth 298 - dynamic_gateway_amt(self.context.amount_auth)) 295 gateway_net_amt(self.context.amount_auth)) 299 296 xmltext = """<payment_item_detail> 300 297 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> … … 309 306 xmldict['institution_bank_id'] = '123' 310 307 xmldict['institution_amt'] = 100 * ( 311 self.context.amount_auth - 312 dynamic_gateway_amt(self.context.amount_auth)) 308 gateway_net_amt(self.context.amount_auth)) 313 309 xmltext = """<payment_item_detail> 314 310 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> … … 323 319 xmldict['institution_bank_id'] = '51' 324 320 xmldict['institution_amt'] = 100 * ( 325 self.context.amount_auth - 326 dynamic_gateway_amt(self.context.amount_auth)) 321 gateway_net_amt(self.context.amount_auth)) 327 322 xmltext = """<payment_item_detail> 328 323 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> … … 337 332 xmldict['institution_bank_id'] = '123' 338 333 xmldict['institution_amt'] = 100 * ( 339 self.context.amount_auth - 340 dynamic_gateway_amt(self.context.amount_auth)) 334 gateway_net_amt(self.context.amount_auth)) 341 335 xmltext = """<payment_item_detail> 342 336 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> … … 351 345 xmldict['institution_bank_id'] = '51' 352 346 xmldict['institution_amt'] = 100 * ( 353 self.context.amount_auth - 354 dynamic_gateway_amt(self.context.amount_auth)) 347 gateway_net_amt(self.context.amount_auth)) 355 348 xmltext = """<payment_item_detail> 356 349 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> … … 365 358 xmldict['institution_bank_id'] = '117' 366 359 xmldict['institution_amt'] = 100 * ( 367 self.context.amount_auth - 368 dynamic_gateway_amt(self.context.amount_auth)) 360 gateway_net_amt(self.context.amount_auth)) 369 361 xmltext = """<payment_item_detail> 370 362 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> … … 379 371 xmldict['institution_bank_id'] = '123' 380 372 xmldict['institution_amt'] = 100 * ( 381 self.context.amount_auth - 382 dynamic_gateway_amt(self.context.amount_auth)) 373 gateway_net_amt(self.context.amount_auth)) 383 374 xmltext = """<payment_item_detail> 384 375 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> -
main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py
r13410 r13414 53 53 ICustomStudentPersonalEdit, 54 54 ICustomUGStudentClearance) 55 from waeup.aaue.interswitch.browser import dynamic_gateway_amt55 from waeup.aaue.interswitch.browser import gateway_net_amt 56 56 from waeup.aaue.interfaces import MessageFactory as _ 57 57 … … 145 145 text += '250.0 Naira Transaction Charge' 146 146 if self.context.p_category == 'schoolfee_incl' and academic_session: 147 welfare_fee = academic_session.welfare_fee - dynamic_gateway_amt( 148 academic_session.welfare_fee) 149 union_fee = academic_session.union_fee - dynamic_gateway_amt( 150 academic_session.union_fee) 147 welfare_fee = gateway_net_amt(academic_session.welfare_fee) 148 union_fee = gateway_net_amt(academic_session.union_fee) 151 149 text += (', %s Naira Student Welfare Assurance Fee and %s Naira Students\' Union Dues' 152 150 % (welfare_fee, union_fee)) 153 151 elif self.context.p_category in ( 154 152 'clearance_incl', 'clearance_medical_incl') and academic_session: 155 matric_gown_fee = academic_session.matric_gown_fee - dynamic_gateway_amt( 156 academic_session.matric_gown_fee) 157 lapel_fee = academic_session.lapel_fee - dynamic_gateway_amt( 158 academic_session.lapel_fee) 153 matric_gown_fee = gateway_net_amt(academic_session.matric_gown_fee) 154 lapel_fee = gateway_net_amt(academic_session.lapel_fee) 159 155 text += (', %s Naira Matriculation Gown Fee and %s Naira Lapel/File Fee' 160 156 % (matric_gown_fee, lapel_fee)) -
main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py
r13413 r13414 24 24 from waeup.kofa.accesscodes import create_accesscode 25 25 from waeup.kofa.students.utils import trans 26 from waeup.aaue.interswitch.browser import dynamic_gateway_amt26 from waeup.aaue.interswitch.browser import gateway_net_amt 27 27 from waeup.aaue.interfaces import MessageFactory as _ 28 28 … … 145 145 # Otherwise we can't add somtehing 146 146 amount = 0.0 147 amount += academic_session.matric_gown_fee + \ 148 academic_session.lapel_fee - \ 149 dynamic_gateway_amt(academic_session.matric_gown_fee) -\ 150 dynamic_gateway_amt(academic_session.lapel_fee) 147 amount += gateway_net_amt(academic_session.matric_gown_fee) + \ 148 gateway_net_amt(academic_session.lapel_fee) 151 149 elif category == 'late_registration': 152 150 amount = academic_session.late_registration_fee … … 183 181 # Otherwise we can't add somtehing 184 182 amount = 0.0 185 amount += academic_session.welfare_fee + \ 186 academic_session.union_fee - \ 187 dynamic_gateway_amt(academic_session.welfare_fee) -\ 188 dynamic_gateway_amt(academic_session.union_fee) 183 amount += gateway_net_amt(academic_session.welfare_fee) + \ 184 gateway_net_amt(academic_session.union_fee) 189 185 if amount in (0.0, None): 190 186 return _(u'Amount could not be determined.'), None
Note: See TracChangeset for help on using the changeset viewer.