Changeset 1056
- Timestamp:
- 07/02/03 11:29:12 (21 years ago)
- Location:
- pykota/trunk
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/NEWS
r1052 r1056 22 22 PyKota NEWS : 23 23 24 - 1.10 : 25 26 - Bug fixed wrt quota reports when print limiting is by 27 account balance. 28 24 29 - 1.09 : 25 30 -
pykota/trunk/pykota/reporters/text.py
r1048 r1056 21 21 # 22 22 # $Log$ 23 # Revision 1.2 2003/07/02 09:29:12 jalet 24 # Bug fixed when wanting a report and an user/group was limited by account balance 25 # 23 26 # Revision 1.1 2003/06/30 12:46:15 jalet 24 27 # Extracted reporting code. … … 81 84 lifetimepaid = float(entry.LifeTimePaid or 0.0) 82 85 83 if quota.DateLimit is not None : 84 now = DateTime.now() 85 datelimit = DateTime.ISO.ParseDateTime(quota.DateLimit) 86 if now >= datelimit : 86 if entry.LimitBy.lower() == "balance" : 87 if balance <= 0 : 87 88 datelimit = "DENY" 88 elif (quota.HardLimit is not None) and (pagecounter >= quota.HardLimit) : 89 datelimit = "DENY" 90 elif (quota.HardLimit is None) and (quota.SoftLimit is not None) and (pagecounter >= quota.SoftLimit) : 91 datelimit = "DENY" 92 else : 93 datelimit = "" 94 95 if entry.LimitBy.lower() == "balance" : 96 reached = (((balance <= 0) and "+") or "-") + "B" 89 reached = "+B" 90 else : 91 datelimit = "" 92 reached = "-B" 97 93 else : 94 if quota.DateLimit is not None : 95 now = DateTime.now() 96 datelimit = DateTime.ISO.ParseDateTime(quota.DateLimit) 97 if now >= datelimit : 98 datelimit = "DENY" 99 elif (quota.HardLimit is not None) and (pagecounter >= quota.HardLimit) : 100 datelimit = "DENY" 101 elif (quota.HardLimit is None) and (quota.SoftLimit is not None) and (pagecounter >= quota.SoftLimit) : 102 datelimit = "DENY" 103 else : 104 datelimit = "" 98 105 reached = (((quota.SoftLimit is not None) and (pagecounter >= quota.SoftLimit) and "+") or "-") + "Q" 99 106 -
pykota/trunk/pykota/version.py
r1052 r1056 21 21 # 22 22 23 __version__ = "1. 09_unofficial"23 __version__ = "1.10_unofficial" 24 24 25 25 __doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng."""