Changeset 1043
- Timestamp:
- 06/25/03 21:52:31 (21 years ago)
- Location:
- pykota/trunk
- Files:
-
- 5 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/edpykota
r1041 r1043 23 23 # 24 24 # $Log$ 25 # Revision 1.48 2003/06/25 19:52:30 jalet 26 # Should be ready for testing :-) 27 # 25 28 # Revision 1.47 2003/06/25 14:10:01 jalet 26 29 # Hey, it may work (edpykota --reset excepted) ! … … 479 482 if changed[entry.Name].get("balance") is None : 480 483 if balance.startswith("+") or balance.startswith("-") : 481 entry.consumeAccountBalance(-balancevalue) 484 newbalance = float(entry.AccountBalance or 0.0) + balancevalue 485 newlifetimepaid = float(entry.LifeTimePaid or 0.0) + balancevalue 486 entry.setAccountBalance(newbalance, newlifetimepaid) 482 487 else : 483 entry.consumeAccountBalance(float(entry.AccountBalance or 0.0) - balancevalue) 488 diff = balancevalue - float(entry.AccountBalance or 0.0) 489 newlifetimepaid = float(entry.LifeTimePaid or 0.0) + diff 490 entry.setAccountBalance(balancevalue, newlifetimepaid) 484 491 changed[entry.Name]["balance"] = balance 485 492 for groupname in groupnames : -
pykota/trunk/NEWS
r1041 r1043 22 22 PyKota NEWS : 23 23 24 - 1.09beta : 25 26 - edpykota finalized 27 24 28 - 1.09alpha2 : 25 29 -
pykota/trunk/pykota/storage.py
r1042 r1043 21 21 # 22 22 # $Log$ 23 # Revision 1.16 2003/06/25 19:52:31 jalet 24 # Should be ready for testing :-) 25 # 23 26 # Revision 1.15 2003/06/25 14:10:58 jalet 24 27 # Exception raising for now. … … 115 118 def setAccountBalance(self, balance, lifetimepaid) : 116 119 """Sets the user's account balance in case he pays more money.""" 117 raise PyKotaStorageError, "Not implemented." 120 self.parent.writeUserAccountBalance(self, balance, lifetimepaid) 121 self.AccountBalance = balance 122 self.LifeTimePaid = lifetimepaid 118 123 119 124 def setLimitBy(self, limitby) : -
pykota/trunk/pykota/version.py
r1030 r1043 21 21 # 22 22 23 __version__ = "1.09 alpha2_unofficial"23 __version__ = "1.09beta_unofficial" 24 24 25 25 __doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng.""" -
pykota/trunk/README
r1034 r1043 31 31 32 32 - Supports both CUPS and LPRng backends. 33 34 - Can store quota information either with PostgreSQL or with 35 OpenLDAP. 33 36 34 37 - Per printer user and group quotas. … … 146 149 - Python v2.1 or above 147 150 - eGenix' mxDateTime Python extension 148 - PostgreSQL's PygreSQL Python extension and the PostgreSQL client149 libraries.150 151 - SNMP tools (specifically the snmpget command) if you plan to 151 152 request your printer's lifetime page counter via SNMP. 152 153 - Netatalk (specifically the pap command) if you plan to 153 154 request your printer's lifetime page counter via AppleTalk. 155 - PostgreSQL's PygreSQL Python extension and the PostgreSQL client 156 libraries if you plan to use PostgreSQL as the Quota Storage 157 backend. 158 or 159 - python-ldap Python module and the OpenLDAP client libraries 160 if you plan to use OpenLDAP as the Quota Storage backend. 154 161 155 162 You need to have the following tools installed on the Quota Storage … … 158 165 - PostgreSQL 159 166 160 PygreSQL and the PostgreSQL client libraries's versions on the Print 167 or 168 169 - OpenLDAP 170 171 PygreSQL and the PostgreSQL client libraries' versions on the Print 161 172 Server must match the PostgreSQL version used on the Quota Storage 173 Server. 174 175 or 176 177 python-ldap and the OpenLDAP client libraries' versions on the Print 178 Server must match the OpenLDAP version used on the Quota Storage 162 179 Server. 163 180