Changeset 2064

Show
Ignore:
Timestamp:
02/15/05 14:13:27 (20 years ago)
Author:
jalet
Message:

Fixes output when user has got a negative or nul overcharging factor.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/reporter.py

    r2054 r2064  
    2222# 
    2323# $Log$ 
     24# Revision 1.12  2005/02/15 13:13:27  jalet 
     25# Fixes output when user has got a negative or nul overcharging factor. 
     26# 
    2427# Revision 1.11  2005/02/13 22:02:29  jalet 
    2528# Big database structure changes. Upgrade script is now included as well as 
     
    127130        #balance 
    128131        if entry.LimitBy and (entry.LimitBy.lower() == "balance") :     
    129             if balance <= 0 : 
     132            if balance == 0.0 : 
     133                if entry.OverCharge > 0 : 
     134                    datelimit = "DENY" 
     135                    reached = "+B" 
     136                else :     
     137                    # overcharging by a negative or nul factor means user is always allowed to print 
     138                    # TODO : do something when printer prices are negative as well ! 
     139                    datelimit = "" 
     140                    reached = "-B" 
     141            elif balance < 0 : 
    130142                datelimit = "DENY" 
    131143                reached = "+B"