Commit a60243a481852254a13c9072d9233629dca8e09d

Authored by Eric Fernandez
1 parent 44e088c940
Exists in master and in 1 other branch develop

recibo parametros para mostrar divisas

src/js/controller.js
... ... @@ -5,9 +5,9 @@ angular.module('focaModalFactura')
5 5 '$scope',
6 6 '$uibModalInstance',
7 7 'focaModalFacturaService',
8   - 'cliente',
  8 + 'parametrosFactura',
9 9 function($filter, $scope, $uibModalInstance,
10   - focaModalFacturaService, cliente
  10 + focaModalFacturaService, parametrosFactura
11 11 ) {
12 12 var fecha = new Date();
13 13 $scope.fechaHasta = new Date();
... ... @@ -16,6 +16,7 @@ angular.module('focaModalFactura')
16 16 $scope.facturas = [];
17 17 $scope.primerBusqueda = false;
18 18 $scope.searchLoading = false;
  19 + $scope.parametrosFactura = parametrosFactura;
19 20 // pagination
20 21 $scope.numPerPage = 10;
21 22 $scope.currentPage = 1;
... ... @@ -42,7 +43,7 @@ angular.module('focaModalFactura')
42 43 $scope.searchLoading = true;
43 44 //TODO hacer filtro de fecha
44 45 focaModalFacturaService
45   - .getFacturasByIdCliente(cliente, $scope.fechaDesde
  46 + .getFacturasByIdCliente(parametrosFactura.cliente, $scope.fechaDesde
46 47 .toISOString().split('.')[0],
47 48 $scope.fechaHasta.toISOString().split('.')[0])
48 49 .then(llenarDatos);
src/views/foca-modal-factura.html
... ... @@ -86,7 +86,10 @@
86 86 <td ng-bind=
87 87 "(factura.TCO + '-' + factura.TIP + '-' + factura.SUC + '-' + factura.NCO)">
88 88 </td>
89   - <td class="text-right" ng-bind="factura.IPA | currency:'$'"></td>
  89 + <td
  90 + class="text-right"
  91 + ng-bind="(factura.IPA / parametrosFactura.cotizacion) |
  92 + currency: parametrosFactura.simbolo"></td>
90 93 <td><input
91 94 ng-class="{
92 95 'btn-secondary': selectedFactura != key,