Changeset 2386 for WAeUP_SRP/base/skins/waeup_utilities
- Timestamp:
- 18 Oct 2007, 16:37:24 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_utilities/getPaymentStatistic.py
r2366 r2386 27 27 pins = context.portal_pins 28 28 aq_pins = context.portal_pins.evalAdvancedQuery 29 portal = context.portal_catalog_real 29 30 aq_portal = context.portal_catalog_real.evalAdvancedQuery 30 31 request = context.REQUEST … … 36 37 response.write("%s<br>\n\r" % s) 37 38 39 # aso = aq_portal(Eq('portal_type','Payment'))# & In("SearchableText",("approved","Approved"))) 40 # #set_trace() 41 # count = 0 42 # for pp in aso: 43 # count += 1 44 # if count > 1000: 45 # break 46 # indexdata = portal.getIndexDataForRID(pp.getRID()) 47 # rwrite("%s %s %s" % (pp.id,pp.listCreators,indexdata['SearchableText'])) 48 # return 38 49 pbs = pins.uniqueValuesFor('prefix_batch') 39 50 hostel_pbs = [] … … 45 56 46 57 schoolfee_pbs = list(pbs)[:] 47 for pb in application_pbs + hostel_pbs + clearance_pbs :58 for pb in application_pbs + hostel_pbs + clearance_pbs + ['HOS1','HOS2']: 48 59 schoolfee_pbs.remove(pb) 49 60 fees = {} … … 70 81 'prefixes': application_pbs, 71 82 } 72 aso = aq_portal(Eq('portal_type','Payment') & In("SearchableText",("successful",))) 83 aso = aq_portal(Eq('portal_type','Payment') & Eq("SearchableText","approved")) 84 # for pp in aso: 85 # indexdata = portal.getIndexDataForRID(pp.getRID()) 86 # rwrite("%s %s %s" % (pp.id,pp.listCreators,indexdata['SearchableText'])) 73 87 fees['schoolfee_onl'] = {'anz' : len(aso), 74 88 'fee': 1000, … … 76 90 'prefixes': (), 77 91 } 92 aspaysc = aq_portal(Eq('portal_type','Payment') &\ 93 Eq("SearchableText","payment") &\ 94 Eq("SearchableText","successful")) 95 rwrite("*"*80) 96 # for pp in aspaysc: 97 # indexdata = portal.getIndexDataForRID(pp.getRID()) 98 # rwrite("%s %s %s" % (pp.id,pp.listCreators,indexdata['SearchableText'])) 99 fees['schoolfee_paysc'] = {'anz' : len(aspaysc), 100 'fee': 1000, 101 'title': 'Schoolfee (sc in payments)', 102 'prefixes': (), 103 } 78 104 #assc = [pin for pin in aq_pins(In('prefix_batch', schoolfee_pbs)) if pin.student] 79 105 assc = aq_pins(In('prefix_batch', schoolfee_pbs) & missing_query) 80 106 fees['schoolfee_scratch'] = {'anz' : len(assc), 81 'fee': 1000,82 'title': 'Schoolfee (Scratchcard )',107 'fee': 0, 108 'title': 'Schoolfee (Scratchcard counting)', 83 109 'prefixes': schoolfee_pbs, 84 110 }
Note: See TracChangeset for help on using the changeset viewer.