Commit dbef96600aa3d124b324fdd1f140aaf09cf6af06

Authored by fellipevasconcelos
1 parent 7e14ab24
Exists in master and in 2 other branches 3,1, 3.1

correcoes

Controller/PrinterController.php
... ... @@ -82,7 +82,8 @@ class PrinterController extends Controller
82 82  
83 83 if(isset($counter[$size]))
84 84 {
85   - $pCounter[$key]['prints'] = $counter[$size]['prints'] - $counter[0]['prints'];
  85 + $pCounter[$key]['prints'] = ($size == 0) ?
  86 + $counter[$size]['prints'] : $counter[$size]['prints'] - $counter[0]['prints'];
86 87 $pCounter[$key]['blackInk'] = $counter[$size]['blackInk'];
87 88 $pCounter[$key]['coloredInk'] = $counter[$size]['coloredInk'];
88 89 }
... ...
Resources/views/Printer/index.html.twig
... ... @@ -31,6 +31,8 @@
31 31 <td>
32 32 {% if printerCounter[entity.id] is defined %}
33 33 {{ printerCounter[entity.id]['prints'] }}
  34 + {% else %}
  35 + 0
34 36 {% endif %}
35 37 </td>
36 38 <td>{{ entity.name }}</td>
... ...