Changeset 2366 for WAeUP_SRP/base/skins


Ignore:
Timestamp:
16 Oct 2007, 06:43:01 (17 years ago)
Author:
joachim
Message:

add counted prefixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_utilities/getPaymentStatistic.py

    r2365 r2366  
    5454                 'fee': 500,
    5555                 'title': 'Hostel Maintainance',
     56                  'prefixes': hostel_pbs,
    5657                 }
    5758#ac = [pin for pin in aq_pins(In('prefix_batch', clearance_pbs)) if pin.student]
    5859ac = aq_pins(In('prefix_batch', clearance_pbs)& missing_query)
    5960fees['clearance'] = {'anz': len(ac),
    60                  'fee': 250,
    61                  'title': 'Clearance',
     61                     'fee': 250,
     62                     'title': 'Clearance',
     63                     'prefixes': clearance_pbs,
    6264                 }
    6365#aa = [pin for pin in aq_pins(In('prefix_batch', application_pbs)) if pin.student]
     
    6668                 'fee': 200,
    6769                 'title': 'Application',
     70                  'prefixes': application_pbs,
    6871                 }
    6972aso = aq_portal(Eq('portal_type','Payment') & In("SearchableText",("successful",)))
     
    7174                 'fee': 1000,
    7275                 'title': 'Schoolfee (online)',
     76                  'prefixes': (),
    7377                 }
    7478#assc = [pin for pin in aq_pins(In('prefix_batch', schoolfee_pbs)) if pin.student]
     
    7781                 'fee': 1000,
    7882                 'title': 'Schoolfee (Scratchcard)',
     83                  'prefixes': schoolfee_pbs,
    7984                 }
    8085rwrite("Payed fees")
    8186total = 0
    82 for fee in fees.values():
     87keys = fees.keys()
     88keys.sort()
     89for key in keys:
     90    fee = fees[key]
    8391    t = fee['value'] = fee['anz'] * fee['fee']
    8492    total += t
    85     rwrite("%(title)s fees %(anz)d = %(value)d (%(fee)d N)" % fee)
     93    rwrite("%(title)s fees %(anz)d = %(value)d (%(fee)d N %(prefixes)s)" % fee)
    8694gt = float(total)/1000000
    8795rwrite("Total %10.2f Million N" % gt)
Note: See TracChangeset for help on using the changeset viewer.