Show
Ignore:
Timestamp:
04/28/05 09:20:20 (19 years ago)
Author:
jerome
Message:

Job's billing code is now clicable in the print job
history viewed from the CGI script

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/storages/sql.py

    r2218 r2220  
    498498        self.doModify("DELETE FROM printergroupsmembers WHERE groupid=%s AND printerid=%s" % (self.doQuote(pgroup.ident), self.doQuote(printer.ident))) 
    499499         
    500     def retrieveHistory(self, user=None, printer=None, datelimit=None, hostname=None, limit=100) :     
     500    def retrieveHistory(self, user=None, printer=None, datelimit=None, hostname=None, billingcode=None, limit=100) : 
    501501        """Retrieves all print jobs for user on printer (or all) before date, limited to first 100 results.""" 
    502502        query = "SELECT jobhistory.*,username,printername FROM jobhistory,users,printers WHERE users.id=userid AND printers.id=printerid" 
     
    508508        if hostname is not None :     
    509509            where.append("hostname=%s" % self.doQuote(hostname)) 
     510        if billingcode is not None :     
     511            where.append("billingcode=%s" % self.doQuote(self.userCharsetToDatabase(billingcode))) 
    510512        if datelimit is not None :     
    511513            where.append("jobdate<=%s" % self.doQuote(datelimit))