Ignore:
Timestamp:
7 Mar 2008, 07:28:18 (17 years ago)
Author:
Henrik Bettermann
Message:
 
File:
1 edited

Legend:

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

    r3260 r3276  
    7878payments_path = "%s/campus/students/%s/payments" % (context.portal_url(),student_id)
    7979payments = []
    80 payment_records = aq_payments(Eq('student_id',student_id))      # & Eq('session_id',student_record.session))
     80payment_records = aq_payments(Eq('student_id',student_id)) # & Eq('session_id',student_record.session))
    8181vocabularies = context.portal_vocabularies
    8282paid_fees = []
     
    8888    row = {}
    8989    row['id'] = payment.key
    90     row['title'] = "%s for Session %s, Naira %s, %s" % (vocabularies.payment_categories.get(payment.category),
    91                                                         vocabularies.sessions.get(payment.session_id),
    92                                                         payment.amount,
    93                                                         payment.date.strftime("%d/%m/%y %H:%M:%S"))
     90    if payment.status == 'invalid':
     91        row['title'] = "Invalid Payment, Naira %s, %s" % (payment.amount,
     92                                                          payment.date.strftime("%d/%m/%y %H:%M:%S"))   
     93    else:                                                         
     94        row['title'] = "%s for Session %s, Naira %s, %s" % (vocabularies.payment_categories.get(payment.category),
     95                                                            vocabularies.sessions.get(payment.session_id),
     96                                                            payment.amount,
     97                                                            payment.date.strftime("%d/%m/%y %H:%M:%S"))
    9498    url = row['url'] = "%s/p%s" % (payments_path,payment.order_id[6:])
    9599    row['is_requeryable'] = "%s_%s" % (payment.category,payment.session_id) not in paid_fees and payment.type == 'online' or str(member) in ('admin',)
Note: See TracChangeset for help on using the changeset viewer.