Changeset 1378 for WAeUP_SRP


Ignore:
Timestamp:
30 Jan 2007, 18:55:59 (18 years ago)
Author:
Henrik Bettermann
Message:

remove 'transfer_' from type_code again

Location:
WAeUP_SRP/trunk/skins
Files:
1 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/request_transfer.py

    r1371 r1378  
    9898info['amount'] = "n/a"
    9999pin = info['order_id'] = ds.get('pin')
    100 info['type_code'] = "transfer_%s" % pin
     100info['type_code'] = "%s" % pin
    101101info['type_description'] = 'Transfer Form for Session 2006/2007'
    102102info['resp_code'] = "SC"
  • WAeUP_SRP/trunk/skins/waeup_utilities/fixScratchCardPayments.py

    r1373 r1378  
    2929for brain in payments:
    3030    d = {}
    31     d['resp_code'] = "SC"
    32     d['resp_desc'] = "SC Payment Successful"
     31#    d['resp_code'] = "SC"
     32#    d['resp_desc'] = "SC Payment Successful"
    3333    payment = brain.getObject()
    3434    pay_doc = payment.getContent()
    35     if pay_doc.type_description.startswith('School Fee SC'):
    36         d['type_description'] = 'School Fee for Session 2006/2007'
     35#    if pay_doc.type_description.startswith('School Fee'):
     36#        d['type_description'] = 'School Fee for Session 2006/2007'
     37#        pay_doc.edit(mapping=d)
     38#        list.append('%s changed' % pay_doc.type_description)
     39    if pay_doc.type_code.startswith('transfer'):
     40#        d['type_description'] = 'Transfer Form for Session 2006/2007'
     41        old = pay_doc.type_code
     42        d['type_code'] = old.replace('transfer_','')
    3743        pay_doc.edit(mapping=d)
    38         list.append('%s changed' % pay_doc.type_description)
    39     elif pay_doc.type_description.startswith('Transfer Form SC'):
    40         d['type_description'] = 'Transfer Form for Session 2006/2007'
    41         d['type_code'] = pay_doc.type_code.replace('transfer_','')
    42         pay_doc.edit(mapping=d)
    43         list.append('%s changed' % pay_doc.type_description)
     44        list.append('%s changed to %s' % (old,d['type_code']))
    4445return '\n'.join(list)
Note: See TracChangeset for help on using the changeset viewer.