Commit 67099f1abb73cd4d9ebdfdb3751384e4b5e6f097

Authored by Eric Fernandez
Exists in master

Merge branch 'master' into 'master'

Master

See merge request !8
src/js/controller.js
1 angular.module('focaAbmPreciosCondiciones') 1 angular.module('focaAbmPreciosCondiciones')
2 .controller('focaAbmPreciosCondicionesController', [ 2 .controller('focaAbmPreciosCondicionesController', [
3 '$scope', 'focaAbmPreciosCondicionesService', '$location', 3 '$scope', 'focaAbmPreciosCondicionesService', '$location',
4 'focaModalService', 'focaBotoneraLateralService', '$timeout', 4 'focaModalService', 'focaBotoneraLateralService', '$timeout',
5 function($scope, focaAbmPreciosCondicionesService, $location, 5 function($scope, focaAbmPreciosCondicionesService, $location,
6 focaModalService, focaBotoneraLateralService, $timeout) { 6 focaModalService, focaBotoneraLateralService, $timeout) {
7 7
8 $timeout(function() { 8 $timeout(function() {
9 focaBotoneraLateralService.showSalir(true); 9 focaBotoneraLateralService.showSalir(true);
10 focaBotoneraLateralService.showPausar(false); 10 focaBotoneraLateralService.showPausar(false);
11 focaBotoneraLateralService.showCancelar(false); 11 focaBotoneraLateralService.showCancelar(false);
12 focaBotoneraLateralService.showGuardar(false); 12 focaBotoneraLateralService.showGuardar(false);
13 }); 13 });
14 $scope.filters = ''; 14 $scope.filters = '';
15 $scope.now = new Date(); 15 $scope.now = new Date();
16 $scope.editar = function(id) { 16 $scope.editar = function(id) {
17 $location.path('/precio-condicion/' + id); 17 $location.path('/precio-condicion/' + id);
18 }; 18 };
19 $scope.solicitarConfirmacion = function(precioCondicion) { 19 $scope.solicitarConfirmacion = function(precioCondicion) {
20 focaModalService.confirm('¿Está seguro que desea borrar el precio condición' + 20 focaModalService.confirm('¿Está seguro que desea borrar el precio condición' +
21 precioCondicion.codigo + ' ' + precioCondicion.nombre + ' ?').then( 21 precioCondicion.codigo + ' ' + precioCondicion.nombre + ' ?').then(
22 function(data) { 22 function(data) {
23 if (data) { 23 if (data) {
24 focaAbmPreciosCondicionesService 24 focaAbmPreciosCondicionesService
25 .borrarPrecioCondicion(precioCondicion.id); 25 .borrarPrecioCondicion(precioCondicion.id);
26 $scope.preciosCondiciones.splice( 26 $scope.preciosCondiciones.splice(
27 $scope.preciosCondiciones.indexOf(precioCondicion), 1 27 $scope.preciosCondiciones.indexOf(precioCondicion), 1
28 ); 28 );
29 } 29 }
30 } 30 }
31 ); 31 );
32 }; 32 };
33 33
34 $scope.buscar = function(key) { 34 $scope.buscar = function(key) {
35 if(key === 13){ 35 if(key === 13){
36 focaAbmPreciosCondicionesService 36 focaAbmPreciosCondicionesService
37 .obtenerPreciosCondiciones($scope.filters) 37 .obtenerPreciosCondiciones($scope.filters)
38 .then(function(datos) { 38 .then(function(datos) {
39 $scope.preciosCondiciones = datos.data; 39 $scope.preciosCondiciones = datos.data;
40 $scope.preciosCondiciones.forEach(function(precioCondicion) { 40 $scope.preciosCondiciones.forEach(function(precioCondicion) {
41 precioCondicion.plazoPago.sort(function(a, b) { 41 precioCondicion.plazoPago.sort(function(a, b) {
42 return a.dias- b.dias; 42 return a.dias- b.dias;
43 }); 43 });
44 }); 44 });
45 }); 45 });
46 } 46 }
47 }; 47 };
48 } 48 }
49 ]) 49 ])
50 .controller('focaAbmPrecioCondicionController', [ 50 .controller('focaAbmPrecioCondicionController', [
51 '$scope', 'focaAbmPreciosCondicionesService', 'focaBotoneraLateralService', 51 '$scope', 'focaAbmPreciosCondicionesService', 'focaBotoneraLateralService',
52 '$routeParams', '$location', 'focaModalService', '$timeout', '$uibModal', '$window', 52 '$routeParams', '$location', 'focaModalService', '$timeout', '$uibModal', '$window',
53 function( 53 function(
54 $scope, focaAbmPreciosCondicionesService, focaBotoneraLateralService, 54 $scope, focaAbmPreciosCondicionesService, focaBotoneraLateralService,
55 $routeParams, $location, focaModalService, $timeout, $uibModal, $window 55 $routeParams, $location, focaModalService, $timeout, $uibModal, $window
56 ) { 56 ) {
57 $scope.focused = 1; 57 $scope.focused = 1;
58 $scope.plazosAEliminar = []; 58 $scope.plazosAEliminar = [];
59 $scope.mostrarPlazos = $routeParams.id > 0; 59 $scope.mostrarPlazos = $routeParams.id > 0;
60 $scope.now = new Date(); 60 $scope.now = new Date();
61 $scope.listaPrecioLabel = ''; 61 $scope.listaPrecioLabel = '';
62 focaAbmPreciosCondicionesService.obtenerPrecioCondicion($routeParams.id) 62 focaAbmPreciosCondicionesService.obtenerPrecioCondicion($routeParams.id)
63 .then(function(datos) { 63 .then(function(datos) {
64 $scope.precioCondicion = { 64 $scope.precioCondicion = {
65 id: 0, 65 id: 0,
66 codigo: '', 66 codigo: '',
67 nombre: '', 67 nombre: '',
68 descripcion: '', 68 descripcion: '',
69 idListaPrecio: 0, 69 idListaPrecio: 0,
70 vigencia: new Date() 70 vigencia: new Date()
71 }; 71 };
72 if(datos.data.id) { 72 if(datos.data.id) {
73 $scope.precioCondicion = datos.data; 73 $scope.precioCondicion = datos.data;
74 $scope.listaPrecioLabel = datos.data.listaPrecio.ID.trim() + 74 $scope.listaPrecioLabel = datos.data.listaPrecio.ID.trim() +
75 ' - ' + datos.data.listaPrecio.DES; 75 ' - ' + datos.data.listaPrecio.DES;
76 $scope.$broadcast('addCabecera', { 76 $scope.$broadcast('addCabecera', {
77 label: 'Precio y condición:', 77 label: 'Precio y condición:',
78 valor: datos.data.nombre 78 valor: datos.data.nombre
79 }); 79 });
80 focaAbmPreciosCondicionesService.obtenerPlazoPago(datos.data.id) 80 focaAbmPreciosCondicionesService.obtenerPlazoPago(datos.data.id)
81 .then(function(datos) { 81 .then(function(datos) {
82 $scope.precioCondicion.plazos = datos.data; 82 $scope.precioCondicion.plazos = datos.data;
83 $scope.precioCondicion.plazos.sort(function(a, b) { 83 $scope.precioCondicion.plazos.sort(function(a, b) {
84 return a.dias- b.dias; 84 return a.dias- b.dias;
85 }); 85 });
86 $scope.plazoACargar = 86 $scope.plazoACargar =
87 { 87 {
88 item: datos.data.length + 1 88 item: datos.data.length + 1
89 }; 89 };
90 }); 90 });
91 } 91 }
92 }); 92 });
93 93
94 $timeout(function() { 94 $timeout(function() {
95 focaBotoneraLateralService.showSalir(false); 95 focaBotoneraLateralService.showSalir(false);
96 focaBotoneraLateralService.showPausar(true); 96 focaBotoneraLateralService.showPausar(true);
97 focaBotoneraLateralService.showCancelar(true); 97 focaBotoneraLateralService.showCancelar(true);
98 focaBotoneraLateralService.showGuardar(true, $scope.guardar); 98 focaBotoneraLateralService.showGuardar(true, $scope.guardar);
99 }); 99 });
100 100
101 $scope.cancelar = function() { 101 $scope.cancelar = function() {
102 $location.path('/precio-condicion'); 102 $location.path('/precio-condicion');
103 }; 103 };
104 $scope.guardar = function() { 104 $scope.guardar = function() {
105 var promises = []; 105 var promises = [];
106 var precioCondicion = $scope.precioCondicion; 106 var precioCondicion = $scope.precioCondicion;
107 precioCondicion.idListaPrecio = precioCondicion.listaPrecio.ID; 107 precioCondicion.idListaPrecio = precioCondicion.listaPrecio.ID;
108 delete precioCondicion.listaPrecio; 108 delete precioCondicion.listaPrecio;
109 if($scope.mostrarPlazos) { 109 if($scope.mostrarPlazos) {
110 promises.push( 110 promises.push(
111 focaAbmPreciosCondicionesService 111 focaAbmPreciosCondicionesService
112 .guardarPlazosPago($scope.precioCondicion.plazos) 112 .guardarPlazosPago($scope.precioCondicion.plazos)
113 ); 113 );
114 $scope.plazosAEliminar.forEach(function(id) { 114 $scope.plazosAEliminar.forEach(function(id) {
115 promises.push( 115 promises.push(
116 focaAbmPreciosCondicionesService 116 focaAbmPreciosCondicionesService
117 .borrarPlazoPago(id) 117 .borrarPlazoPago(id)
118 ); 118 );
119 }); 119 });
120 } 120 }
121 promises.push( 121 promises.push(
122 focaAbmPreciosCondicionesService 122 focaAbmPreciosCondicionesService
123 .guardarPrecioCondicion(precioCondicion) 123 .guardarPrecioCondicion(precioCondicion)
124 ); 124 );
125 125
126 Promise.all(promises).then(function() { 126 Promise.all(promises).then(function() {
127 $window.location.assign('/#!/precio-condicion'); 127 $window.location.assign('/#!/precio-condicion');
128 }, function(err){ 128 }, function(err){
129 console.error(err); 129 console.error(err);
130 }); 130 });
131 }; 131 };
132 132
133 $scope.agregarPlazo = function(key) { 133 $scope.agregarPlazo = function(key) {
134 if(key === 13) { 134 if(key === 13) {
135 if(!$scope.plazoACargar.dias) { 135 if(!$scope.plazoACargar.dias && $scope.plazoACargar.dias !== 0) {
136 focaModalService.alert('Ingrese cantidad de días'); 136 focaModalService.alert('Ingrese cantidad de días');
137 return; 137 return;
138 } 138 }
139 var tieneEseDia = $scope.precioCondicion.plazos.filter(function(a) { 139 var tieneEseDia = $scope.precioCondicion.plazos.filter(function(a) {
140 return a.dias === $scope.plazoACargar.dias; 140 return a.dias === $scope.plazoACargar.dias;
141 }); 141 });
142 if(tieneEseDia.length > 0) { 142 if(tieneEseDia.length > 0) {
143 focaModalService.alert('Ya ha ingresado un plazo con esos días'); 143 focaModalService.alert('Ya ha ingresado un plazo con esos días');
144 return; 144 return;
145 } 145 }
146 $scope.plazoACargar.idPreciosCondiciones = $scope.precioCondicion.id; 146 $scope.plazoACargar.idPreciosCondiciones = $scope.precioCondicion.id;
147 $scope.plazoACargar.activo = true; 147 $scope.plazoACargar.activo = true;
148 $scope.precioCondicion.plazos.push($scope.plazoACargar); 148 $scope.precioCondicion.plazos.push($scope.plazoACargar);
149 $scope.plazoACargar = 149 $scope.plazoACargar =
150 { 150 {
151 item: $scope.precioCondicion.plazos.length + 1 151 item: $scope.precioCondicion.plazos.length + 1
152 }; 152 };
153 } 153 }
154 }; 154 };
155 $scope.quitarPlazo = function(key) { 155 $scope.quitarPlazo = function(key) {
156 if($scope.precioCondicion.plazos[key].id) 156 if($scope.precioCondicion.plazos[key].id)
157 $scope.plazosAEliminar.push($scope.precioCondicion.plazos[key].id); 157 $scope.plazosAEliminar.push($scope.precioCondicion.plazos[key].id);
158 158
159 $scope.precioCondicion.plazos.splice(key, 1); 159 $scope.precioCondicion.plazos.splice(key, 1);
160 $scope.plazoACargar = 160 $scope.plazoACargar =
161 { 161 {
162 item: $scope.precioCondicion.plazos.length + 1 162 item: $scope.precioCondicion.plazos.length + 1
163 }; 163 };
164 }; 164 };
165 $scope.solicitarConfirmacionPlazoPago = function(plazoPago) { 165 $scope.solicitarConfirmacionPlazoPago = function(plazoPago) {
166 focaModalService.confirm('¿Está seguro que desea borrar el plazo de pago ' + 166 focaModalService.confirm('¿Está seguro que desea borrar el plazo de pago ' +
167 plazoPago.item + ' ' + plazoPago.dias + ' ?').then( 167 plazoPago.item + ' ' + plazoPago.dias + ' ?').then(
168 function(confirm) { 168 function(confirm) {
169 if (confirm) { 169 if (confirm) {
170 focaAbmPreciosCondicionesService.borrarPlazoPago(plazoPago.id); 170 focaAbmPreciosCondicionesService.borrarPlazoPago(plazoPago.id);
171 $scope.precioCondicion.plazos.splice( 171 $scope.precioCondicion.plazos.splice(
172 $scope.precioCondicion.plazos.indexOf(plazoPago), 1 172 $scope.precioCondicion.plazos.indexOf(plazoPago), 1
173 ); 173 );
174 } 174 }
175 } 175 }
176 ); 176 );
177 }; 177 };
178 178
179 $scope.seleccionarListaPrecio = function(key) { 179 $scope.seleccionarListaPrecio = function(key) {
180 if(key === 13){ 180 if(key === 13){
181 var modalInstance = $uibModal.open( 181 var modalInstance = $uibModal.open(
182 { 182 {
183 ariaLabelledBy: 'Busqueda de Listas de precio', 183 ariaLabelledBy: 'Busqueda de Listas de precio',
184 templateUrl: 'modal-lista-precio.html', 184 templateUrl: 'modal-lista-precio.html',
185 controller: 'focaModalListaPrecioCtrl', 185 controller: 'focaModalListaPrecioCtrl',
186 size: 'lg' 186 size: 'lg'
187 } 187 }
188 ); 188 );
189 modalInstance.result.then(function(listaPrecio) { 189 modalInstance.result.then(function(listaPrecio) {
190 $scope.precioCondicion.listaPrecio = listaPrecio; 190 $scope.precioCondicion.listaPrecio = listaPrecio;
191 $scope.listaPrecioLabel = listaPrecio.ID + ' - ' + listaPrecio.DES; 191 $scope.listaPrecioLabel = listaPrecio.ID + ' - ' + listaPrecio.DES;
192 $scope.focused = 4; 192 $scope.focused = 4;
193 }); 193 });
194 } 194 }
195 }; 195 };
196 196
197 $scope.verProductosListaPrecio = function() {
198 $uibModal.open(
199 {
200 ariaLabelledBy: 'Busqueda de Productos',
201 templateUrl: 'modal-busqueda-productos.html',
202 controller: 'modalBusquedaProductosCtrl',
203 resolve: {
204 parametroProducto: {
205 idLista: $scope.precioCondicion.listaPrecio.ID,
206 cotizacion: 1,
207 simbolo: '$',
208 soloMostrar: true
209 }
210 },
211 size: 'md'
212 }
213 );
214 };
215
197 $scope.next = function(key) { 216 $scope.next = function(key) {
198 if(key === 13) $scope.focused++; 217 if(key === 13) $scope.focused++;
199 }; 218 };
200 } 219 }
201 ]); 220 ]);
202 221
1 angular.module('focaAbmPreciosCondiciones') 1 angular.module('focaAbmPreciosCondiciones')
2 .service('focaAbmPreciosCondicionesService', [ 2 .service('focaAbmPreciosCondicionesService', [
3 '$http', 'API_ENDPOINT', 3 '$http', 'API_ENDPOINT',
4 function($http, API_ENDPOINT) { 4 function($http, API_ENDPOINT) {
5 return { 5 return {
6 obtenerPreciosCondiciones: function(nombre) { 6 obtenerPreciosCondiciones: function(nombre) {
7 return $http.post(API_ENDPOINT.URL + '/precios-condiciones', {nombre: nombre}); 7 return $http.post(API_ENDPOINT.URL + '/precios-condiciones', {nombre: nombre});
8 }, 8 },
9 obtenerPrecioCondicion: function(id) { 9 obtenerPrecioCondicion: function(id) {
10 return $http.get(API_ENDPOINT.URL + '/precio-condicion/' + id); 10 return $http.get(API_ENDPOINT.URL + '/precio-condicion/' + id);
11 }, 11 },
12 guardarPrecioCondicion: function(precioCondicion) { 12 guardarPrecioCondicion: function(precioCondicion) {
13 return $http.post( 13 return $http.post(
14 API_ENDPOINT.URL + '/precio-condicion', 14 API_ENDPOINT.URL + '/precio-condicion',
15 {precioCondicion: precioCondicion} 15 {precioCondicion: precioCondicion}
16 ); 16 );
17 }, 17 },
18 borrarPrecioCondicion: function(id) { 18 borrarPrecioCondicion: function(id) {
19 return $http.delete(API_ENDPOINT.URL + '/precio-condicion/' + id); 19 return $http.delete(API_ENDPOINT.URL + '/precio-condicion/' + id);
20 }, 20 },
21 obtenerPlazoPago: function(idPrecioCondicion) { 21 obtenerPlazoPago: function(idPrecioCondicion) {
22 return $http.get( 22 return $http.get(
23 API_ENDPOINT.URL + '/plazo-pago/precio-condicion/' + idPrecioCondicion 23 API_ENDPOINT.URL + '/plazo-pago/precio-condicion/' + idPrecioCondicion
24 ); 24 );
25 }, 25 },
26 borrarPlazoPago: function(id) { 26 borrarPlazoPago: function(id) {
27 return $http.delete(API_ENDPOINT.URL + '/plazo-pago/' + id); 27 return $http.delete(API_ENDPOINT.URL + '/plazo-pago/' + id);
28 }, 28 },
29 guardarPlazosPago: function(plazos){ 29 guardarPlazosPago: function(plazos) {
30 return $http.post( 30 return $http.post(
31 API_ENDPOINT.URL + '/plazos-pago', 31 API_ENDPOINT.URL + '/plazos-pago',
32 {plazosPago: plazos} 32 {plazosPago: plazos}
33 ); 33 );
34 } 34 }
35 }; 35 };
36 } 36 }
37 ]); 37 ]);
38 38
src/views/foca-abm-precios-condiciones-item.html
1 <div class="row"> 1 <div class="row">
2 <foca-cabecera-facturador 2 <foca-cabecera-facturador
3 titulo="'Precios y condiciones'" 3 titulo="'Precios y condiciones'"
4 fecha="now" 4 fecha="now"
5 class="mb-0 col-lg-12" 5 class="mb-0 col-lg-12"
6 ></foca-cabecera-facturador> 6 ></foca-cabecera-facturador>
7 </div> 7 </div>
8 <div class="row"> 8 <div class="row">
9 <form class="col-md-10"> 9 <form class="col-md-10">
10 <input type="hidden" name="id" ng-model="precioCondicion.id" /> 10 <input type="hidden" name="id" ng-model="precioCondicion.id" />
11 <div class="row mb-3"> 11 <div class="row mb-3">
12 <label class="col-sm-2 col-form-label">Código</label> 12 <label class="col-sm-2 col-form-label">Código</label>
13 <input 13 <input
14 class="form-control col-sm-4" 14 class="form-control col-sm-4"
15 type="text" 15 type="text"
16 name="codigo" 16 name="codigo"
17 ng-value="precioCondicion.id | rellenarDigitos: 4: 0" 17 ng-value="precioCondicion.id | rellenarDigitos: 4: 0"
18 autocomplete="off" 18 autocomplete="off"
19 readonly 19 readonly
20 /> 20 />
21 <label class="col-sm-2 col-form-label">Nombre</label> 21 <label class="col-sm-2 col-form-label">Nombre</label>
22 <input 22 <input
23 class="form-control col-sm-4" 23 class="form-control col-sm-4"
24 type="text" 24 type="text"
25 name="nombre" 25 name="nombre"
26 ng-model="precioCondicion.nombre" 26 ng-model="precioCondicion.nombre"
27 autocomplete="off" 27 autocomplete="off"
28 foca-focus="focused == 1" 28 foca-focus="focused == 1"
29 ng-focus="focused = 1" 29 ng-focus="focused = 1"
30 ng-keypress="next($event.keyCode)" 30 ng-keypress="next($event.keyCode)"
31 teclado-virtual 31 teclado-virtual
32 /> 32 />
33 </div> 33 </div>
34 <div class="form-group row"> 34 <div class="form-group row">
35 <label class="col-sm-2 col-form-label">Descripción</label> 35 <label class="col-sm-2 col-form-label">Descripción</label>
36 <input 36 <input
37 class="form-control col-sm-10" 37 class="form-control col-sm-10"
38 type="text" 38 type="text"
39 name="nombre" 39 name="nombre"
40 ng-model="precioCondicion.descripcion" 40 ng-model="precioCondicion.descripcion"
41 autocomplete="off" 41 autocomplete="off"
42 foca-focus="focused == 2" 42 foca-focus="focused == 2"
43 ng-focus="focused = 2" 43 ng-focus="focused = 2"
44 ng-keypress="next($event.keyCode)" 44 ng-keypress="next($event.keyCode)"
45 teclado-virtual 45 teclado-virtual
46 /> 46 />
47 </div> 47 </div>
48 <div class="row"> 48 <div class="row">
49 <label class="col-sm-2 col-form-label">Lista de precios</label> 49 <label class="col-sm-2 col-form-label">Lista de precios</label>
50 <div class="col-sm-4 input-group p-0"> 50 <div class="col-sm-4 input-group p-0">
51 <input 51 <input
52 ng-model="listaPrecioLabel" 52 ng-model="listaPrecioLabel"
53 class="form-control" 53 class="form-control"
54 foca-focus="focused == 3" 54 foca-focus="focused == 3"
55 ng-focus="focused = 3" 55 ng-focus="focused = 3"
56 ng-keypress="seleccionarListaPrecio($event.keyCode)" 56 ng-keypress="seleccionarListaPrecio($event.keyCode)"
57 readonly 57 readonly
58 /> 58 />
59 <div class="input-group-append"> 59 <div class="input-group-append">
60 <button 60 <button
61 class="btn btn-outline-secondary form-control"
62 title="Ver productos"
63 type="button"
64 ng-click="verProductosListaPrecio()"
65 ng-show="precioCondicion.listaPrecio"
66 >
67 <i class="fa fa-eye" aria-hidden="true"></i>
68 </button>
69 <button
61 ladda="searchLoading" 70 ladda="searchLoading"
62 class="btn btn-outline-secondary form-control" 71 class="btn btn-outline-secondary form-control"
63 title="Buscar" 72 title="Buscar"
64 type="button" 73 type="button"
65 ng-click="seleccionarListaPrecio(13)" 74 ng-click="seleccionarListaPrecio(13)"
66 > 75 >
67 <i class="fa fa-search" aria-hidden="true"></i> 76 <i class="fa fa-search" aria-hidden="true"></i>
68 </button> 77 </button>
69 </div> 78 </div>
70 </div> 79 </div>
71 <label class="col-sm-2 col-form-label" ng-show="mostrarPlazos">Plazos</label> 80 <label class="col-sm-2 col-form-label" ng-show="mostrarPlazos">Plazos</label>
72 <div class="col-sm-4 p-0" ng-show="mostrarPlazos"> 81 <div class="col-sm-4 p-0" ng-show="mostrarPlazos">
73 <div class="input-group p-0"> 82 <div class="input-group p-0">
74 <input 83 <input
75 type="number" 84 type="number"
76 class="form-control text-right" 85 class="form-control text-right"
77 min="0" 86 min="0"
78 ng-model="plazoACargar.dias" 87 ng-model="plazoACargar.dias"
79 ng-keypress="agregarPlazo($event.keyCode)" 88 ng-keypress="agregarPlazo($event.keyCode)"
80 foca-focus="focused == 4" 89 foca-focus="focused == 4"
81 ng-focus="focused = 4" 90 ng-focus="focused = 4"
82 placeholder="Días" 91 placeholder="Días"
83 /> 92 />
84 <div class="input-group-append"> 93 <div class="input-group-append">
85 <button 94 <button
86 class="btn btn-outline-secondary form-control" 95 class="btn btn-outline-secondary form-control"
87 title="Agregar" 96 title="Agregar"
88 type="button" 97 type="button"
89 ng-click="agregarPlazo(13)" 98 ng-click="agregarPlazo(13)"
90 > 99 >
91 <i class="fa fa-save" aria-hidden="true"></i> 100 <i class="fa fa-save" aria-hidden="true"></i>
92 </button> 101 </button>
93 </div> 102 </div>
94 </div> 103 </div>
95 <table class="table table-striped table-sm"> 104 <table class="table table-striped table-sm">
96 <tbody> 105 <tbody>
97 <tr ng-repeat="(key, plazo) in precioCondicion.plazos"> 106 <tr ng-repeat="(key, plazo) in precioCondicion.plazos">
98 <td class="text-right" > 107 <td class="text-right" >
99 <span ng-bind="plazo.dias + ' días'"></span> 108 <span ng-bind="plazo.dias + ' días'"></span>
100 <button 109 <button
101 type="button" 110 type="button"
102 title="Eliminar" 111 title="Eliminar"
103 class="btn btn-outline-secondary ml-1" 112 class="btn btn-outline-secondary ml-1"
104 ng-click="quitarPlazo(key)" 113 ng-click="quitarPlazo(key)"
105 > 114 >
106 <i class="fa fa-trash"></i> 115 <i class="fa fa-trash"></i>
107 </button> 116 </button>
108 </td> 117 </td>
109 </tr> 118 </tr>
110 </tbody> 119 </tbody>
111 </table> 120 </table>
112 </div> 121 </div>
113 </div> 122 </div>
114 </form> 123 </form>
115 </div> 124 </div>
116 125