Changeset 1043

Show
Ignore:
Timestamp:
06/25/03 21:52:31 (21 years ago)
Author:
jalet
Message:

Should be ready for testing :-)

Location:
pykota/trunk
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/edpykota

    r1041 r1043  
    2323# 
    2424# $Log$ 
     25# Revision 1.48  2003/06/25 19:52:30  jalet 
     26# Should be ready for testing :-) 
     27# 
    2528# Revision 1.47  2003/06/25 14:10:01  jalet 
    2629# Hey, it may work (edpykota --reset excepted) ! 
     
    479482                                if changed[entry.Name].get("balance") is None : 
    480483                                    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) 
    482487                                    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) 
    484491                                    changed[entry.Name]["balance"] = balance 
    485492                            for groupname in groupnames :         
  • pykota/trunk/NEWS

    r1041 r1043  
    2222PyKota NEWS : 
    2323 
     24    - 1.09beta : 
     25     
     26        - edpykota finalized 
     27         
    2428    - 1.09alpha2 : 
    2529     
  • pykota/trunk/pykota/storage.py

    r1042 r1043  
    2121# 
    2222# $Log$ 
     23# Revision 1.16  2003/06/25 19:52:31  jalet 
     24# Should be ready for testing :-) 
     25# 
    2326# Revision 1.15  2003/06/25 14:10:58  jalet 
    2427# Exception raising for now. 
     
    115118    def setAccountBalance(self, balance, lifetimepaid) :     
    116119        """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 
    118123         
    119124    def setLimitBy(self, limitby) :     
  • pykota/trunk/pykota/version.py

    r1030 r1043  
    2121# 
    2222 
    23 __version__ = "1.09alpha2_unofficial" 
     23__version__ = "1.09beta_unofficial" 
    2424 
    2525__doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng.""" 
  • pykota/trunk/README

    r1034 r1043  
    3131 
    3232        - Supports both CUPS and LPRng backends. 
     33         
     34        - Can store quota information either with PostgreSQL or with  
     35          OpenLDAP. 
    3336         
    3437        - Per printer user and group quotas. 
     
    146149    - Python v2.1 or above 
    147150    - eGenix' mxDateTime Python extension 
    148     - PostgreSQL's PygreSQL Python extension and the PostgreSQL client 
    149       libraries. 
    150151    - SNMP tools (specifically the snmpget command) if you plan to 
    151152      request your printer's lifetime page counter via SNMP. 
    152153    - Netatalk (specifically the pap command) if you plan to 
    153154      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. 
    154161     
    155162  You need to have the following tools installed on the Quota Storage   
     
    158165    - PostgreSQL 
    159166     
    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 
    161172  Server must match the PostgreSQL version used on the Quota Storage  
     173  Server. 
     174   
     175or   
     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  
    162179  Server. 
    163180