Changeset 2342 for pykota/trunk/pykota/storage.py
- Timestamp:
- 07/06/05 20:11:00 (19 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/storage.py
r2340 r2342 431 431 self.Exists = 0 432 432 433 def reset(self, pagecounter=0, balance=0.0) :433 def reset(self, balance=0.0, pagecounter=0) : 434 434 """Resets the pagecounter and balance for this billing code.""" 435 self.parent.setBillingCodeValues(self, pagecounter, balance) 435 self.parent.setBillingCodeValues(self, balance, pagecounter) 436 self.Balance = balance 436 437 self.PageCounter = pagecounter 437 self.Balance = balance438 438 439 439 def setDescription(self, description=None) : … … 464 464 if self.usecache : 465 465 self.tool.logdebug("Caching enabled.") 466 self.caches = { "USERS" : {}, "GROUPS" : {}, "PRINTERS" : {}, "USERPQUOTAS" : {}, "GROUPPQUOTAS" : {}, "JOBS" : {}, "LASTJOBS" : {} }466 self.caches = { "USERS" : {}, "GROUPS" : {}, "PRINTERS" : {}, "USERPQUOTAS" : {}, "GROUPPQUOTAS" : {}, "JOBS" : {}, "LASTJOBS" : {}, "BILLINGCODES" : {} } 467 467 468 468 def close(self) : … … 539 539 self.cacheEntry("LASTJOBS", printer.Name, lastjob) 540 540 return lastjob 541 542 def getBillingCode(self, label) : 543 """Returns the user from cache.""" 544 code = self.getFromCache("BILLINGCODES", label) 545 if code is None : 546 code = self.getBillingCodeFromBackend(label) 547 self.cacheEntry("BILLINGCODES", label, code) 548 return code 541 549 542 550 def getParentPrinters(self, printer) :