Show
Ignore:
Timestamp:
07/27/05 15:17:28 (19 years ago)
Author:
jerome
Message:

Fixed an LDAP filtering problem when several billing codes were passed on pkbcodes' command line.
The unknown_billingcode directive now works as expected.
The billing code's page counter and balance are updated when printing.
Severity : If you need full management of billing codes, this is for you.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/storages/ldapstorage.py

    r2386 r2388  
    14201420        """Returns the list of all billing codes which match a certain pattern.""" 
    14211421        codes = [] 
    1422         result = self.doSearch("(&(objectClass=pykotaBilling)%s)" % "".join(["(pykotaBillingCode=%s)" % self.userCharsetToDatabase(bcode) for bcode in billingcodepattern.split(",")]), \ 
     1422        result = self.doSearch("(&(objectClass=pykotaBilling)(|%s))" % "".join(["(pykotaBillingCode=%s)" % self.userCharsetToDatabase(bcode) for bcode in billingcodepattern.split(",")]), \ 
    14231423                                ["pykotaBillingCode", "description", "pykotaPageCounter", "pykotaBalance"], \ 
    14241424                                base=self.info["billingcodebase"]) 
     
    14371437        return codes         
    14381438         
    1439     def setBillingCodeValues(self, code, newbalance, newpagecounter) :     
     1439    def setBillingCodeValues(self, code, newpagecounter, newbalance) : 
    14401440        """Sets the new page counter and balance for a billing code.""" 
    14411441        fields = { 
     
    14451445        return self.doModify(code.ident, fields)          
    14461446        
    1447     def consumeBillingCode(self, code, balance, pagecounter) : 
     1447    def consumeBillingCode(self, code, pagecounter, balance) : 
    14481448        """Consumes from a billing code.""" 
    14491449        fields = {