diff --git a/Controller/PrinterController.php b/Controller/PrinterController.php index c7d667f..02970cc 100755 --- a/Controller/PrinterController.php +++ b/Controller/PrinterController.php @@ -82,7 +82,8 @@ class PrinterController extends Controller if(isset($counter[$size])) { - $pCounter[$key]['prints'] = $counter[$size]['prints'] - $counter[0]['prints']; + $pCounter[$key]['prints'] = ($size == 0) ? + $counter[$size]['prints'] : $counter[$size]['prints'] - $counter[0]['prints']; $pCounter[$key]['blackInk'] = $counter[$size]['blackInk']; $pCounter[$key]['coloredInk'] = $counter[$size]['coloredInk']; } diff --git a/Resources/views/Printer/index.html.twig b/Resources/views/Printer/index.html.twig index cd01e0d..edf8d0b 100755 --- a/Resources/views/Printer/index.html.twig +++ b/Resources/views/Printer/index.html.twig @@ -31,6 +31,8 @@