Show
Ignore:
Timestamp:
08/31/07 09:27:44 (17 years ago)
Author:
jerome
Message:

Now the pykotme command line tool computes size and price based on the preaccounter
define for each printer instead of always using the internal page counter.
IMPORTANT : pykotme.cgi still uses the old behavior.

Files:
1 modified

Legend:

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

    r3133 r3245  
    338338                                totalprice += pageprice 
    339339                            else :     
    340                                 coefficients = self.Printer.Coefficients 
     340                                coefficients = upq.Printer.Coefficients 
    341341                                for (ink, value) in usage.items() : 
    342342                                    coefvalue = coefficients.get(ink, 1.0) 
    343343                                    coefprice = (coefvalue * pageprice) / 100.0 
    344344                                    inkprice = coefprice * value 
    345                                     self.parent.tool.logdebug("Applying coefficient %f for color %s (used at %f%% on page %i) to base cost %f gives %f" % (coefvalue, ink, value, pageindex+1, pageprice, inkprice)) 
     345                                    self.parent.tool.logdebug("Applying coefficient %f for color %s (used at %f%% on page %i) to base cost %f on printer %s gives %f" % (coefvalue, ink, value, pageindex+1, pageprice, upq.Printer.Name, inkprice)) 
    346346                                    totalprice += inkprice 
    347347        if self.User.OverCharge != 1.0 : # TODO : beware of rounding errors