Show
Ignore:
Timestamp:
09/17/05 16:29:43 (19 years ago)
Author:
jerome
Message:

Upgraded database schema.
Added -i | --ingroups command line option to repykota.
Added -C | --comment command line option to edpykota.
Added 'noquota', 'noprint', and 'nochange' as switches for edpykota's
-l | --limitby command line option.
Severity : entirely new features, in need of testers :-)

Files:
1 modified

Legend:

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

    r2451 r2452  
    5959        self.AccountBalance = float(self.AccountBalance or 0.0) - amount 
    6060         
    61     def setAccountBalance(self, balance, lifetimepaid) :     
     61    def setAccountBalance(self, balance, lifetimepaid, comment="") : 
    6262        """Sets the user's account balance in case he pays more money.""" 
    6363        diff = float(lifetimepaid or 0.0) - float(self.LifeTimePaid or 0.0) 
     
    6565        try : 
    6666            self.parent.writeUserAccountBalance(self, balance, lifetimepaid) 
    67             self.parent.writeNewPayment(self, diff) 
     67            self.parent.writeNewPayment(self, diff, comment) 
    6868        except PyKotaStorageError, msg :     
    6969            self.parent.rollbackTransaction() 
     
    8080        except AttributeError :     
    8181            limitby = "quota" 
    82         if limitby in ["quota", "balance", "quota-then-balance", "balance-then-quota"] : 
     82        if limitby in ["quota", "balance", \ 
     83                       "noquota", "noprint", "nochange"] : 
    8384            self.parent.writeUserLimitBy(self, limitby) 
    8485            self.LimitBy = limitby 
     
    120121        except AttributeError :     
    121122            limitby = "quota" 
    122         if limitby in ["quota", "balance"] : 
     123        if limitby in ["quota", "balance", "noquota"] : 
    123124            self.parent.writeGroupLimitBy(self, limitby) 
    124125            self.LimitBy = limitby