Changeset 2773 for pykota/trunk/pykota/storage.py
- Timestamp:
- 03/02/06 12:37:52 (18 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/storage.py
r2735 r2773 67 67 self.OverCharge = 1.0 68 68 self.Payments = [] # TODO : maybe handle this smartly for SQL, for now just don't retrieve them 69 self.PaymentsBacklog = [] 69 70 70 71 def consumeAccountBalance(self, amount) : … … 78 79 self.AccountBalance = balance 79 80 self.LifeTimePaid = lifetimepaid 80 self.parent.writeNewPayment(self, diff, comment) 81 self.isDirty = True 81 if diff : 82 self.PaymentsBacklog.append((diff, comment)) 83 self.isDirty = True 84 85 def save(self) : 86 """Saves an user and flush its payments backlog.""" 87 for (value, comment) in self.PaymentsBacklog : 88 self.parent.writeNewPayment(self, value, comment) 89 self.PaymentsBacklog = [] 90 StorageObject.save(self) 82 91 83 92 def setLimitBy(self, limitby) :