107 | | for printer in printers : |
108 | | userpquota = self.storage.getUserPQuota(user, printer) |
109 | | if userpquota.Exists : |
110 | | cost = userpquota.computeJobPrice(totalsize) |
111 | | print _("Cost on printer %s : %.2f") % (printer.Name, cost) |
| 107 | if user.LimitBy == "noprint" : |
| 108 | print _("Your account settings forbid you to print at this time.") |
| 109 | else : |
| 110 | for printer in printers : |
| 111 | userpquota = self.storage.getUserPQuota(user, printer) |
| 112 | if userpquota.Exists : |
| 113 | if printer.MaxJobSize and (totalsize > printer.MaxJobSize) : |
| 114 | print _("You are not allowed to print so many pages on printer %s at this time.") % printer.Name |
| 115 | else : |
| 116 | cost = userpquota.computeJobPrice(totalsize) |
| 117 | msg = _("Cost on printer %s : %.2f") % (printer.Name, cost) |
| 118 | if printer.PassThrough : |
| 119 | msg = "%s (%s)" % (msg, _("won't be charged, printer is in passthrough mode")) |
| 120 | elif user.LimitBy == "nochange" : |
| 121 | msg = "%s (%s)" % (msg, _("won't be charged, your account is immutable")) |
| 122 | print msg |