Changeset 3413 for pykota/trunk/pykota/reporters/text.py
- Timestamp:
- 09/27/08 22:02:37 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/reporters/text.py
r3411 r3413 8 8 # the Free Software Foundation, either version 3 of the License, or 9 9 # (at your option) any later version. 10 # 10 # 11 11 # This program is distributed in the hope that it will be useful, 12 12 # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 # GNU General Public License for more details. 15 # 15 # 16 16 # You should have received a copy of the GNU General Public License 17 17 # along with this program. If not, see <http://www.gnu.org/licenses/>. … … 24 24 25 25 from pykota.reporter import BaseReporter 26 27 class Reporter(BaseReporter) : 26 27 class Reporter(BaseReporter) : 28 28 """Text reporter.""" 29 29 def generateReport(self) : … … 32 32 if self.isgroup : 33 33 prefix = "Group" 34 else : 34 else : 35 35 prefix = "User" 36 36 for printer in self.printers : … … 40 40 self.report.append(pjob) 41 41 self.report.append(ppage) 42 42 43 43 total = 0 44 44 totalmoney = 0.0 … … 51 51 total += pages 52 52 totalmoney += money 53 54 if total or totalmoney : 53 54 if total or totalmoney : 55 55 (tpage, tmoney) = self.getTotals(total, totalmoney) 56 56 self.report.append((" " * 62) + tpage + tmoney) 57 57 self.report.append((" " * 63) + self.getPrinterRealPageCounter(printer)) 58 self.report.append("") 59 if self.isgroup : 58 self.report.append("") 59 if self.isgroup : 60 60 self.report.append(_("Totals may be inaccurate if some users are members of several groups.")) 61 return "\n".join(self.report) 62 61 return "\n".join(self.report) 62