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