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/sql.py

    r2374 r2388  
    495495        self.doModify("UPDATE billingcodes SET description=%s WHERE id=%s" % (self.doQuote(self.userCharsetToDatabase(code.Description or "")), self.doQuote(code.ident))) 
    496496        
    497     def setBillingCodeValues(self, code, newbalance, newpagecounter) :     
     497    def setBillingCodeValues(self, code, newpagecounter, newbalance) :     
    498498        """Sets the new page counter and balance for a billing code.""" 
    499499        self.doModify("UPDATE billingcodes SET balance=%s, pagecounter=%s WHERE id=%s" % (self.doQuote(newbalance), self.doQuote(newpagecounter), self.doQuote(code.ident))) 
    500500        
    501     def consumeBillingCode(self, code, balance, pagecounter) : 
     501    def consumeBillingCode(self, code, pagecounter, balance) : 
    502502        """Consumes from a billing code.""" 
    503503        self.doModify("UPDATE billingcodes SET balance=balance + %s, pagecounter=pagecounter + %s WHERE id=%s" % (self.doQuote(balance), self.doQuote(pagecounter), self.doQuote(code.ident)))