Преглед изворни кода

Color rojo para negativos y verde para positivos

Celestino Rey пре 1 година
родитељ
комит
fe4f0ff036
2 измењених фајлова са 4 додато и 4 уклоњено
  1. 2 2
      src/templates/informe_cuenta.html
  2. 2 2
      src/templates/informe_cuenta_pdf.html

+ 2 - 2
src/templates/informe_cuenta.html

@@ -50,9 +50,9 @@
                     <td>{{ item.hasta }}</td>
                     <td>{{ item.descripcion }}</td>
                     {% if item.tipo == 'Ingreso' %}
-                    <td class="text-end">{{ item.monto|floatformat:2 }}</td>
+                    <td style="color: green" class="text-end">{{ item.monto|floatformat:2 }}</td>
                     {% else %}
-                    <td class="text-end">-{{ item.monto|floatformat:2 }}</td>
+                    <td style="color: red" class="text-end">-{{ item.monto|floatformat:2 }}</td>
                     {% endif %}
                     <td class="text-end">{{ item.saldo_despues|floatformat:2 }}</td>
                 </tr>

+ 2 - 2
src/templates/informe_cuenta_pdf.html

@@ -34,9 +34,9 @@
                 <td class="text-left">{{ item.hasta }}</td>
                 <td class="text-left">{{ item.descripcion }}</td>
                 {% if item.tipo == 'Ingreso' %}
-                <td>{{ item.monto|floatformat:2 }}</td>
+                <td style="color: green" >{{ item.monto|floatformat:2 }}</td>
                 {% else %}
-                <td>-{{ item.monto|floatformat:2 }}</td>
+                <td style="color: red" >-{{ item.monto|floatformat:2 }}</td>
                 {% endif %}
                 <td>{{ item.saldo_despues|floatformat:2 }}</td>
             </tr>