Commit 7619329841fe447b61a5e2b16b18e21689617c77
Exists in
master
and in
1 other branch
Merge branch 'master' into 'master'
agrego importe a los resultados See merge request !3
Showing
2 changed files
Show diff stats
src/js/controller.js
... | ... | @@ -127,6 +127,14 @@ angular.module('focaModalCobranza') |
127 | 127 | } |
128 | 128 | }; |
129 | 129 | |
130 | + $scope.getTotalCobrado = function(cobros) { | |
131 | + var total = 0; | |
132 | + for (var i = 0; i < cobros.length; i++) { | |
133 | + total += cobros[i].importe; | |
134 | + } | |
135 | + return parseFloat(total.toFixed(2)); | |
136 | + }; | |
137 | + | |
130 | 138 | function calcularPages(paginaActual) { |
131 | 139 | var paginas = []; |
132 | 140 | paginas.push(paginaActual); |
src/views/foca-modal-cobranza.html
... | ... | @@ -86,6 +86,7 @@ |
86 | 86 | <th>Fecha</th> |
87 | 87 | <th>Cliente</th> |
88 | 88 | <th>Comprobante</th> |
89 | + <th>Importe</th> | |
89 | 90 | <th></th> |
90 | 91 | </tr> |
91 | 92 | </thead> |
... | ... | @@ -101,6 +102,7 @@ |
101 | 102 | <td ng-bind="cobranza.fecha | date : 'dd/MM/yyyy'"></td> |
102 | 103 | <td ng-bind="cobranza.cliente.NOM"></td> |
103 | 104 | <td ng-bind="[cobranza.puntoVenta, cobranza.numeroRecibo] | comprobante"></td> |
105 | + <td ng-bind="getTotalCobrado(cobranza.cobros) | number: 2"></td> | |
104 | 106 | <td> |
105 | 107 | <button |
106 | 108 | type="button" |