Changeset 3060

Show
Ignore:
Timestamp:
11/16/06 21:50:05 (18 years ago)
Author:
jerome
Message:

When refunding a job, a negative payment is now saved as well as a textual reason.

Files:
1 modified

Legend:

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

    r3057 r3060  
    128128        self.isDirty = False             
    129129         
    130     def refund(self, amount) : 
     130    def refund(self, amount, reason) : 
    131131        """Refunds a number of credits to an user.""" 
    132132        self.consumeAccountBalance(-amount) 
     133        self.parent.writeNewPayment(self, -amount, reason) 
    133134         
    134135         
     
    482483            raise AttributeError, name 
    483484             
    484     def refund(self) :         
     485    def refund(self, reason) :         
    485486        """Refund a particular print job.""" 
    486487        if (not self.JobSize) or (self.JobAction in ("DENY", "CANCEL", "REFUND")) : 
     
    493494                 
    494495            if self.User.Exists : 
    495                 self.User.refund(self.JobPrice) 
     496                self.User.refund(self.JobPrice, reason) 
    496497                if self.Printer.Exists :     
    497498                    upq = self.parent.getUserPQuota(self.User, self.Printer)