Changeset 3241 for WAeUP_SRP/uniben


Ignore:
Timestamp:
26 Feb 2008, 22:56:30 (17 years ago)
Author:
Henrik Bettermann
Message:

more adjustments

File:
1 edited

Legend:

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

    r3238 r3241  
    1111"""
    1212Info for the PaymentsFolder
    13 try:
    14     from Products.zdb import set_trace
    15 except:
    16     def set_trace():
    17         pass
    1813"""
    19 
    2014from Products.AdvancedQuery import Eq, Between, Le,In
    2115
     
    2721if mtool.isAnonymousUser():
    2822    return None
     23try:
     24    from Products.zdb import set_trace
     25except:
     26    def set_trace():
     27        pass
    2928
    30 #import logging
    31 #logger = logging.getLogger('Skins.getPaymentsFolderInfo')
    3229def cmp_id(a,b):
    3330    s1 = "%(id)s" % a
     
    6663info['reasons'] = next_info['reasons']
    6764
     65# begin customization
     66
    6867if review_state == 'cleared_and_validated' and session != '07':
    6968    info['payment_method'] = "online_payment"
     
    7372    info['payment_method'] = "sc_payment"
    7473info['prod_id'] = '61'
     74
     75# end customization
    7576
    7677info['student_name'] = student_record.name
     
    9293                                                        payment.date.strftime("%d/%m/%y %H:%M:%S"))
    9394    url = row['url'] = "%s/p%s" % (payments_path,payment.order_id[6:])
    94     row['is_requeryable'] = "%s_%s" % (payment.category,payment.session_id) not in paid_fees or str(member) in ('admin',)
    95     row['is_approvable'] = is_so and row['is_requeryable']
     95    row['is_requeryable'] = "%s_%s" % (payment.category,payment.session_id) not in paid_fees and payment.type == 'online' or str(member) in ('admin',)
     96    row['is_approvable'] = is_so and row['is_requeryable'] and payment.category == 'schoolfee' # does not make sense for maitenance
    9697    row['resp_desc'] = payment.resp_desc or 'Payment Process Interrupted'
    9798    row['trans_ref'] = payment.order_id
     
    99100        row['callback_url'] = "%(url)s/interswitch_cb" % row
    100101#        if payment.category == 'schoolfee':
    101 #            row['callback_url'] = "%(url)s/interswitch_cb" % row 
     102#            row['callback_url'] = "%(url)s/interswitch_cb" % row
    102103#        elif payment.category == 'hostel_maintenance':
    103 #            row['callback_url'] = "%(url)s/interswitch_acco_cb" % row 
     104#            row['callback_url'] = "%(url)s/interswitch_acco_cb" % row
    104105#        else:
    105106        href = '%(query_url)s' % info
     
    115116    payments.append(row)
    116117
    117 
    118 
    119118payments.sort(cmp_id)
    120119info['payments'] = payments
    121 
    122 
    123120return info
    124121
Note: See TracChangeset for help on using the changeset viewer.