Commit a40d8827163b0bc6eec54006d0c7618e53a18e7f

Authored by Luigi
1 parent eaa5cb3ba3
Exists in master and in 1 other branch develop

Al seleccionar otro IVA, el tipo de factura se reinicia a 0

Showing 1 changed file with 9 additions and 1 deletions   Show diff stats
src/js/controller.js
... ... @@ -65,7 +65,6 @@ angular.module('focaBusquedaCliente')
65 65 funcion = 'obtenerClientesPorNombreOCuit';
66 66 }
67 67  
68   -
69 68 $scope.searchLoading = true;
70 69 focaBusquedaClienteService
71 70 [funcion]($scope.filters, $scope.vendedor.id || $scope.cobrador.id)
... ... @@ -252,6 +251,9 @@ angular.module('focaBusquedaCliente')
252 251 };
253 252 focaModalService.modal(parametrosModal).then(
254 253 function(iva) {
  254 + if (iva) {
  255 + delete $scope.cliente.tipoFactura.NOMBRE;
  256 + }
255 257 $scope.cliente.iva = iva;
256 258 $timeout(function() {
257 259 $scope.focused = 12;
... ... @@ -328,6 +330,12 @@ angular.module('focaBusquedaCliente')
328 330 }
329 331 };
330 332 $scope.seleccionarTipoFactura = function(key) {
  333 +
  334 + if ($scope.cliente.iva.NOMBRE == '') {
  335 + focaModalService.alert('Seleccione una responsabilidad ante el IVA');
  336 + return;
  337 + }
  338 +
331 339 if (key === 13) {
332 340 var datos;
333 341 if ($scope.cliente.iva.ID == 1) {