Changeset 2943 for WAeUP_SRP/fceokene


Ignore:
Timestamp:
13 Dec 2007, 15:02:19 (17 years ago)
Author:
Henrik Bettermann
Message:

make hostel payments requeryable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/fceokene/waeup_custom/getPaymentsFolderInfo.py

    r2910 r2943  
    4343student = getattr(students,student_id)
    4444student_record = context.students_catalog.getRecordByKey(student_id)
    45 context['updatePayments']()
     45#context['updatePayments']()
    4646payments = []
    4747
     
    8989        row['is_approvable'] = is_so and (review_state == "opened") and info['review_state'] in ('cleared_and_validated','returning')
    9090    else:
    91         row['is_approvable'] = is_so and (review_state == "opened")
     91        row['is_approvable'] = False    # is_so and (review_state == "opened")
    9292    row['is_requeryable'] = False
    9393    #set_trace()
     
    105105            href += '&redirectURL=%(callback_url)s' % row
    106106            row['href'] = href
     107    elif so_doc.type_description.startswith('Hostel'):
     108        if (review_state == 'opened' and \
     109                                  hasattr(so_doc, 'order_id') and not so_doc.resp_code) or str(member) in ('admin',):
     110            row['is_requeryable'] = True
     111            row['callback_url'] = "%s/payments/%s/interswitch_cb" % (student.absolute_url(),
     112                                                            so.getId)
     113            href = '%(query_url)s' % info
     114            href += '?transRef=%(trans_ref)s' % row
     115            href += '&prodID=%(prod_id)s' % info
     116            href += '&redirectURL=%(callback_url)s' % row
     117            row['href'] = href             
    107118    if (review_state == "closed") and so_doc.resp_code in ('SC','00','AP','IP',):
    108119        row['confirmed'] = 'active'
Note: See TracChangeset for help on using the changeset viewer.