Changeset 2391 for WAeUP_SRP


Ignore:
Timestamp:
19 Oct 2007, 09:24:16 (17 years ago)
Author:
joachim
Message:

current version (NOT in custom)

File:
1 edited

Legend:

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

    r2387 r2391  
    3737    response.write("%s<br>\n\r" % s)
    3838
    39 # aso = aq_portal(Eq('portal_type','Payment'))# & In("SearchableText",("approved","Approved")))
     39# aso = aq_portal(Eq('portal_type','Payment') &\
     40#                 #Eq('review_state','closed') &\
     41#                 ~Eq("SearchableText",'sc') &\
     42#                 ~Eq("SearchableText",'approved') &\
     43#                 ~Eq("SearchableText",'incomplete') &\
     44#                 ~Eq("SearchableText",'invalid') &\
     45#                 ~Eq("SearchableText",'incorrect') &\
     46#                 ~Eq("SearchableText",'card') &\
     47#                 ~Eq("SearchableText",'error') &\
     48#                 ~Eq("SearchableText",'channels') &\
     49#                 ~Eq("SearchableText",'exceeded') &\
     50#                 ~Eq("SearchableText",'insufficient'))
    4051# #set_trace()
    4152# count = 0
     53# rwrite("total: %d" % len(aso))
    4254# for pp in aso:
    4355#     count += 1
     
    4759#     rwrite("%s %s %s" % (pp.id,pp.listCreators,indexdata['SearchableText']))
    4860# return
     61
    4962pbs = pins.uniqueValuesFor('prefix_batch')
    5063hostel_pbs = []
     
    8396                  'prefixes': application_pbs,
    8497                 }
    85 aso = aq_portal(Eq('portal_type','Payment') & Eq("SearchableText","approved"))
     98aso_query = Eq('portal_type','Payment') & Eq("SearchableText","approved")
     99aso = aq_portal(aso_query)
    86100# for pp in aso:
    87101#     indexdata = portal.getIndexDataForRID(pp.getRID())
     
    92106                  'prefixes': (),
    93107                 }
    94 aspaysc = aq_portal(Eq('portal_type','Payment') &\
     108aspaysc_query = Eq('portal_type','Payment') &\
    95109                    Eq("SearchableText","payment") &\
    96110                    Eq("SearchableText","successful") &\
    97111                    ~ Eq("SearchableText","transfer")
    98                    )
     112
     113aspaysc = aq_portal(aspaysc_query)
    99114#rwrite("*"*80)
    100115# for pp in aspaysc:
     
    104119                 'fee': 1000,
    105120                 'title': 'Schoolfee (sc in payments)',
     121                  'prefixes': (),
     122                 }
     123not_query = ~aso_query & ~aspaysc_query
     124not_res = aq_portal(aspaysc_query)
     125fees['schoolfee_not'] = {'anz' : len(not_res),
     126                 'fee': 0,
     127                 'title': 'Not Schoolfee',
    106128                  'prefixes': (),
    107129                 }
Note: See TracChangeset for help on using the changeset viewer.