Commit f7945bfaeb2489d5be06dfa93278ba63411429a1
Exists in
master
Merge branch 'master' into 'develop'
Master See merge request !20
Showing
2 changed files
Show diff stats
src/js/controller.js
1 | angular.module('focaModalPrecioCondicion') | 1 | angular.module('focaModalPrecioCondicion') |
2 | .controller('focaModalPrecioCondicionController', | 2 | .controller('focaModalPrecioCondicionController', |
3 | [ | 3 | [ |
4 | '$timeout', | 4 | '$timeout', |
5 | '$filter', | 5 | '$filter', |
6 | '$scope', | 6 | '$scope', |
7 | '$uibModal', | 7 | '$uibModal', |
8 | '$uibModalInstance', | 8 | '$uibModalInstance', |
9 | 'focaModalService', | 9 | 'focaModalService', |
10 | 'focaModalPrecioCondicionService', | 10 | 'focaModalPrecioCondicionService', |
11 | 'idListaPrecio', | 11 | 'parametros', |
12 | 'idCliente', | ||
13 | function ( | 12 | function ( |
14 | $timeout, $filter, $scope, $uibModal, $uibModalInstance, | 13 | $timeout, $filter, $scope, $uibModal, $uibModalInstance, |
15 | focaModalService, focaModalPrecioCondicionService, idListaPrecio, idCliente | 14 | focaModalService, focaModalPrecioCondicionService, parametros |
16 | ) { | 15 | ) { |
17 | $scope.plazos = [ | 16 | $scope.plazos = [ |
18 | { | 17 | { |
19 | dias: 0, | 18 | dias: 0, |
20 | idCliente: idCliente, | 19 | idCliente: parametros.idCliente, |
21 | activo: true | 20 | activo: true |
22 | } | 21 | } |
23 | ]; | 22 | ]; |
24 | $scope.openModalListaDePrecios = false; | 23 | $scope.openModalListaDePrecios = false; |
25 | $scope.associatedList = true; | 24 | $scope.associatedList = true; |
26 | $scope.listaDePreciosAlternativa = null; | 25 | $scope.listaDePreciosAlternativa = null; |
27 | 26 | ||
28 | onInit(); | 27 | onInit(); |
29 | 28 | ||
30 | function onInit() { | 29 | function onInit() { |
31 | //Metodo para traer la lista de precio asociada al cliente | 30 | //Metodo para traer la lista de precio asociada al cliente |
32 | focaModalPrecioCondicionService.getListaPrecio(idListaPrecio) | 31 | focaModalPrecioCondicionService.getListaPrecio(parametros.idListaPrecio) |
33 | .then(function (res) { | 32 | .then(function (res) { |
34 | $scope.listaDePreciosAsociada = res.data[0]; | 33 | $scope.listaDePreciosAsociada = res.data[0]; |
35 | }) | 34 | }) |
36 | .catch(function (e) { console.error(e) }); | 35 | .catch(function (e) { console.error(e) }); |
37 | focaModalPrecioCondicionService.getPlazosByIdCliente(idCliente) | 36 | focaModalPrecioCondicionService.getPlazosByIdCliente(parametros.idCliente) |
38 | .then(function (res) { | 37 | .then(function (res) { |
39 | res.data.forEach(function (item) { | 38 | res.data.forEach(function (item) { |
40 | $scope.plazos.push(item); | 39 | $scope.plazos.push(item); |
41 | }); | 40 | }); |
42 | }) | 41 | }) |
43 | .catch(function (e) { console.error(e) }); | 42 | .catch(function (e) { console.error(e) }); |
44 | } | 43 | } |
45 | 44 | ||
46 | //#region Metodos para la lista de precios | 45 | //#region Metodos para la lista de precios |
47 | $scope.openListaDePrecios = function () { | 46 | $scope.openListaDePrecios = function () { |
48 | var datos = null; | 47 | var datos = null; |
49 | focaModalPrecioCondicionService.getAllListaPrecio() | 48 | focaModalPrecioCondicionService.getAllListaPrecio() |
50 | .then(function (res) { | 49 | .then(function (res) { |
51 | datos = res.data; | 50 | datos = res.data; |
52 | focaModalService.modal({ | 51 | focaModalService.modal({ |
53 | titulo: 'Lista de precios', | 52 | titulo: 'Lista de precios', |
54 | data: datos, | 53 | data: datos, |
55 | size: 'md', | 54 | size: 'md', |
56 | columnas: [ | 55 | columnas: [ |
57 | { | 56 | { |
58 | propiedad: 'ID', | 57 | propiedad: 'ID', |
59 | nombre: 'Codigo' | 58 | nombre: 'Codigo' |
60 | }, | 59 | }, |
61 | { | 60 | { |
62 | propiedad: 'DES', | 61 | propiedad: 'DES', |
63 | NOMBRE: 'Nombre' | 62 | NOMBRE: 'Nombre' |
64 | } | 63 | } |
65 | ], | 64 | ], |
66 | }).then(function (res) { | 65 | }).then(function (res) { |
67 | focaModalService.confirm('¿Desea cambiar la lista de precios?\n'+ | 66 | focaModalService.confirm('¿Desea cambiar la lista de precios?\n'+ |
68 | 'Se perderan los productos ingresados').then(function (data){ | 67 | 'Se perderan los productos ingresados').then(function (data){ |
69 | if (data) { | 68 | if (data) { |
70 | $scope.associatedList = false; | 69 | $scope.associatedList = false; |
71 | $scope.listaDePreciosAlternativa = res; | 70 | $scope.listaDePreciosAlternativa = res; |
72 | } | 71 | } |
73 | }); | 72 | }); |
74 | }).catch(function (e) { | 73 | }).catch(function (e) { |
75 | console.error(e); | 74 | console.error(e); |
76 | }); | 75 | }); |
77 | }); | 76 | }); |
78 | }; | 77 | }; |
79 | $scope.selectListaDePrecios = function () { | 78 | $scope.selectListaDePrecios = function () { |
80 | $scope.associatedList = true; | 79 | $scope.associatedList = true; |
81 | }; | 80 | }; |
82 | $scope.verListaProductos = function (id) { | 81 | $scope.verListaProductos = function (id) { |
83 | $uibModal.open( | 82 | $uibModal.open( |
84 | { | 83 | { |
85 | ariaLabelledBy: 'Busqueda de Productos', | 84 | ariaLabelledBy: 'Busqueda de Productos', |
86 | templateUrl: 'modal-busqueda-productos.html', | 85 | templateUrl: 'modal-busqueda-productos.html', |
87 | controller: 'modalBusquedaProductosCtrl', | 86 | controller: 'modalBusquedaProductosCtrl', |
88 | resolve: { | 87 | resolve: { |
89 | parametroProducto: { | 88 | parametroProducto: { |
90 | idLista: parseInt(id), | 89 | idLista: parseInt(id), |
91 | cotizacion: 1, | 90 | cotizacion: 1, |
92 | simbolo: '$', | 91 | simbolo: '$', |
93 | soloMostrar: true | 92 | soloMostrar: true |
94 | } | 93 | } |
95 | }, | 94 | }, |
96 | size: 'md' | 95 | size: 'md' |
97 | } | 96 | } |
98 | ); | 97 | ); |
99 | }; | 98 | }; |
100 | //#endregion | 99 | //#endregion |
101 | 100 | ||
102 | //#region Metodos para los plazos | 101 | //#region Metodos para los plazos |
103 | $scope.addPlazo = function (key) { | 102 | $scope.addPlazo = function (key) { |
104 | if (key != 13) return; | 103 | if (key != 13) return; |
105 | if ($scope.plazos.length === 100) return; | 104 | if ($scope.plazos.length === 100) return; |
106 | for (var i = 1; i < $scope.plazos.length; i++) { | 105 | for (var i = 1; i < $scope.plazos.length; i++) { |
107 | if ($scope.plazos[0].dias == $scope.plazos[i].dias && $scope.plazos[i].activo == true) { | 106 | if ($scope.plazos[0].dias == $scope.plazos[i].dias && $scope.plazos[i].activo == true) { |
108 | focaModalService.alert("Ya existe un plazo con este valor"); | 107 | focaModalService.alert("Ya existe un plazo con este valor"); |
109 | return; | 108 | return; |
110 | } | 109 | } |
111 | } | 110 | } |
112 | $scope.plazos.unshift({ dias: 0, idCliente: idCliente, activo: true }); | 111 | $scope.plazos.unshift({ dias: 0, idCliente: parametros.idCliente, activo: true }); |
113 | $scope.focused = 1; | 112 | $scope.focused = 1; |
114 | }; | 113 | }; |
115 | $scope.deletePlazo = function (index) { | 114 | $scope.deletePlazo = function (index) { |
116 | $scope.plazos[index].activo = false; | 115 | $scope.plazos[index].activo = false; |
117 | }; | 116 | }; |
118 | $scope.validateMinMax = function (plazo, min, max) { | 117 | $scope.validateMinMax = function (plazo, min, max) { |
119 | plazo.dias = parseInt(plazo.dias); | 118 | plazo.dias = parseInt(plazo.dias); |
120 | if (plazo.dias === null || plazo.dias === undefined || isNaN(plazo.dias)) { | 119 | if (plazo.dias === null || plazo.dias === undefined || isNaN(plazo.dias)) { |
121 | plazo.dias = '0'; | 120 | plazo.dias = '0'; |
122 | return; | 121 | return; |
123 | } | 122 | } |
124 | if (parseInt(plazo.dias) < min) { | 123 | if (parseInt(plazo.dias) < min) { |
125 | plazo.dias = '0'; | 124 | plazo.dias = '0'; |
126 | return; | 125 | return; |
127 | } | 126 | } |
128 | if (parseInt(plazo.dias) > max) { | 127 | if (parseInt(plazo.dias) > max) { |
129 | plazo.dias = '365'; | 128 | plazo.dias = '365'; |
130 | return; | 129 | return; |
131 | } | 130 | } |
132 | }; | 131 | }; |
133 | //#endregion | 132 | //#endregion |
134 | 133 | ||
135 | $scope.closeModalPrecioCondicion = function () { | 134 | $scope.closeModalPrecioCondicion = function () { |
136 | $uibModalInstance.dismiss('cancel'); | 135 | $uibModalInstance.dismiss('cancel'); |
137 | }; | 136 | }; |
138 | $scope.guardarPrecioCondicion = function () { | 137 | $scope.guardarPrecioCondicion = function () { |
139 | var mod = $scope.associatedList ? parseInt($scope.listaDePreciosAsociada.ID) : parseInt($scope.listaDePreciosAlternativa.ID); | 138 | var mod = $scope.associatedList ? parseInt($scope.listaDePreciosAsociada.ID) : parseInt($scope.listaDePreciosAlternativa.ID); |
140 | focaModalPrecioCondicionService.actualizarLista(idCliente, mod).then(function (){ | 139 | focaModalPrecioCondicionService.actualizarLista(parametros.idCliente, mod).then(function (){ |
141 | $scope.plazos.shift(); | 140 | $scope.plazos.shift(); |
142 | focaModalPrecioCondicionService.createPlazo($scope.plazos) | 141 | focaModalPrecioCondicionService.createPlazo($scope.plazos) |
143 | .then(function () { | 142 | .then(function () { |
144 | var precioCondicion = { | 143 | var precioCondicion = { |
145 | listaPrecio: $scope.associatedList ? $scope.listaDePreciosAsociada : $scope.listaDePreciosAlternativa, | 144 | listaPrecio: $scope.associatedList ? $scope.listaDePreciosAsociada : $scope.listaDePreciosAlternativa, |
146 | plazoPago: $filter('filter')($scope.plazos, { activo: true }, true) | 145 | plazoPago: $filter('filter')($scope.plazos, { activo: true }, true) |
147 | }; | 146 | }; |
148 | $uibModalInstance.close(precioCondicion); | 147 | $uibModalInstance.close(precioCondicion); |
149 | }) | 148 | }) |
150 | .catch(function (e) { console.error(e) }) | 149 | .catch(function (e) { console.error(e) }) |
151 | }); | 150 | }); |
152 | }; | 151 | }; |
153 | } | 152 | } |
154 | ]); | 153 | ]); |
155 | 154 |
src/js/controllerCliente.js
1 | angular.module('focaModalPrecioCondicion') | 1 | angular.module('focaModalPrecioCondicion') |
2 | .controller('focaModalListaPreciosController', | 2 | .controller('focaModalListaPreciosController', |
3 | [ | 3 | [ |
4 | '$timeout', | 4 | '$timeout', |
5 | '$filter', | 5 | '$filter', |
6 | '$scope', | 6 | '$scope', |
7 | '$uibModal', | 7 | '$uibModal', |
8 | '$uibModalInstance', | 8 | '$uibModalInstance', |
9 | 'focaModalService', | 9 | 'focaModalService', |
10 | 'focaModalPrecioCondicionService', | 10 | 'focaModalPrecioCondicionService', |
11 | 'idListaPrecio', | 11 | 'parametros', |
12 | 'idCliente', | ||
13 | function ( | 12 | function ( |
14 | $timeout, $filter, $scope, $uibModal, $uibModalInstance, | 13 | $timeout, $filter, $scope, $uibModal, $uibModalInstance, |
15 | focaModalService, focaModalPrecioCondicionService, idListaPrecio, idCliente | 14 | focaModalService, focaModalPrecioCondicionService, parametros |
16 | ) { | 15 | ) { |
17 | $scope.openModalListaDePrecios = false; | 16 | $scope.openModalListaDePrecios = false; |
18 | $scope.associatedList = true; | 17 | $scope.associatedList = true; |
19 | $scope.listaDePreciosAlternativa = null; | 18 | $scope.listaDePreciosAlternativa = null; |
20 | 19 | ||
21 | onInit(); | 20 | onInit(); |
22 | 21 | ||
23 | function onInit() { | 22 | function onInit() { |
24 | //Metodo para traer la lista de precio asociada al cliente | 23 | //Metodo para traer la lista de precio asociada al cliente |
25 | focaModalPrecioCondicionService.getListaPrecio(idListaPrecio) | 24 | focaModalPrecioCondicionService.getListaPrecio(parametros.idListaPrecio) |
26 | .then(function (res) { | 25 | .then(function (res) { |
27 | $scope.listaDePreciosAsociada = res.data[0]; | 26 | $scope.listaDePreciosAsociada = res.data[0]; |
28 | }) | 27 | }) |
29 | .catch(function (e) { console.error(e) }); | 28 | .catch(function (e) { console.error(e) }); |
30 | } | 29 | } |
31 | 30 | ||
32 | //#region Metodos para la lista de precios | 31 | //#region Metodos para la lista de precios |
33 | $scope.openListaDePrecios = function () { | 32 | $scope.openListaDePrecios = function () { |
34 | var datos = null; | 33 | var datos = null; |
35 | focaModalPrecioCondicionService.getAllListaPrecio() | 34 | focaModalPrecioCondicionService.getAllListaPrecio() |
36 | .then(function (res) { | 35 | .then(function (res) { |
37 | datos = res.data; | 36 | datos = res.data; |
38 | focaModalService.modal({ | 37 | focaModalService.modal({ |
39 | titulo: 'Lista de precios', | 38 | titulo: 'Lista de precios', |
40 | data: datos, | 39 | data: datos, |
41 | size: 'md', | 40 | size: 'md', |
42 | columnas: [ | 41 | columnas: [ |
43 | { | 42 | { |
44 | propiedad: 'ID', | 43 | propiedad: 'ID', |
45 | nombre: 'Codigo' | 44 | nombre: 'Codigo' |
46 | }, | 45 | }, |
47 | { | 46 | { |
48 | propiedad: 'DES', | 47 | propiedad: 'DES', |
49 | NOMBRE: 'Nombre' | 48 | NOMBRE: 'Nombre' |
50 | } | 49 | } |
51 | ], | 50 | ], |
52 | }).then(function (res) { | 51 | }).then(function (res) { |
53 | $scope.associatedList = false; | 52 | $scope.associatedList = false; |
54 | $scope.listaDePreciosAlternativa = res; | 53 | $scope.listaDePreciosAlternativa = res; |
55 | }).catch(function (e) { | 54 | }).catch(function (e) { |
56 | console.error(e); | 55 | console.error(e); |
57 | }); | 56 | }); |
58 | }); | 57 | }); |
59 | }; | 58 | }; |
60 | $scope.selectListaDePrecios = function () { | 59 | $scope.selectListaDePrecios = function () { |
61 | $scope.associatedList = true; | 60 | $scope.associatedList = true; |
62 | }; | 61 | }; |
63 | $scope.verListaProductos = function (id) { | 62 | $scope.verListaProductos = function (id) { |
64 | $uibModal.open( | 63 | $uibModal.open( |
65 | { | 64 | { |
66 | ariaLabelledBy: 'Busqueda de Productos', | 65 | ariaLabelledBy: 'Busqueda de Productos', |
67 | templateUrl: 'modal-busqueda-productos.html', | 66 | templateUrl: 'modal-busqueda-productos.html', |
68 | controller: 'modalBusquedaProductosCtrl', | 67 | controller: 'modalBusquedaProductosCtrl', |
69 | resolve: { | 68 | resolve: { |
70 | parametroProducto: { | 69 | parametroProducto: { |
71 | idLista: parseInt(id), | 70 | idLista: parseInt(id), |
72 | cotizacion: 1, | 71 | cotizacion: 1, |
73 | simbolo: '$', | 72 | simbolo: '$', |
74 | soloMostrar: true | 73 | soloMostrar: true |
75 | } | 74 | } |
76 | }, | 75 | }, |
77 | size: 'md' | 76 | size: 'md' |
78 | } | 77 | } |
79 | ); | 78 | ); |
80 | }; | 79 | }; |
81 | //#endregion | 80 | //#endregion |
82 | $scope.closeModalPrecioCondicion = function () { | 81 | $scope.closeModalPrecioCondicion = function () { |
83 | $uibModalInstance.dismiss('cancel'); | 82 | $uibModalInstance.dismiss('cancel'); |
84 | }; | 83 | }; |
85 | $scope.guardarPrecioCondicion = function () { | 84 | $scope.guardarPrecioCondicion = function () { |
86 | var mod = $scope.associatedList ? parseInt($scope.listaDePreciosAsociada.ID) : parseInt($scope.listaDePreciosAlternativa.ID); | 85 | var mod = $scope.associatedList ? parseInt($scope.listaDePreciosAsociada.ID) : parseInt($scope.listaDePreciosAlternativa.ID); |
87 | 86 | ||
88 | focaModalPrecioCondicionService.actualizarLista(idCliente, mod).then(function (){ | 87 | focaModalPrecioCondicionService.actualizarLista(parametros.idCliente, mod).then(function (){ |
89 | var precioCondicion = { | 88 | var precioCondicion = { |
90 | listaPrecio: $scope.associatedList ? $scope.listaDePreciosAsociada : $scope.listaDePreciosAlternativa, | 89 | listaPrecio: $scope.associatedList ? $scope.listaDePreciosAsociada : $scope.listaDePreciosAlternativa, |
91 | }; | 90 | }; |
92 | $uibModalInstance.close(precioCondicion); | 91 | $uibModalInstance.close(precioCondicion); |
93 | }); | 92 | }); |
94 | }; | 93 | }; |
95 | } | 94 | } |
96 | ]) | 95 | ]) |
97 | 96 | ||
98 | .controller('focaModalListaPlazosController', | 97 | .controller('focaModalListaPlazosController', |
99 | [ | 98 | [ |
100 | '$timeout', | 99 | '$timeout', |
101 | '$filter', | 100 | '$filter', |
102 | '$scope', | 101 | '$scope', |
103 | '$uibModal', | 102 | '$uibModal', |
104 | '$uibModalInstance', | 103 | '$uibModalInstance', |
105 | 'focaModalService', | 104 | 'focaModalService', |
106 | 'focaModalPrecioCondicionService', | 105 | 'focaModalPrecioCondicionService', |
107 | 'idCliente', | 106 | 'parametros', |
108 | function ( | 107 | function ( |
109 | $timeout, $filter, $scope, $uibModal, $uibModalInstance, | 108 | $timeout, $filter, $scope, $uibModal, $uibModalInstance, |
110 | focaModalService, focaModalPrecioCondicionService,idCliente | 109 | focaModalService, focaModalPrecioCondicionService,parametros |
111 | ) { | 110 | ) { |
112 | $scope.plazos = [ | 111 | $scope.plazos = [ |
113 | { | 112 | { |
114 | dias: 0, | 113 | dias: 0, |
115 | idCliente: idCliente, | 114 | idCliente: parametros.idCliente, |
116 | activo: true | 115 | activo: true |
117 | } | 116 | } |
118 | ]; | 117 | ]; |
119 | 118 | ||
120 | onInit(); | 119 | onInit(); |
121 | 120 | ||
122 | function onInit() { | 121 | function onInit() { |
123 | focaModalPrecioCondicionService.getPlazosByIdCliente(idCliente) | 122 | focaModalPrecioCondicionService.getPlazosByIdCliente(parametros.idCliente) |
124 | .then(function (res) { | 123 | .then(function (res) { |
125 | res.data.forEach(function (item) { | 124 | res.data.forEach(function (item) { |
126 | $scope.plazos.push(item); | 125 | $scope.plazos.push(item); |
127 | }); | 126 | }); |
128 | }) | 127 | }) |
129 | .catch(function (e) { console.error(e) }); | 128 | .catch(function (e) { console.error(e) }); |
130 | } | 129 | } |
131 | 130 | ||
132 | //#region Metodos para los plazos | 131 | //#region Metodos para los plazos |
133 | $scope.addPlazo = function (key) { | 132 | $scope.addPlazo = function (key) { |
134 | if (key != 13) return; | 133 | if (key != 13) return; |
135 | if ($scope.plazos.length === 100) return; | 134 | if ($scope.plazos.length === 100) return; |
136 | for (var i = 1; i < $scope.plazos.length; i++) { | 135 | for (var i = 1; i < $scope.plazos.length; i++) { |
137 | if ($scope.plazos[0].dias == $scope.plazos[i].dias && $scope.plazos[i].activo == true) { | 136 | if ($scope.plazos[0].dias == $scope.plazos[i].dias && $scope.plazos[i].activo == true) { |
138 | focaModalService.alert("Ya existe un plazo con este valor"); | 137 | focaModalService.alert("Ya existe un plazo con este valor"); |
139 | return; | 138 | return; |
140 | } | 139 | } |
141 | } | 140 | } |
142 | $scope.plazos.unshift({ dias: 0, idCliente: idCliente, activo: true }); | 141 | $scope.plazos.unshift({ dias: 0, idCliente: parametros.idCliente, activo: true }); |
143 | $scope.focused = 1; | 142 | $scope.focused = 1; |
144 | }; | 143 | }; |
145 | $scope.deletePlazo = function (index) { | 144 | $scope.deletePlazo = function (index) { |
146 | $scope.plazos[index].activo = false; | 145 | $scope.plazos[index].activo = false; |
147 | }; | 146 | }; |
148 | $scope.validateMinMax = function (plazo, min, max) { | 147 | $scope.validateMinMax = function (plazo, min, max) { |
149 | plazo.dias = parseInt(plazo.dias); | 148 | plazo.dias = parseInt(plazo.dias); |
150 | if (plazo.dias === null || plazo.dias === undefined || isNaN(plazo.dias)) { | 149 | if (plazo.dias === null || plazo.dias === undefined || isNaN(plazo.dias)) { |
151 | plazo.dias = '0'; | 150 | plazo.dias = '0'; |
152 | return; | 151 | return; |
153 | } | 152 | } |
154 | if (parseInt(plazo.dias) < min) { | 153 | if (parseInt(plazo.dias) < min) { |
155 | plazo.dias = '0'; | 154 | plazo.dias = '0'; |
156 | return; | 155 | return; |
157 | } | 156 | } |
158 | if (parseInt(plazo.dias) > max) { | 157 | if (parseInt(plazo.dias) > max) { |
159 | plazo.dias = '365'; | 158 | plazo.dias = '365'; |
160 | return; | 159 | return; |
161 | } | 160 | } |
162 | }; | 161 | }; |
163 | //#endregion | 162 | //#endregion |
164 | 163 | ||
165 | $scope.closeModalPrecioCondicion = function () { | 164 | $scope.closeModalPrecioCondicion = function () { |
166 | $uibModalInstance.dismiss('cancel'); | 165 | $uibModalInstance.dismiss('cancel'); |
167 | }; | 166 | }; |
168 | $scope.guardarPlazos = function () { | 167 | $scope.guardarPlazos = function () { |
169 | $scope.plazos.shift(); | 168 | $scope.plazos.shift(); |
170 | focaModalPrecioCondicionService.createPlazo($scope.plazos) | 169 | focaModalPrecioCondicionService.createPlazo($scope.plazos) |
171 | .then(function () { | 170 | .then(function () { |
172 | var precioCondicion = { | 171 | var precioCondicion = { |
173 | plazoPago: $filter('filter')($scope.plazos, { activo: true }, true) | 172 | plazoPago: $filter('filter')($scope.plazos, { activo: true }, true) |
174 | }; | 173 | }; |
175 | $uibModalInstance.close(precioCondicion); | 174 | $uibModalInstance.close(precioCondicion); |
176 | }) | 175 | }) |
177 | .catch(function (e) { console.error(e) }) | 176 | .catch(function (e) { console.error(e) }) |
178 | }; | 177 | }; |
179 | } | 178 | } |
180 | ]); | 179 | ]); |
181 | 180 |