Changeset 2686 for pykota/trunk/pykota/storage.py
- Timestamp:
- 02/12/06 13:32:53 (18 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/storage.py
r2676 r2686 164 164 raise AttributeError, name 165 165 166 def save(self) : 167 """Saves the billing code to disk in a single operation.""" 168 if self.isDirty : 169 self.parent.savePrinter(self) 170 self.isDirty = False 171 166 172 def addJobToHistory(self, jobid, user, pagecounter, action, jobsize=None, jobprice=None, filename=None, title=None, copies=None, options=None, clienthost=None, jobsizebytes=None, jobmd5sum=None, jobpages=None, jobbilling=None, precomputedsize=None, precomputedprice=None) : 167 173 """Adds a job to the printer's history.""" … … 190 196 else : 191 197 self.PricePerJob = float(priceperjob) 192 self. parent.writePrinterPrices(self)198 self.isDirty = True 193 199 194 200 def setDescription(self, description=None) : … … 198 204 else : 199 205 self.Description = str(description) 200 self.parent.writePrinterDescription(self) 206 self.isDirty = True 207 208 def setPassThrough(self, passthrough) : 209 """Sets the printer's passthrough mode.""" 210 self.PassThrough = passthrough 211 self.isDirty = True 212 213 def setMaxJobSize(self, maxjobsize) : 214 """Sets the printer's maximal job size.""" 215 self.MaxJobSize = maxjobsize 216 self.isDirty = True 201 217 202 218 def delete(self) : … … 218 234 if v.Printer.Name == self.Name : 219 235 self.parent.flushEntry("GROUPPQUOTAS", "%s@%s" % (v.Group.Name, v.Printer.Name)) 220 self.Exists = 0 236 self.isDirty = False 237 self.Exists = False 221 238 222 239 class StorageUserPQuota(StorageObject) : … … 453 470 self.parent.deleteBillingCode(self) 454 471 self.parent.flushEntry("BILLINGCODES", self.BillingCode) 472 self.isDirty = False 455 473 self.Exists = False 456 self.isDirty = False457 474 458 475 def reset(self, balance=0.0, pagecounter=0) : 459 476 """Resets the pagecounter and balance for this billing code.""" 460 if self.Balance != balance : 461 self.Balance = balance 462 self.isDirty = True 463 if self.PageCounter != pagecounter : 464 self.PageCounter = pagecounter 465 self.isDirty = True 477 self.Balance = balance 478 self.PageCounter = pagecounter 479 self.isDirty = True 466 480 467 481 def setDescription(self, description=None) :