Commit 46149b99585d037b62349e4d035835883aaab57b
Exists in
develop
Merge branch 'develop' into 'master'
Develop See merge request !8
Showing
4 changed files
Show diff stats
src/js/controller.js
| 1 | angular.module('focaAbmCliente') | 1 | angular.module('focaAbmCliente') |
| 2 | .controller('focaAbmClienteController', [ | 2 | .controller('focaAbmClienteController', [ |
| 3 | '$scope', 'focaBotoneraLateralService', '$timeout', '$uibModal','focaModalService', | 3 | '$scope', 'focaBotoneraLateralService', '$timeout', '$uibModal','focaModalService', |
| 4 | 'focaAbmClienteService','$filter', | 4 | 'focaAbmClienteService','$filter', |
| 5 | function($scope, focaBotoneraLateralService, $timeout, $uibModal,focaModalService, | 5 | function($scope, focaBotoneraLateralService, $timeout, $uibModal,focaModalService, |
| 6 | focaAbmClienteService, $filter) { | 6 | focaAbmClienteService, $filter) { |
| 7 | $scope.cliente= { | 7 | $scope.cliente= { |
| 8 | NOM: undefined, | 8 | NOM: undefined, |
| 9 | COD: undefined | 9 | COD: undefined |
| 10 | }; | 10 | }; |
| 11 | $scope.vendedor = {}; | 11 | |
| 12 | 12 | $scope.botonCliente = [ | |
| 13 | $scope.botonCliente = [{ | 13 | { |
| 14 | label: 'Cliente', | 14 | label: 'Cliente', |
| 15 | image: 'cliente.png' | 15 | image: 'cliente.png' |
| 16 | }]; | 16 | }, |
| 17 | { | ||
| 18 | label: 'Nuevo Cliente', | ||
| 19 | image: 'nuevoCliente.png' | ||
| 20 | } | ||
| 21 | ]; | ||
| 17 | 22 | ||
| 18 | $scope.botonera = [ | 23 | $scope.botonera = [ |
| 19 | { | 24 | { |
| 20 | label: 'Datos Cliente', | 25 | label: 'Datos Cliente', |
| 21 | image: 'datoscliente.png', | 26 | image: 'datoscliente.png', |
| 22 | }, | 27 | }, |
| 23 | { | 28 | { |
| 24 | label: 'Domicilios de entrega', | 29 | label: 'Domicilios de entrega', |
| 25 | image: 'dimiciliodeentrega.png' | 30 | image: 'domicilioDeEntrega.png' |
| 26 | }, | 31 | }, |
| 27 | { | 32 | { |
| 28 | label: 'Lista de precios', | 33 | label: 'Lista de precios', |
| 29 | image: 'precios-condiciones.png' | 34 | image: 'precios-condiciones.png' |
| 30 | }, | 35 | }, |
| 31 | { | 36 | { |
| 32 | label: 'Plazos', | 37 | label: 'Plazos', |
| 33 | image: 'plazos.png' | 38 | image: 'plazos.png' |
| 34 | } | 39 | } |
| 35 | ]; | 40 | ]; |
| 36 | 41 | ||
| 37 | //SETEO BOTONERA LATERAL | 42 | //SETEO BOTONERA LATERAL |
| 38 | $timeout(function() { | 43 | $timeout(function() { |
| 39 | focaBotoneraLateralService.showSalir(true); | 44 | focaBotoneraLateralService.showSalir(true); |
| 40 | focaBotoneraLateralService.showPausar(false); | 45 | focaBotoneraLateralService.showPausar(false); |
| 41 | focaBotoneraLateralService.showCancelar(false); | 46 | focaBotoneraLateralService.showCancelar(false); |
| 42 | focaBotoneraLateralService.showGuardar(false); | 47 | focaBotoneraLateralService.showGuardar(false); |
| 43 | }); | 48 | }); |
| 44 | 49 | ||
| 45 | $scope.seleccionarCliente = function() { | 50 | $scope.seleccionarCliente = function() { |
| 51 | $scope.$broadcast('cleanCabecera'); | ||
| 46 | var datos = null; | 52 | var datos = null; |
| 47 | focaAbmClienteService.getAllClientes() | 53 | focaAbmClienteService.getAllClientes() |
| 48 | .then(function (res) { | 54 | .then(function (res) { |
| 49 | datos = res.data; | 55 | datos = res.data; |
| 50 | focaModalService.modal({ | 56 | focaModalService.modal({ |
| 51 | titulo: 'Clientes', | 57 | titulo: 'Clientes', |
| 52 | data: datos, | 58 | data: datos, |
| 53 | size: 'md', | 59 | size: 'md', |
| 54 | columnas: [ | 60 | columnas: [ |
| 55 | { | 61 | { |
| 56 | propiedad: 'COD', | 62 | propiedad: 'COD', |
| 57 | nombre: 'Codigo' | 63 | nombre: 'Codigo' |
| 58 | }, | 64 | }, |
| 59 | { | 65 | { |
| 60 | propiedad: 'NOM', | 66 | propiedad: 'NOM', |
| 61 | nombre: 'Nombre' | 67 | nombre: 'Nombre' |
| 62 | }, | 68 | }, |
| 63 | { | 69 | { |
| 64 | propiedad: 'CUIT', | 70 | propiedad: 'CUIT', |
| 65 | nombre: 'CUIT' | 71 | nombre: 'CUIT' |
| 66 | } | 72 | } |
| 67 | ], | 73 | ], |
| 68 | }).then(function (res) { | 74 | }).then(function (res) { |
| 69 | $scope.cliente.NOM = res.NOM; | 75 | $scope.cliente.NOM = res.NOM; |
| 70 | $scope.cliente.COD = res.COD; | 76 | $scope.cliente.COD = res.COD; |
| 71 | $scope.cliente.MOD = res.MOD; | 77 | $scope.cliente.MOD = res.MOD; |
| 72 | $scope.$broadcast('addCabecera', { | 78 | $scope.$broadcast('addCabecera', { |
| 73 | label: 'Cliente:', | 79 | label: 'Cliente:', |
| 74 | valor: $filter('rellenarDigitos') | 80 | valor: $filter('rellenarDigitos') |
| 75 | ($scope.cliente.COD, 5) + ' - ' + $scope.cliente.NOM | 81 | ($scope.cliente.COD, 5) + ' - ' + $scope.cliente.NOM |
| 76 | }); | 82 | }); |
| 77 | }).catch(function (e) { | 83 | }).catch(function (e) { |
| 78 | console.log(e); | 84 | console.log(e); |
| 79 | }); | 85 | }); |
| 80 | }); | 86 | }); |
| 81 | }; | 87 | }; |
| 82 | 88 | ||
| 89 | $scope.seleccionarNuevoCliente = function () { | ||
| 90 | if ($scope.cliente.NOM !== undefined && $scope.cliente.COD !== undefined) { | ||
| 91 | $scope.$broadcast('cleanCabecera'); | ||
| 92 | $scope.cliente= {}; | ||
| 93 | } | ||
| 94 | var modalInstanceCliente = $uibModal.open( | ||
| 95 | { | ||
| 96 | ariaLabelledBy: '', | ||
| 97 | templateUrl: 'foca-modal-nuevo-cliente.html', | ||
| 98 | controller: 'focaModalClienteController', | ||
| 99 | resolve: { | ||
| 100 | idCliente: function () { return null; }, | ||
| 101 | }, | ||
| 102 | size: 'lg', | ||
| 103 | } | ||
| 104 | ); | ||
| 105 | modalInstanceCliente.result | ||
| 106 | .then( function(data) { | ||
| 107 | if (data) { | ||
| 108 | $scope.cliente.NOM = data.NOM; | ||
| 109 | $scope.cliente.COD = data.COD; | ||
| 110 | $scope.$broadcast('cleanCabecera'); | ||
| 111 | $scope.$broadcast('addCabecera', { | ||
| 112 | label: 'Cliente:', | ||
| 113 | valor: $filter('rellenarDigitos')($scope.cliente.NOM) | ||
| 114 | }); | ||
| 115 | } | ||
| 116 | }); | ||
| 117 | }; | ||
| 118 | |||
| 83 | $scope.seleccionarDatosCliente = function () { | 119 | $scope.seleccionarDatosCliente = function () { |
| 84 | if ($scope.cliente.NOM === undefined || $scope.cliente.COD === undefined) { | 120 | if ($scope.cliente.NOM === undefined || $scope.cliente.COD === undefined) { |
| 85 | focaModalService.alert('Seleccione cliente'); | 121 | focaModalService.alert('Seleccione cliente'); |
| 86 | return; | 122 | return; |
| 87 | } else { | 123 | } else { |
| 88 | var modalInstanceCliente = $uibModal.open( | 124 | var modalInstanceCliente = $uibModal.open( |
| 89 | { | 125 | { |
| 90 | ariaLabelledBy: '', | 126 | ariaLabelledBy: '', |
| 91 | templateUrl: 'foca-modal-cliente.html', | 127 | templateUrl: 'foca-modal-cliente.html', |
| 92 | controller: 'focaModalClienteController', | 128 | controller: 'focaModalClienteController', |
| 93 | resolve: { | 129 | resolve: { |
| 94 | idCliente: function () { return $scope.cliente.COD; }, | 130 | idCliente: function () { return $scope.cliente.COD; }, |
| 95 | }, | 131 | }, |
| 96 | size: 'lg', | 132 | size: 'lg', |
| 97 | } | 133 | } |
| 98 | ); | 134 | ); |
| 99 | modalInstanceCliente.result | 135 | modalInstanceCliente.result |
| 100 | .then( function(data) { | 136 | .then( function(data) { |
| 101 | if (data) { | 137 | if (data) { |
| 102 | $scope.cliente.NOM = data.NOM; | 138 | $scope.cliente.NOM = data.NOM; |
| 103 | $scope.$broadcast('cleanCabecera'); | 139 | $scope.$broadcast('cleanCabecera'); |
| 104 | $scope.$broadcast('addCabecera', { | 140 | $scope.$broadcast('addCabecera', { |
| 105 | label: 'Cliente:', | 141 | label: 'Cliente:', |
| 106 | valor: $filter('rellenarDigitos')($scope.cliente.NOM) | 142 | valor: $filter('rellenarDigitos')($scope.cliente.NOM) |
| 107 | }); | 143 | }); |
| 108 | } | 144 | } |
| 109 | }); | 145 | }); |
| 110 | } | 146 | } |
| 111 | }; | 147 | }; |
| 112 | 148 | ||
| 113 | $scope.seleccionarDomiciliosDeEntrega = function () { | 149 | $scope.seleccionarDomiciliosDeEntrega = function () { |
| 114 | if ($scope.cliente.NOM === undefined || $scope.cliente.COD === undefined) { | 150 | if ($scope.cliente.NOM === undefined || $scope.cliente.COD === undefined) { |
| 115 | focaModalService.alert('Seleccione un cliente'); | 151 | focaModalService.alert('Seleccione un cliente'); |
| 116 | return; | 152 | return; |
| 117 | } | 153 | } |
| 118 | var modalInstanceDomicilio = $uibModal.open( | 154 | var modalInstanceDomicilio = $uibModal.open( |
| 119 | { | 155 | { |
| 120 | ariaLabelledBy: 'Busqueda de Domicilios', | 156 | ariaLabelledBy: 'Busqueda de Domicilios', |
| 121 | templateUrl: 'modal-domicilio.html', | 157 | templateUrl: 'modal-domicilio.html', |
| 122 | controller: 'focaModalDomicilioController', | 158 | controller: 'focaModalDomicilioController', |
| 123 | resolve: { | 159 | resolve: { |
| 124 | idCliente: function () { return $scope.cliente.COD; }, | 160 | idCliente: function () { return $scope.cliente.COD; }, |
| 125 | esNuevo: function () { return $scope.cliente.esNuevo; } | 161 | esNuevo: function () { return $scope.cliente.esNuevo; } |
| 126 | }, | 162 | }, |
| 127 | size: 'lg', | 163 | size: 'lg', |
| 128 | } | 164 | } |
| 129 | ); | 165 | ); |
| 130 | modalInstanceDomicilio.result.then( function(data) { | 166 | modalInstanceDomicilio.result.then( function(data) { |
| 131 | if (data) { | 167 | if (data) { |
| 132 | $scope.$broadcast('addCabecera', { | 168 | $scope.$broadcast('addCabecera', { |
| 133 | label: 'Domicilio:', | 169 | label: 'Domicilio:', |
| 134 | valor: data.Calle + ' ' + data.Numero + ' - ' + data.Localidad + | 170 | valor: data.Calle + ' ' + data.Numero + ' - ' + data.Localidad + |
| 135 | ' - ' + data.Provincia | 171 | ' - ' + data.Provincia |
| 136 | }); | 172 | }); |
| 137 | } | 173 | } |
| 138 | }); | 174 | }); |
| 139 | }; | 175 | }; |
| 140 | 176 | ||
| 141 | $scope.seleccionarListaDePrecios = function () { | 177 | $scope.seleccionarListaDePrecios = function () { |
| 142 | if ($scope.cliente.NOM === undefined || $scope.cliente.COD === undefined) { | 178 | if ($scope.cliente.NOM === undefined || $scope.cliente.COD === undefined) { |
| 143 | focaModalService.alert('Seleccione cliente'); | 179 | focaModalService.alert('Seleccione cliente'); |
| 144 | return; | 180 | return; |
| 145 | } | 181 | } |
| 182 | var parametros = { idListaPrecio: $scope.cliente.MOD, idCliente: $scope.cliente.COD }; | ||
| 146 | var modalInstance = $uibModal.open( | 183 | var modalInstance = $uibModal.open( |
| 147 | { | 184 | { |
| 148 | ariaLabelledBy: 'Precio-Condicion: Listas', | 185 | ariaLabelledBy: 'Precio-Condicion: Listas', |
| 149 | templateUrl: 'modal-precios.html', | 186 | templateUrl: 'modal-precios.html', |
| 150 | controller: 'focaModalListaPreciosController', | 187 | controller: 'focaModalListaPreciosController', |
| 151 | size: 'lg', | 188 | size: 'lg', |
| 152 | resolve : { | 189 | resolve : { |
| 153 | idListaPrecio : function () { | 190 | parametros: function () { return parametros; } |
| 154 | return $scope.cliente.MOD || null; | ||
| 155 | } | ||
| 156 | } | 191 | } |
| 157 | } | 192 | } |
| 158 | ); | 193 | ); |
| 159 | modalInstance.result.then( function (data) { | 194 | modalInstance.result.then( function (data) { |
| 160 | if (data) { | 195 | if (data) { |
| 196 | $scope.cliente.MOD = data.listaPrecio.ID; | ||
| 161 | $scope.$broadcast('addCabecera', { | 197 | $scope.$broadcast('addCabecera', { |
| 162 | label: 'Precio y Condicion:', | 198 | label: 'Precio y Condicion:', |
| 163 | valor: $filter('rellenarDigitos')(parseInt(data.listaPrecio.ID), 4) + | 199 | valor: $filter('rellenarDigitos')(parseInt(data.listaPrecio.ID), 4) + |
| 164 | ' - ' + data.listaPrecio.DES | 200 | ' - ' + data.listaPrecio.DES |
| 165 | }); | 201 | }); |
| 166 | } | 202 | } |
| 167 | }); | 203 | }); |
| 168 | }; | 204 | }; |
| 169 | 205 | ||
| 170 | $scope.seleccionarPlazos = function () { | 206 | $scope.seleccionarPlazos = function () { |
| 171 | if ($scope.cliente.NOM === undefined || $scope.cliente.COD === undefined) { | 207 | if ($scope.cliente.NOM === undefined || $scope.cliente.COD === undefined) { |
| 172 | focaModalService.alert('Seleccione cliente'); | 208 | focaModalService.alert('Seleccione cliente'); |
| 173 | return; | 209 | return; |
| 174 | } | 210 | } |
| 175 | var modalInstance = $uibModal.open( | 211 | var modalInstance = $uibModal.open( |
| 176 | { | 212 | { |
| 177 | ariaLabelledBy: 'Plazos', | 213 | ariaLabelledBy: 'Plazos', |
| 178 | templateUrl: 'modal-plazos.html', | 214 | templateUrl: 'modal-plazos.html', |
| 179 | controller: 'focaModalListaPlazosController', | 215 | controller: 'focaModalListaPlazosController', |
| 180 | size: 'lg', | 216 | size: 'lg', |
| 181 | resolve: { | 217 | resolve: { |
| 182 | idCliente: function () { | 218 | idCliente: function () { |
| 183 | return $scope.cliente.COD || null; | 219 | return $scope.cliente.COD || null; |
| 184 | } | 220 | } |
| 185 | } | 221 | } |
| 186 | } | 222 | } |
| 187 | ); | 223 | ); |
| 188 | modalInstance.result.then( function (data) { | 224 | modalInstance.result.then( function (data) { |
| 189 | if (data) { | 225 | if (data) { |
| 190 | var plazosConcat = ''; | 226 | var plazosConcat = ''; |
| 191 | for (var i = 0; i < data.plazoPago.length; i++) { | 227 | for (var i = 0; i < data.plazoPago.length; i++) { |
| 192 | plazosConcat += data.plazoPago[i].dias + ', '; | 228 | plazosConcat += data.plazoPago[i].dias + ', '; |
| 193 | } | 229 | } |
| 194 | plazosConcat = plazosConcat.substring(0, plazosConcat.length - 2); | 230 | plazosConcat = plazosConcat.substring(0, plazosConcat.length - 2); |
| 195 | $scope.$broadcast('addCabecera', { | 231 | $scope.$broadcast('addCabecera', { |
| 196 | label: 'Plazos:', | 232 | label: 'Plazos:', |
| 197 | valor: $filter('rellenarDigitos')(plazosConcat) | 233 | valor: $filter('rellenarDigitos')(plazosConcat) |
| 198 | }); | 234 | }); |
| 199 | } | 235 | } |
| 200 | }); | 236 | }); |
| 201 | }; | 237 | }; |
| 202 | } | 238 | } |
src/js/controllerCliente.js
| 1 | angular.module('focaAbmCliente') | 1 | angular.module('focaAbmCliente') |
| 2 | .controller('focaModalClienteController', [ | 2 | .controller('focaModalClienteController', [ |
| 3 | '$scope', '$timeout', '$uibModalInstance', 'focaModalService', | 3 | '$scope', '$timeout', '$uibModalInstance', 'focaModalService', |
| 4 | 'focaAbmClienteService', 'idCliente', | 4 | 'focaAbmClienteService', 'idCliente', |
| 5 | function ($scope, $timeout, $uibModalInstance, focaModalService, | 5 | function ($scope, $timeout, $uibModalInstance, focaModalService, |
| 6 | focaAbmClienteService, idCliente) { | 6 | focaAbmClienteService, idCliente) { |
| 7 | $scope.cliente = { | 7 | |
| 8 | provincia: {}, | 8 | $scope.clienteTemplate = { |
| 9 | localidad: {}, | 9 | COD: 0, |
| 10 | zona: {}, | 10 | ES_MAY: true, |
| 11 | actividad: {}, | 11 | cuit1: '', |
| 12 | cobrador: {}, | 12 | cuit2: '', |
| 13 | vendedor: {}, | 13 | cuit3: '', |
| 14 | iva: {}, | 14 | provincia: { |
| 15 | tipoFactura: {}, | 15 | NOMBRE: '' |
| 16 | tipoComprobante: {}, | 16 | }, |
| 17 | formaPago: {} | 17 | localidad: { |
| 18 | NOMBRE: '' | ||
| 19 | }, | ||
| 20 | iva: { | ||
| 21 | NOMBRE: '' | ||
| 22 | }, | ||
| 23 | actividad: { | ||
| 24 | NOM: '' | ||
| 25 | }, | ||
| 26 | zona: { | ||
| 27 | NOM: '' | ||
| 28 | }, | ||
| 29 | tipoFactura: { | ||
| 30 | NOMBRE: '' | ||
| 31 | }, | ||
| 32 | tipoComprobante: { | ||
| 33 | NOMBRE: '' | ||
| 34 | }, | ||
| 35 | formaPago: { | ||
| 36 | NOMBRE: '' | ||
| 37 | }, | ||
| 38 | cobrador: { | ||
| 39 | NOM: '' | ||
| 40 | } | ||
| 18 | }; | 41 | }; |
| 42 | |||
| 43 | $scope.cliente = angular.copy($scope.clienteTemplate); | ||
| 44 | $scope.vendedor = {}; | ||
| 45 | |||
| 19 | $scope.regexCuit = new RegExp(/\b(20|23|24|27|30|33|34)(\D)?[0-9]{8}(\D)?[0-9]/); | 46 | $scope.regexCuit = new RegExp(/\b(20|23|24|27|30|33|34)(\D)?[0-9]{8}(\D)?[0-9]/); |
| 20 | $scope.vendedor = {}; | 47 | $scope.vendedor = {}; |
| 21 | 48 | ||
| 22 | focaAbmClienteService.obtenerClientePorCodigo(idCliente) | 49 | if (idCliente) { |
| 23 | .then(function (res) { | 50 | focaAbmClienteService.obtenerClientePorCodigo(idCliente) |
| 24 | var data = res.data[0]; | 51 | .then(function (res) { |
| 25 | $scope.cliente.codigo = data.COD; | 52 | var data = res.data[0]; |
| 26 | $scope.cliente.DOM = data.DOM; | 53 | $scope.cliente.COD = data.COD; |
| 27 | $scope.cliente.NOM = data.NOM; | 54 | $scope.cliente.DOM = data.DOM; |
| 28 | $scope.cliente.CPO = data.CPO; | 55 | $scope.cliente.NOM = data.NOM; |
| 29 | $scope.cliente.provincia.ID = data.PCX; | 56 | $scope.cliente.CPO = data.CPO; |
| 30 | $scope.cliente.provincia.NOMBRE = data.PCI; | 57 | $scope.cliente.provincia.ID = data.PCX; |
| 31 | $scope.cliente.localidad.ID = data.LOX; | 58 | $scope.cliente.provincia.NOMBRE = data.PCI; |
| 32 | $scope.cliente.localidad.NOMBRE = data.LOC; | 59 | $scope.cliente.localidad.ID = data.LOX; |
| 33 | $scope.cliente.zona.ID = data.zona.ID; | 60 | $scope.cliente.localidad.NOMBRE = data.LOC; |
| 34 | $scope.cliente.zona.NOM = data.zona.NOM; | 61 | $scope.cliente.zona.ID = data.zona.ID; |
| 35 | $scope.cliente.actividad.NOM = data.actividad.NOM; | 62 | $scope.cliente.zona.NOM = data.zona.NOM; |
| 36 | $scope.cliente.actividad.ID = data.actividad.ID; | 63 | $scope.cliente.actividad.NOM = data.actividad.NOM; |
| 37 | $scope.cliente.cobrador.NOM = data.cobrador ? data.cobrador.NOM : ''; | 64 | $scope.cliente.actividad.ID = data.actividad.ID; |
| 38 | $scope.cliente.cobrador.NUM = data.cobrador ? data.cobrador.NUM : undefined; | 65 | $scope.cliente.cobrador.NOM = data.cobrador ? data.cobrador.NOM : ''; |
| 39 | $scope.cliente.cobrador.ID = data.cobrador ? data.cobrador.id : undefined; | 66 | $scope.cliente.cobrador.NUM = data.cobrador ? data.cobrador.NUM : undefined; |
| 40 | $scope.vendedor.NOM = data.vendedor.NOM; | 67 | $scope.cliente.cobrador.ID = data.cobrador ? data.cobrador.id : undefined; |
| 41 | $scope.vendedor.id = data.vendedor.id; | 68 | $scope.vendedor.NOM = data.vendedor.NOM; |
| 42 | $scope.cliente.MAIL = data.MAIL; | 69 | $scope.vendedor.id = data.vendedor.id; |
| 43 | $scope.cliente.TEL = data.TEL; | 70 | $scope.cliente.MAIL = data.MAIL; |
| 44 | $scope.cliente.iva.NOMBRE = data.iva.NOMBRE; | 71 | $scope.cliente.TEL = data.TEL; |
| 45 | $scope.cliente.tipoFactura.NOMBRE = data.tipoFactura.NOMBRE; | 72 | $scope.cliente.iva.NOMBRE = data.iva.NOMBRE; |
| 46 | $scope.cliente.tipoFactura.ID = data.tipoFactura.ID; | 73 | $scope.cliente.tipoFactura.NOMBRE = data.tipoFactura.NOMBRE; |
| 47 | var cuit = data.CUIT.split('-'); | 74 | $scope.cliente.tipoFactura.ID = data.tipoFactura.ID; |
| 48 | $scope.cliente.cuit1 = cuit[0]; | 75 | var cuit = data.CUIT.split('-'); |
| 49 | $scope.cliente.cuit2 = cuit[1]; | 76 | $scope.cliente.cuit1 = cuit[0]; |
| 50 | $scope.cliente.cuit3 = cuit[2]; | 77 | $scope.cliente.cuit2 = cuit[1]; |
| 51 | $scope.cliente.tipoComprobante.NOMBRE = data.tipoComprobante.NOMBRE; | 78 | $scope.cliente.cuit3 = cuit[2]; |
| 52 | $scope.cliente.tipoComprobante.ID = data.tipoComprobante.ID; | 79 | $scope.cliente.tipoComprobante.NOMBRE = data.tipoComprobante.NOMBRE; |
| 53 | $scope.cliente.formaPago.NOMBRE = data.formaPago.NOMBRE; | 80 | $scope.cliente.tipoComprobante.ID = data.tipoComprobante.ID; |
| 54 | $scope.cliente.formaPago.ID = data.formaPago.ID; | 81 | $scope.cliente.formaPago.NOMBRE = data.formaPago.NOMBRE; |
| 55 | $scope.cliente.ES_PROS = data.ES_PROS; | 82 | $scope.cliente.formaPago.ID = data.formaPago.ID; |
| 56 | $scope.cliente.ES_MAY = data.ES_MAY; | 83 | $scope.cliente.ES_PROS = data.ES_PROS; |
| 57 | $scope.editando = true; | 84 | $scope.cliente.ES_MAY = data.ES_MAY; |
| 58 | }) | 85 | $scope.editando = true; |
| 59 | .catch(function (e) { console.log(e); }); | 86 | }) |
| 87 | .catch(function (e) { console.log(e); }); | ||
| 88 | } | ||
| 60 | 89 | ||
| 61 | $scope.cancel = function () { | 90 | $scope.cancel = function () { |
| 62 | $uibModalInstance.dismiss('cancel'); | 91 | $uibModalInstance.dismiss('cancel'); |
| 63 | }; | 92 | }; |
| 64 | 93 | ||
| 65 | $scope.guardar = function () { | 94 | $scope.guardar = function () { |
| 66 | if (!$scope.cliente.NOM) { | 95 | if (!$scope.cliente.NOM) { |
| 67 | focaModalService.alert('Ingrese Nombre'); | 96 | focaModalService.alert('Ingrese Nombre'); |
| 68 | return; | 97 | return; |
| 69 | } else if (!$scope.cliente.CPO) { | 98 | } else if (!$scope.cliente.CPO) { |
| 70 | focaModalService.alert('Ingrese Codigo Postal'); | 99 | focaModalService.alert('Ingrese Codigo Postal'); |
| 71 | return; | 100 | return; |
| 72 | } else if (!$scope.cliente.provincia.NOMBRE) { | 101 | } else if (!$scope.cliente.provincia.NOMBRE) { |
| 73 | focaModalService.alert('Seleccione una provincia'); | 102 | focaModalService.alert('Seleccione una provincia'); |
| 74 | return; | 103 | return; |
| 75 | } else if (!$scope.cliente.DOM) { | 104 | } else if (!$scope.cliente.DOM) { |
| 76 | focaModalService.alert('Ingrese Domicilio'); | 105 | focaModalService.alert('Ingrese Domicilio'); |
| 77 | return; | 106 | return; |
| 78 | } else if (!$scope.cliente.localidad.NOMBRE) { | 107 | } else if (!$scope.cliente.localidad.NOMBRE) { |
| 79 | focaModalService.alert('Seleccione una localidad'); | 108 | focaModalService.alert('Seleccione una localidad'); |
| 80 | return; | 109 | return; |
| 81 | } else if (!$scope.cliente.zona.NOM) { | 110 | } else if (!$scope.cliente.zona.NOM) { |
| 82 | focaModalService.alert('Seleccione una zona'); | 111 | focaModalService.alert('Seleccione una zona'); |
| 83 | return; | 112 | return; |
| 84 | } else if (!$scope.cliente.actividad.NOM) { | 113 | } else if (!$scope.cliente.actividad.NOM) { |
| 85 | focaModalService.alert('Seleccione actividad'); | 114 | focaModalService.alert('Seleccione actividad'); |
| 86 | return; | 115 | return; |
| 87 | } else if (!$scope.cliente.cobrador.NUM) { | 116 | } else if (!$scope.cliente.cobrador.NUM) { |
| 88 | focaModalService.alert('Seleccione un cobrador'); | 117 | focaModalService.alert('Seleccione un cobrador'); |
| 89 | return; | 118 | return; |
| 90 | } else if (!$scope.vendedor.NOM) { | 119 | } else if (!$scope.vendedor.NOM) { |
| 91 | focaModalService.alert('Seleccione un vendedor'); | 120 | focaModalService.alert('Seleccione un vendedor'); |
| 92 | return; | 121 | return; |
| 93 | } else if ($scope.cliente.MAIL && !validateEmails($scope.cliente.MAIL)) { | 122 | } else if ($scope.cliente.MAIL && !validateEmails($scope.cliente.MAIL)) { |
| 94 | focaModalService.alert('Ingrese un formato de email vรกlido'); | 123 | focaModalService.alert('Ingrese un formato de email vรกlido'); |
| 95 | return; | 124 | return; |
| 96 | } else if (!$scope.cliente.TEL) { | 125 | } else if (!$scope.cliente.TEL) { |
| 97 | focaModalService.alert('Ingrese un numero de telefono'); | 126 | focaModalService.alert('Ingrese un numero de telefono'); |
| 98 | return; | 127 | return; |
| 99 | } else if (!$scope.cliente.iva.NOMBRE) { | 128 | } else if (!$scope.cliente.iva.NOMBRE) { |
| 100 | focaModalService.alert('Seleccione responsabilidad ante el IVA'); | 129 | focaModalService.alert('Seleccione responsabilidad ante el IVA'); |
| 101 | return; | 130 | return; |
| 102 | } else if (!$scope.cliente.tipoFactura.NOMBRE) { | 131 | } else if (!$scope.cliente.tipoFactura.NOMBRE) { |
| 103 | focaModalService.alert('Seleccione tipo de Factura'); | 132 | focaModalService.alert('Seleccione tipo de Factura'); |
| 104 | return; | 133 | return; |
| 105 | } else if (!$scope.cliente.cuit1 && !$scope.cliente.cuit2 && !$scope.cliente.cuit3) { | 134 | } else if (!$scope.cliente.cuit1 && !$scope.cliente.cuit2 && !$scope.cliente.cuit3) { |
| 106 | focaModalService.alert('Ingrese CUIT'); | 135 | focaModalService.alert('Ingrese CUIT'); |
| 107 | return; | 136 | return; |
| 108 | } else if (!$scope.cliente.cuit1 || !$scope.cliente.cuit2 || !$scope.cliente.cuit3) { | 137 | } else if (!$scope.cliente.cuit1 || !$scope.cliente.cuit2 || !$scope.cliente.cuit3) { |
| 109 | focaModalService.alert('Ingrese CUIT vรกlido'); | 138 | focaModalService.alert('Ingrese CUIT vรกlido'); |
| 110 | return; | 139 | return; |
| 111 | } else if (!$scope.regexCuit.test($scope.cliente.cuit1 + $scope.cliente.cuit2 + $scope.cliente.cuit3)) { | 140 | } else if (!$scope.regexCuit.test($scope.cliente.cuit1 + $scope.cliente.cuit2 + $scope.cliente.cuit3)) { |
| 112 | focaModalService.alert('Ingrese CUIT con formato: XX-XXXXXXXX-X'); | 141 | focaModalService.alert('Ingrese CUIT con formato: XX-XXXXXXXX-X'); |
| 113 | return; | 142 | return; |
| 114 | } else if (!$scope.cliente.tipoComprobante.NOMBRE) { | 143 | } else if (!$scope.cliente.tipoComprobante.NOMBRE) { |
| 115 | focaModalService.alert('Seleccione un Comprobante'); | 144 | focaModalService.alert('Seleccione un Comprobante'); |
| 116 | return; | 145 | return; |
| 117 | } else if (!$scope.cliente.formaPago.NOMBRE) { | 146 | } else if (!$scope.cliente.formaPago.NOMBRE) { |
| 118 | focaModalService.alert('Seleccione una forma de pago'); | 147 | focaModalService.alert('Seleccione una forma de pago'); |
| 119 | return; | 148 | return; |
| 120 | } | 149 | } |
| 121 | $scope.cliente.actividad.ID = parseInt($scope.cliente.actividad.ID); | 150 | $scope.cliente.actividad.ID = parseInt($scope.cliente.actividad.ID); |
| 122 | var cliente = crearCopia(); | 151 | var cliente = crearCopia(); |
| 123 | focaAbmClienteService | 152 | focaAbmClienteService |
| 124 | .guardarCliente(cliente) | 153 | .guardarCliente(cliente) |
| 125 | .then(function () { | 154 | .then(function (data) { |
| 155 | cliente.COD = data.data.COD; | ||
| 126 | $uibModalInstance.close(cliente); | 156 | $uibModalInstance.close(cliente); |
| 127 | }) | 157 | }) |
| 128 | .catch(function (e) { | 158 | .catch(function (e) { |
| 129 | console.log(e); | 159 | console.log(e); |
| 130 | }); | 160 | }); |
| 131 | }; | 161 | }; |
| 132 | $scope.seleccionarProvincia = function (key) { | 162 | $scope.seleccionarProvincia = function (key) { |
| 133 | if (key === 13) { | 163 | if (key === 13) { |
| 134 | var parametrosModal = { | 164 | var parametrosModal = { |
| 135 | searchText: $scope.cliente.provincia.NOMBRE, | 165 | searchText: $scope.cliente.provincia.NOMBRE, |
| 136 | query: '/provincia', | 166 | query: '/provincia', |
| 137 | columnas: [ | 167 | columnas: [ |
| 138 | { | 168 | { |
| 139 | propiedad: 'ID', | 169 | propiedad: 'ID', |
| 140 | nombre: 'Codigo', | 170 | nombre: 'Codigo', |
| 141 | filtro: { | 171 | filtro: { |
| 142 | nombre: 'rellenarDigitos', | 172 | nombre: 'rellenarDigitos', |
| 143 | parametro: 3 | 173 | parametro: 3 |
| 144 | } | 174 | } |
| 145 | }, | 175 | }, |
| 146 | { | 176 | { |
| 147 | propiedad: 'NOMBRE', | 177 | propiedad: 'NOMBRE', |
| 148 | nombre: 'Nombre' | 178 | nombre: 'Nombre' |
| 149 | } | 179 | } |
| 150 | ], | 180 | ], |
| 151 | titulo: 'Bรบsqueda de provincias', | 181 | titulo: 'Bรบsqueda de provincias', |
| 152 | size: 'md' | 182 | size: 'md' |
| 153 | }; | 183 | }; |
| 154 | focaModalService.modal(parametrosModal).then(function (provincia) { | 184 | focaModalService.modal(parametrosModal).then(function (provincia) { |
| 155 | $scope.cliente.provincia = provincia; | 185 | $scope.cliente.provincia = provincia; |
| 156 | $scope.cliente.localidad.NOMBRE = ''; | 186 | $scope.cliente.localidad.NOMBRE = ''; |
| 157 | 187 | ||
| 158 | $timeout(function () { | 188 | $timeout(function () { |
| 159 | $scope.focused = 4; | 189 | $scope.focused = 4; |
| 160 | }); | 190 | }); |
| 161 | }, function () { | 191 | }, function () { |
| 162 | //TODO: funciรณn llamada cuando cancela el modal | 192 | //TODO: funciรณn llamada cuando cancela el modal |
| 163 | }); | 193 | }); |
| 164 | } | 194 | } |
| 165 | }; | 195 | }; |
| 166 | $scope.seleccionarLocalidad = function (key) { | 196 | $scope.seleccionarLocalidad = function (key) { |
| 167 | if ($scope.cliente.provincia.ID === undefined) { | 197 | if ($scope.cliente.provincia.ID === undefined) { |
| 168 | focaModalService.alert('Seleccione una provincia'); | 198 | focaModalService.alert('Seleccione una provincia'); |
| 169 | return; | 199 | return; |
| 170 | } | 200 | } |
| 171 | if (key === 13) { | 201 | if (key === 13) { |
| 172 | var parametrosModal = { | 202 | var parametrosModal = { |
| 173 | searchText: $scope.cliente.localidad.NOMBRE, | 203 | searchText: $scope.cliente.localidad.NOMBRE, |
| 174 | query: '/localidad/' + parseInt($scope.cliente.provincia.ID), | 204 | query: '/localidad/' + parseInt($scope.cliente.provincia.ID), |
| 175 | columnas: [ | 205 | columnas: [ |
| 176 | { | 206 | { |
| 177 | propiedad: 'ID', | 207 | propiedad: 'ID', |
| 178 | nombre: 'Cรณdigo', | 208 | nombre: 'Cรณdigo', |
| 179 | }, | 209 | }, |
| 180 | { | 210 | { |
| 181 | propiedad: 'NOMBRE', | 211 | propiedad: 'NOMBRE', |
| 182 | nombre: 'Nombre' | 212 | nombre: 'Nombre' |
| 183 | } | 213 | } |
| 184 | ], | 214 | ], |
| 185 | titulo: 'Bรบsqueda de localidades', | 215 | titulo: 'Bรบsqueda de localidades', |
| 186 | size: 'md' | 216 | size: 'md' |
| 187 | }; | 217 | }; |
| 188 | focaModalService.modal(parametrosModal).then(function (localidad) { | 218 | focaModalService.modal(parametrosModal).then(function (localidad) { |
| 189 | $scope.cliente.localidad = localidad; | 219 | $scope.cliente.localidad = localidad; |
| 190 | $timeout(function () { | 220 | $timeout(function () { |
| 191 | $scope.focused = 5; | 221 | $scope.focused = 5; |
| 192 | }); | 222 | }); |
| 193 | }, function () { | 223 | }, function () { |
| 194 | //TODO: funciรณn llamada cuando cancela el modal | 224 | //TODO: funciรณn llamada cuando cancela el modal |
| 195 | }); | 225 | }); |
| 196 | } | 226 | } |
| 197 | }; | 227 | }; |
| 198 | $scope.seleccionarZona = function (key) { | 228 | $scope.seleccionarZona = function (key) { |
| 199 | if (key === 13) { | 229 | if (key === 13) { |
| 200 | var parametrosModal = { | 230 | var parametrosModal = { |
| 201 | searchText: $scope.cliente.zona.NOM, | 231 | searchText: $scope.cliente.zona.NOM, |
| 202 | query: '/zona', | 232 | query: '/zona', |
| 203 | columnas: [ | 233 | columnas: [ |
| 204 | { | 234 | { |
| 205 | propiedad: 'ID', | 235 | propiedad: 'ID', |
| 206 | nombre: 'Cรณdigo', | 236 | nombre: 'Cรณdigo', |
| 207 | filtro: { | 237 | filtro: { |
| 208 | nombre: 'rellenarDigitos', | 238 | nombre: 'rellenarDigitos', |
| 209 | parametro: 3 | 239 | parametro: 3 |
| 210 | } | 240 | } |
| 211 | }, | 241 | }, |
| 212 | { | 242 | { |
| 213 | propiedad: 'NOM', | 243 | propiedad: 'NOM', |
| 214 | nombre: 'Nombre' | 244 | nombre: 'Nombre' |
| 215 | } | 245 | } |
| 216 | ], | 246 | ], |
| 217 | titulo: 'Bรบsqueda de zonas', | 247 | titulo: 'Bรบsqueda de zonas', |
| 218 | size: 'md' | 248 | size: 'md' |
| 219 | }; | 249 | }; |
| 220 | focaModalService.modal(parametrosModal).then( | 250 | focaModalService.modal(parametrosModal).then( |
| 221 | function (zona) { | 251 | function (zona) { |
| 222 | $scope.cliente.zona = zona; | 252 | $scope.cliente.zona = zona; |
| 223 | $timeout(function () { | 253 | $timeout(function () { |
| 224 | $scope.focused = 6; | 254 | $scope.focused = 6; |
| 225 | }); | 255 | }); |
| 226 | }, function () { | 256 | }, function () { |
| 227 | // funcion ejecutada cuando se cancela el modal | 257 | // funcion ejecutada cuando se cancela el modal |
| 228 | }); | 258 | }); |
| 229 | } | 259 | } |
| 230 | }; | 260 | }; |
| 231 | $scope.seleccionarActividad = function (key) { | 261 | $scope.seleccionarActividad = function (key) { |
| 232 | if (key === 13) { | 262 | if (key === 13) { |
| 233 | var parametrosModal = { | 263 | var parametrosModal = { |
| 234 | searchText: $scope.cliente.actividad.NOM, | 264 | searchText: $scope.cliente.actividad.NOM, |
| 235 | query: '/actividad', | 265 | query: '/actividad', |
| 236 | columnas: [ | 266 | columnas: [ |
| 237 | { | 267 | { |
| 238 | propiedad: 'ID', | 268 | propiedad: 'ID', |
| 239 | nombre: 'Cรณdigo', | 269 | nombre: 'Cรณdigo', |
| 240 | filtro: { | 270 | filtro: { |
| 241 | nombre: 'rellenarDigitos', | 271 | nombre: 'rellenarDigitos', |
| 242 | parametro: 3 | 272 | parametro: 3 |
| 243 | } | 273 | } |
| 244 | }, | 274 | }, |
| 245 | { | 275 | { |
| 246 | propiedad: 'NOM', | 276 | propiedad: 'NOM', |
| 247 | nombre: 'Nombre' | 277 | nombre: 'Nombre' |
| 248 | } | 278 | } |
| 249 | ], | 279 | ], |
| 250 | titulo: 'Bรบsqueda de actividades', | 280 | titulo: 'Bรบsqueda de actividades', |
| 251 | size: 'md' | 281 | size: 'md' |
| 252 | }; | 282 | }; |
| 253 | focaModalService.modal(parametrosModal).then( | 283 | focaModalService.modal(parametrosModal).then( |
| 254 | function (actividad) { | 284 | function (actividad) { |
| 255 | $scope.cliente.actividad = actividad; | 285 | $scope.cliente.actividad = actividad; |
| 256 | $timeout(function () { | 286 | $timeout(function () { |
| 257 | $scope.focused = 7; | 287 | $scope.focused = 7; |
| 258 | }); | 288 | }); |
| 259 | }, function () { | 289 | }, function () { |
| 260 | // funcion ejecutada cuando se cancela el modal | 290 | // funcion ejecutada cuando se cancela el modal |
| 261 | }); | 291 | }); |
| 262 | } | 292 | } |
| 263 | }; | 293 | }; |
| 264 | $scope.seleccionarCobrador = function (key) { | 294 | $scope.seleccionarCobrador = function (key) { |
| 265 | if (key === 13) { | 295 | if (key === 13) { |
| 266 | var parametrosModal = { | 296 | var parametrosModal = { |
| 267 | searchText: $scope.cliente.cobrador.NOM, | 297 | searchText: $scope.cliente.cobrador.NOM, |
| 268 | query: '/cobrador', | 298 | query: '/cobrador', |
| 269 | columnas: [ | 299 | columnas: [ |
| 270 | { | 300 | { |
| 271 | propiedad: 'NUM', | 301 | propiedad: 'NUM', |
| 272 | nombre: 'Cรณdigo' | 302 | nombre: 'Cรณdigo' |
| 273 | }, | 303 | }, |
| 274 | { | 304 | { |
| 275 | propiedad: 'NOM', | 305 | propiedad: 'NOM', |
| 276 | nombre: 'Nombre' | 306 | nombre: 'Nombre' |
| 277 | } | 307 | } |
| 278 | ], | 308 | ], |
| 279 | titulo: 'Bรบsqueda de cobradores', | 309 | titulo: 'Bรบsqueda de cobradores', |
| 280 | size: 'md' | 310 | size: 'md' |
| 281 | }; | 311 | }; |
| 282 | focaModalService.modal(parametrosModal).then( | 312 | focaModalService.modal(parametrosModal).then( |
| 283 | function (cobrador) { | 313 | function (cobrador) { |
| 284 | $scope.cliente.cobrador = cobrador; | 314 | $scope.cliente.cobrador = cobrador; |
| 285 | }, function () { | 315 | }, function () { |
| 286 | // funcion ejecutada cuando se cancela el modal | 316 | // funcion ejecutada cuando se cancela el modal |
| 287 | }); | 317 | }); |
| 288 | } | 318 | } |
| 289 | }; | 319 | }; |
| 290 | $scope.seleccionarVendedor = function (key) { | 320 | $scope.seleccionarVendedor = function (key) { |
| 291 | if (key === 13) { | 321 | if (key === 13) { |
| 292 | var parametrosModal = { | 322 | var parametrosModal = { |
| 293 | titulo: 'Bรบsqueda vendedores', | 323 | titulo: 'Bรบsqueda vendedores', |
| 294 | query: '/vendedor', | 324 | query: '/vendedor', |
| 295 | columnas: [ | 325 | columnas: [ |
| 296 | { | 326 | { |
| 297 | propiedad: 'NUM', | 327 | propiedad: 'NUM', |
| 298 | nombre: 'Cรณdigo', | 328 | nombre: 'Cรณdigo', |
| 299 | filtro: { | 329 | filtro: { |
| 300 | nombre: 'rellenarDigitos', | 330 | nombre: 'rellenarDigitos', |
| 301 | parametro: 3 | 331 | parametro: 3 |
| 302 | } | 332 | } |
| 303 | }, | 333 | }, |
| 304 | { | 334 | { |
| 305 | propiedad: 'NOM', | 335 | propiedad: 'NOM', |
| 306 | nombre: 'Nombre' | 336 | nombre: 'Nombre' |
| 307 | } | 337 | } |
| 308 | ], | 338 | ], |
| 309 | size: 'md' | 339 | size: 'md' |
| 310 | }; | 340 | }; |
| 311 | focaModalService.modal(parametrosModal).then( | 341 | focaModalService.modal(parametrosModal).then( |
| 312 | function (vendedor) { | 342 | function (vendedor) { |
| 313 | $scope.vendedor = vendedor; | 343 | $scope.vendedor = vendedor; |
| 314 | }, function () { | 344 | }, function () { |
| 315 | // funcion ejecutada cuando se cancela el modal | 345 | // funcion ejecutada cuando se cancela el modal |
| 316 | }); | 346 | }); |
| 317 | } | 347 | } |
| 318 | }; | 348 | }; |
| 319 | $scope.seleccionarIva = function (key) { | 349 | $scope.seleccionarIva = function (key) { |
| 320 | if (key === 13) { | 350 | if (key === 13) { |
| 321 | var parametrosModal = { | 351 | var parametrosModal = { |
| 322 | query: '/iva', | 352 | query: '/iva', |
| 323 | searchText: $scope.cliente.iva.NOMBRE, | 353 | searchText: $scope.cliente.iva.NOMBRE, |
| 324 | columnas: [ | 354 | columnas: [ |
| 325 | { | 355 | { |
| 326 | propiedad: 'ID', | 356 | propiedad: 'ID', |
| 327 | nombre: 'Cรณdigo', | 357 | nombre: 'Cรณdigo', |
| 328 | filtro: { | 358 | filtro: { |
| 329 | nombre: 'rellenarDigitos', | 359 | nombre: 'rellenarDigitos', |
| 330 | parametro: 3 | 360 | parametro: 3 |
| 331 | } | 361 | } |
| 332 | }, | 362 | }, |
| 333 | { | 363 | { |
| 334 | propiedad: 'NOMBRE', | 364 | propiedad: 'NOMBRE', |
| 335 | nombre: 'Nombre' | 365 | nombre: 'Nombre' |
| 336 | } | 366 | } |
| 337 | ], | 367 | ], |
| 338 | titulo: 'Bรบsqueda de responsabilidad ante el IVA', | 368 | titulo: 'Bรบsqueda de responsabilidad ante el IVA', |
| 339 | size: 'md' | 369 | size: 'md' |
| 340 | }; | 370 | }; |
| 341 | focaModalService.modal(parametrosModal).then( | 371 | focaModalService.modal(parametrosModal).then( |
| 342 | function (iva) { | 372 | function (iva) { |
| 343 | if (iva) { | 373 | if (iva) { |
| 344 | delete $scope.cliente.tipoFactura.NOMBRE; | 374 | delete $scope.cliente.tipoFactura.NOMBRE; |
| 345 | } | 375 | } |
| 346 | $scope.cliente.iva = iva; | 376 | $scope.cliente.iva = iva; |
| 347 | $timeout(function () { | 377 | $timeout(function () { |
| 348 | $scope.focused = 12; | 378 | $scope.focused = 12; |
| 349 | }); | 379 | }); |
| 350 | }, function () { | 380 | }, function () { |
| 351 | // funcion ejecutada cuando se cancela el modal | 381 | // funcion ejecutada cuando se cancela el modal |
| 352 | }); | 382 | }); |
| 353 | } | 383 | } |
| 354 | }; | 384 | }; |
| 355 | $scope.seleccionarTipoFactura = function (key) { | 385 | $scope.seleccionarTipoFactura = function (key) { |
| 356 | 386 | ||
| 357 | if ($scope.cliente.iva.NOMBRE == '') { | 387 | if ($scope.cliente.iva.NOMBRE == '') { |
| 358 | focaModalService.alert('Seleccione una responsabilidad ante el IVA'); | 388 | focaModalService.alert('Seleccione una responsabilidad ante el IVA'); |
| 359 | return; | 389 | return; |
| 360 | } | 390 | } |
| 361 | 391 | ||
| 362 | if (key === 13) { | 392 | if (key === 13) { |
| 363 | var datos; | 393 | var datos; |
| 364 | if ($scope.cliente.iva.ID == 1) { | 394 | if ($scope.cliente.iva.ID == 1) { |
| 365 | datos = [ | 395 | datos = [ |
| 366 | { | 396 | { |
| 367 | ID: 'A', | 397 | ID: 'A', |
| 368 | NOMBRE: 'Factura A' | 398 | NOMBRE: 'Factura A' |
| 369 | }, | 399 | }, |
| 370 | { | 400 | { |
| 371 | ID: 'M', | 401 | ID: 'M', |
| 372 | NOMBRE: 'Factura M' | 402 | NOMBRE: 'Factura M' |
| 373 | }, | 403 | }, |
| 374 | { | 404 | { |
| 375 | ID: 'R', | 405 | ID: 'R', |
| 376 | NOMBRE: 'Remito' | 406 | NOMBRE: 'Remito' |
| 377 | } | 407 | } |
| 378 | ]; | 408 | ]; |
| 379 | } else { | 409 | } else { |
| 380 | datos = [ | 410 | datos = [ |
| 381 | { | 411 | { |
| 382 | ID: 'B', | 412 | ID: 'B', |
| 383 | NOMBRE: 'Factura B' | 413 | NOMBRE: 'Factura B' |
| 384 | }, | 414 | }, |
| 385 | { | 415 | { |
| 386 | ID: 'R', | 416 | ID: 'R', |
| 387 | NOMBRE: 'Remito' | 417 | NOMBRE: 'Remito' |
| 388 | } | 418 | } |
| 389 | ]; | 419 | ]; |
| 390 | } | 420 | } |
| 391 | focaModalService.modal({ | 421 | focaModalService.modal({ |
| 392 | titulo: 'Seleccionar Factura', | 422 | titulo: 'Seleccionar Factura', |
| 393 | data: datos, | 423 | data: datos, |
| 394 | size: 'md', | 424 | size: 'md', |
| 395 | columnas: [ | 425 | columnas: [ |
| 396 | { | 426 | { |
| 397 | propiedad: 'ID', | 427 | propiedad: 'ID', |
| 398 | NOMBRE: 'Codigo' | 428 | NOMBRE: 'Codigo' |
| 399 | }, | 429 | }, |
| 400 | { | 430 | { |
| 401 | propiedad: 'NOMBRE', | 431 | propiedad: 'NOMBRE', |
| 402 | NOMBRE: 'Factura' | 432 | NOMBRE: 'Factura' |
| 403 | } | 433 | } |
| 404 | ], | 434 | ], |
| 405 | }).then(function (res) { | 435 | }).then(function (res) { |
| 406 | $scope.cliente.tipoFactura = res; | 436 | $scope.cliente.tipoFactura = res; |
| 407 | }); | 437 | }); |
| 408 | } | 438 | } |
| 409 | }; | 439 | }; |
| 410 | $scope.pasarCampoCuit = function (numeroCuit) { | 440 | $scope.pasarCampoCuit = function (numeroCuit) { |
| 411 | if (numeroCuit === 1 && $scope.cliente.cuit1.length === 2) { | 441 | if (numeroCuit === 1 && $scope.cliente.cuit1.length === 2) { |
| 412 | $scope.cuitActivo = 2; | 442 | $scope.cuitActivo = 2; |
| 413 | } else if (numeroCuit === 2 && $scope.cliente.cuit2.length === 8) { | 443 | } else if (numeroCuit === 2 && $scope.cliente.cuit2.length === 8) { |
| 414 | $scope.cuitActivo = 3; | 444 | $scope.cuitActivo = 3; |
| 415 | } | 445 | } |
| 416 | }; | 446 | }; |
| 417 | $scope.seleccionarTipoComprobante = function (key) { | 447 | $scope.seleccionarTipoComprobante = function (key) { |
| 418 | if (key === 13) { | 448 | if (key === 13) { |
| 419 | var parametrosModal = { | 449 | var parametrosModal = { |
| 420 | searchText: $scope.cliente.tipoComprobante.NOMBRE, | 450 | searchText: $scope.cliente.tipoComprobante.NOMBRE, |
| 421 | query: '/tipo-comprobante', | 451 | query: '/tipo-comprobante', |
| 422 | columnas: [ | 452 | columnas: [ |
| 423 | { | 453 | { |
| 424 | propiedad: 'ID', | 454 | propiedad: 'ID', |
| 425 | nombre: 'Cรณdigo' | 455 | nombre: 'Cรณdigo' |
| 426 | }, | 456 | }, |
| 427 | { | 457 | { |
| 428 | propiedad: 'NOMBRE', | 458 | propiedad: 'NOMBRE', |
| 429 | nombre: 'Nombre' | 459 | nombre: 'Nombre' |
| 430 | } | 460 | } |
| 431 | ], | 461 | ], |
| 432 | titulo: 'Bรบsqueda de tipos de comprobante', | 462 | titulo: 'Bรบsqueda de tipos de comprobante', |
| 433 | size: 'md' | 463 | size: 'md' |
| 434 | }; | 464 | }; |
| 435 | focaModalService.modal(parametrosModal).then( | 465 | focaModalService.modal(parametrosModal).then( |
| 436 | function (tipoComprobante) { | 466 | function (tipoComprobante) { |
| 437 | $scope.cliente.tipoComprobante = tipoComprobante; | 467 | $scope.cliente.tipoComprobante = tipoComprobante; |
| 438 | $timeout(function () { | 468 | $timeout(function () { |
| 439 | $scope.focused = 17; | 469 | $scope.focused = 17; |
| 440 | }); | 470 | }); |
| 441 | }, function () { | 471 | }, function () { |
| 442 | // funcion ejecutada cuando se cancela el modal | 472 | // funcion ejecutada cuando se cancela el modal |
| 443 | }); | 473 | }); |
| 444 | } | 474 | } |
| 445 | }; | 475 | }; |
| 446 | $scope.seleccionarFormaPago = function (key) { | 476 | $scope.seleccionarFormaPago = function (key) { |
| 447 | if (key === 13) { | 477 | if (key === 13) { |
| 448 | var parametrosModal = { | 478 | var parametrosModal = { |
| 449 | searchText: $scope.cliente.formaPago.NOMBRE, | 479 | searchText: $scope.cliente.formaPago.NOMBRE, |
| 450 | query: '/forma-pago', | 480 | query: '/forma-pago', |
| 451 | columnas: [ | 481 | columnas: [ |
| 452 | { | 482 | { |
| 453 | propiedad: 'ID', | 483 | propiedad: 'ID', |
| 454 | nombre: 'Cรณdigo', | 484 | nombre: 'Cรณdigo', |
| 455 | filtro: { | 485 | filtro: { |
| 456 | nombre: 'rellenarDigitos', | 486 | nombre: 'rellenarDigitos', |
| 457 | parametro: 3 | 487 | parametro: 3 |
| 458 | } | 488 | } |
| 459 | }, | 489 | }, |
| 460 | { | 490 | { |
| 461 | propiedad: 'NOMBRE', | 491 | propiedad: 'NOMBRE', |
| 462 | nombre: 'Nombre' | 492 | nombre: 'Nombre' |
| 463 | } | 493 | } |
| 464 | ], | 494 | ], |
| 465 | titulo: 'Bรบsqueda de formas de pago', | 495 | titulo: 'Bรบsqueda de formas de pago', |
| 466 | size: 'md' | 496 | size: 'md' |
| 467 | }; | 497 | }; |
| 468 | focaModalService.modal(parametrosModal).then( | 498 | focaModalService.modal(parametrosModal).then( |
| 469 | function (formaPago) { | 499 | function (formaPago) { |
| 470 | $scope.cliente.formaPago = formaPago; | 500 | $scope.cliente.formaPago = formaPago; |
| 471 | }, function () { | 501 | }, function () { |
| 472 | // funcion ejecutada cuando se cancela el modal | 502 | // funcion ejecutada cuando se cancela el modal |
| 473 | }); | 503 | }); |
| 474 | } | 504 | } |
| 475 | }; | 505 | }; |
| 476 | 506 | ||
| 477 | function crearCopia() { | 507 | function crearCopia() { |
| 478 | var cliente = angular.copy($scope.cliente); | 508 | var cliente = angular.copy($scope.cliente); |
| 479 | cliente.COD = cliente.codigo; | 509 | cliente.COD = cliente.COD; |
| 480 | cliente.CPO = cliente.CPO; | 510 | cliente.CPO = cliente.CPO; |
| 481 | cliente.PCX = parseInt(cliente.provincia.ID); | 511 | cliente.PCX = parseInt(cliente.provincia.ID); |
| 482 | cliente.LOX = parseInt(cliente.localidad.ID); | 512 | cliente.LOX = parseInt(cliente.localidad.ID); |
| 483 | cliente.LOC = cliente.localidad.NOMBRE; | 513 | cliente.LOC = cliente.localidad.NOMBRE; |
| 484 | cliente.PCI = cliente.provincia.NOMBRE; | 514 | cliente.PCI = cliente.provincia.NOMBRE; |
| 485 | cliente.IVA = cliente.iva.ID; | 515 | cliente.IVA = cliente.iva.ID; |
| 486 | cliente.ACT = cliente.actividad.ID; | 516 | cliente.ACT = cliente.actividad.ID; |
| 487 | cliente.ZON = (parseInt(cliente.zona.ID)).toString(); | 517 | cliente.ZON = (parseInt(cliente.zona.ID)).toString(); |
| 488 | cliente.TIP = cliente.tipoFactura.ID; | 518 | cliente.TIP = cliente.tipoFactura.ID; |
| 489 | cliente.TCO = cliente.tipoComprobante.ID; | 519 | cliente.TCO = cliente.tipoComprobante.ID; |
| 490 | cliente.FPA = cliente.formaPago.ID; | 520 | cliente.FPA = cliente.formaPago.ID; |
| 491 | cliente.VEN = $scope.vendedor.id; | 521 | cliente.VEN = $scope.vendedor.id; |
| 492 | cliente.CUIT = `${cliente.cuit1}-${cliente.cuit2}-${cliente.cuit3}`; | 522 | cliente.CUIT = `${cliente.cuit1}-${cliente.cuit2}-${cliente.cuit3}`; |
| 493 | cliente.idCobrador = cliente.cobrador.id; | 523 | cliente.idCobrador = cliente.cobrador.id; |
| 494 | 524 | ||
| 495 | delete cliente.codigo; | 525 | delete cliente.codigo; |
| 496 | delete cliente.provincia; | 526 | delete cliente.provincia; |
| 497 | delete cliente.localidad; | 527 | delete cliente.localidad; |
| 498 | delete cliente.iva; | 528 | delete cliente.iva; |
| 499 | delete cliente.actividad; | 529 | delete cliente.actividad; |
| 500 | delete cliente.zona; | 530 | delete cliente.zona; |
| 501 | delete cliente.tipoFactura; | 531 | delete cliente.tipoFactura; |
| 502 | delete cliente.tipoComprobante; | 532 | delete cliente.tipoComprobante; |
| 503 | delete cliente.formaPago; | 533 | delete cliente.formaPago; |
| 504 | delete cliente.cobrador; | 534 | delete cliente.cobrador; |
| 505 | delete cliente.cuit1; | 535 | delete cliente.cuit1; |
| 506 | delete cliente.cuit2; | 536 | delete cliente.cuit2; |
| 507 | delete cliente.cuit3; | 537 | delete cliente.cuit3; |
| 508 | delete cliente.vendedor; | 538 | delete cliente.vendedor; |
| 509 | 539 | ||
| 510 | return cliente; | 540 | return cliente; |
| 511 | } | 541 | } |
| 512 | function validateEmails(emails) { | 542 | function validateEmails(emails) { |
| 513 | var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; | 543 | var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; |
| 514 | var arr = emails.split(','); | 544 | var arr = emails.split(','); |
| 515 | var result = true; | 545 | var result = true; |
| 516 | arr.forEach(function (email) { | 546 | arr.forEach(function (email) { |
| 517 | var val = String(email).trim().toLowerCase(); | 547 | var val = String(email).trim().toLowerCase(); |
| 518 | if (!re.test(val)) result = false; | 548 | if (!re.test(val)) result = false; |
| 519 | }); | 549 | }); |
| 520 | return result; | 550 | return result; |
| 521 | } | 551 | } |
| 522 | } | 552 | } |
| 523 | ]); | 553 | ]); |
| 524 | 554 |
src/views/foca-modal-cliente.html
| 1 | <div class="modal-header py-1"> | 1 | <div class="modal-header py-1"> |
| 2 | <div class="row w-100"> | 2 | <div class="row w-100"> |
| 3 | <div class="col-lg-4 col-7"> | 3 | <div class="col-lg-4 col-7"> |
| 4 | <h5 class="modal-title my-1">Editar Cliente</h5> | 4 | <h5 class="modal-title my-1">Editar Cliente</h5> |
| 5 | </div> | 5 | </div> |
| 6 | <div class="col-lg-3 col-5 front-index"> | 6 | <div class="col-lg-3 col-5 front-index"> |
| 7 | <div class="custom-control custom-checkbox mt-2"> | 7 | <div class="custom-control custom-checkbox mt-2"> |
| 8 | <input | 8 | <input |
| 9 | type="checkbox" | 9 | type="checkbox" |
| 10 | class="custom-control-input" | 10 | class="custom-control-input" |
| 11 | id="checkProspecto" | 11 | id="checkProspecto" |
| 12 | ng-model="cliente.ES_PROS"> | 12 | ng-model="cliente.ES_PROS"> |
| 13 | <label class="custom-control-label" for="checkProspecto">ยฟEs prospecto?</label> | 13 | <label class="custom-control-label" for="checkProspecto">ยฟEs prospecto?</label> |
| 14 | </div> | 14 | </div> |
| 15 | </div> | 15 | </div> |
| 16 | </div> | 16 | </div> |
| 17 | </div> | 17 | </div> |
| 18 | <div class="modal-body" id="modal-body"> | 18 | <div class="modal-body" id="modal-body"> |
| 19 | <form name="formCliente"> | 19 | <form name="formCliente"> |
| 20 | <fieldset> | 20 | <fieldset> |
| 21 | <uib-tabset class="tabs-right"> | 21 | <uib-tabset class="tabs-right"> |
| 22 | <uib-tab heading="Datos cliente"> | 22 | <uib-tab heading="Datos cliente"> |
| 23 | <div class="row"> | 23 | <div class="row"> |
| 24 | <div class="col-3 mt-2"> | 24 | <div class="col-3 mt-2"> |
| 25 | <label>Cรณdigo</label> | 25 | <label>Cรณdigo</label> |
| 26 | <input | 26 | <input |
| 27 | type="text" | 27 | type="text" |
| 28 | class="form-control form-control-sm" | 28 | class="form-control form-control-sm" |
| 29 | ng-model="cliente.codigo" | 29 | ng-model="cliente.COD" |
| 30 | readonly | 30 | readonly |
| 31 | /> | 31 | /> |
| 32 | </div> | 32 | </div> |
| 33 | <div class="col-9 mt-2"> | 33 | <div class="col-9 mt-2"> |
| 34 | <label>Nombre</label> | 34 | <label>Nombre</label> |
| 35 | <input | 35 | <input |
| 36 | type="text" | 36 | type="text" |
| 37 | class="form-control form-control-sm" | 37 | class="form-control form-control-sm" |
| 38 | ng-model="cliente.NOM" | 38 | ng-model="cliente.NOM" |
| 39 | teclado-virtual | 39 | teclado-virtual |
| 40 | placeholder="Ingrese nombre" | 40 | placeholder="Ingrese nombre" |
| 41 | ng-required="true" | 41 | ng-required="true" |
| 42 | foca-focus="focused == 1" | 42 | foca-focus="focused == 1" |
| 43 | ng-focus="focus(1)" | 43 | ng-focus="focus(1)" |
| 44 | ng-keypress="next($event.keyCode)" | 44 | ng-keypress="next($event.keyCode)" |
| 45 | /> | 45 | /> |
| 46 | </div> | 46 | </div> |
| 47 | </div> | 47 | </div> |
| 48 | <div class="row"> | 48 | <div class="row"> |
| 49 | <div class="col-md-9 col-12 mt-2"> | 49 | <div class="col-md-9 col-12 mt-2"> |
| 50 | <label>Domicilio</label> | 50 | <label>Domicilio</label> |
| 51 | <input | 51 | <input |
| 52 | type="text" | 52 | type="text" |
| 53 | class="form-control form-control-sm" | 53 | class="form-control form-control-sm" |
| 54 | ng-model="cliente.DOM" | 54 | ng-model="cliente.DOM" |
| 55 | teclado-virtual | 55 | teclado-virtual |
| 56 | placeholder="Ingrese domicilio" | 56 | placeholder="Ingrese domicilio" |
| 57 | ng-required="true" | 57 | ng-required="true" |
| 58 | ng-focus="focus(2)" | 58 | ng-focus="focus(2)" |
| 59 | foca-focus="focused == 2" | 59 | foca-focus="focused == 2" |
| 60 | ng-keypress="next($event.keyCode)" | 60 | ng-keypress="next($event.keyCode)" |
| 61 | /> | 61 | /> |
| 62 | </div> | 62 | </div> |
| 63 | <div class="col-md-3 col-12 mt-2"> | 63 | <div class="col-md-3 col-12 mt-2"> |
| 64 | <label>Cรณdigo postal</label> | 64 | <label>Cรณdigo postal</label> |
| 65 | <input | 65 | <input |
| 66 | type="text" | 66 | type="text" |
| 67 | class="form-control form-control-sm" | 67 | class="form-control form-control-sm" |
| 68 | ng-model="cliente.CPO" | 68 | ng-model="cliente.CPO" |
| 69 | placeholder="Ingrese CP" | 69 | placeholder="Ingrese CP" |
| 70 | ng-required="true" | 70 | ng-required="true" |
| 71 | ng-focus="focus(3)" | 71 | ng-focus="focus(3)" |
| 72 | foca-focus="focused == 3" | 72 | foca-focus="focused == 3" |
| 73 | ng-keypress="next($event.keyCode)" | 73 | ng-keypress="next($event.keyCode)" |
| 74 | teclado-virtual | 74 | teclado-virtual |
| 75 | /> | 75 | /> |
| 76 | </div> | 76 | </div> |
| 77 | </div> | 77 | </div> |
| 78 | <div class="row"> | 78 | <div class="row"> |
| 79 | <div class="col-md-6 col-12 mt-2"> | 79 | <div class="col-md-6 col-12 mt-2"> |
| 80 | <label>Provincia</label> | 80 | <label>Provincia</label> |
| 81 | <div class="input-group"> | 81 | <div class="input-group"> |
| 82 | <input | 82 | <input |
| 83 | type="text" | 83 | type="text" |
| 84 | class="form-control form-control-sm" | 84 | class="form-control form-control-sm" |
| 85 | ng-model="cliente.provincia.NOMBRE" | 85 | ng-model="cliente.provincia.NOMBRE" |
| 86 | ng-keypress="seleccionarProvincia($event.keyCode)" | 86 | ng-keypress="seleccionarProvincia($event.keyCode)" |
| 87 | placeholder="Seleccione provincia" | 87 | placeholder="Seleccione provincia" |
| 88 | ng-required="true" | 88 | ng-required="true" |
| 89 | ng-focus="focus(4)" | 89 | ng-focus="focus(4)" |
| 90 | foca-focus="focused == 4" | 90 | foca-focus="focused == 4" |
| 91 | teclado-virtual | 91 | teclado-virtual |
| 92 | /> | 92 | /> |
| 93 | <button | 93 | <button |
| 94 | ng-show="cliente.provincia.NOMBRE !== ''" | 94 | ng-show="cliente.provincia.NOMBRE !== ''" |
| 95 | type="button" | 95 | type="button" |
| 96 | class="clear-input" | 96 | class="clear-input" |
| 97 | ng-click= | 97 | ng-click= |
| 98 | "cliente.provincia.NOMBRE = ''; | 98 | "cliente.provincia.NOMBRE = ''; |
| 99 | cliente.provincia.ID = undefined" | 99 | cliente.provincia.ID = undefined" |
| 100 | ><i class="fa fa-times"></i> | 100 | ><i class="fa fa-times"></i> |
| 101 | </button> | 101 | </button> |
| 102 | <div class="input-group-append"> | 102 | <div class="input-group-append"> |
| 103 | <button | 103 | <button |
| 104 | ladda="searchLoading" | 104 | ladda="searchLoading" |
| 105 | class="btn btn-outline-secondary" | 105 | class="btn btn-outline-secondary" |
| 106 | type="button" | 106 | type="button" |
| 107 | ng-click="seleccionarProvincia(13)" | 107 | ng-click="seleccionarProvincia(13)" |
| 108 | ><i class="fa fa-search" aria-hidden="true"></i> | 108 | ><i class="fa fa-search" aria-hidden="true"></i> |
| 109 | </button> | 109 | </button> |
| 110 | </div> | 110 | </div> |
| 111 | </div> | 111 | </div> |
| 112 | </div> | 112 | </div> |
| 113 | <div class="col-md-6 col-12 mt-2"> | 113 | <div class="col-md-6 col-12 mt-2"> |
| 114 | <label>Localidad</label> | 114 | <label>Localidad</label> |
| 115 | <div class="input-group"> | 115 | <div class="input-group"> |
| 116 | <input | 116 | <input |
| 117 | type="text" | 117 | type="text" |
| 118 | class="form-control form-control-sm" | 118 | class="form-control form-control-sm" |
| 119 | ng-model="cliente.localidad.NOMBRE" | 119 | ng-model="cliente.localidad.NOMBRE" |
| 120 | ng-keypress="seleccionarLocalidad($event.keyCode)" | 120 | ng-keypress="seleccionarLocalidad($event.keyCode)" |
| 121 | placeholder="Seleccione localidad" | 121 | placeholder="Seleccione localidad" |
| 122 | ng-required="true" | 122 | ng-required="true" |
| 123 | foca-focus="focused == 5" | 123 | foca-focus="focused == 5" |
| 124 | ng-focus="focus(5)" | 124 | ng-focus="focus(5)" |
| 125 | teclado-virtual | 125 | teclado-virtual |
| 126 | /> | 126 | /> |
| 127 | <button | 127 | <button |
| 128 | ng-show="cliente.localidad.NOMBRE !== ''" | 128 | ng-show="cliente.localidad.NOMBRE !== ''" |
| 129 | type="button" | 129 | type="button" |
| 130 | class="clear-input" | 130 | class="clear-input" |
| 131 | ng-click="cliente.localidad.NOMBRE = ''" | 131 | ng-click="cliente.localidad.NOMBRE = ''" |
| 132 | ><i class="fa fa-times"></i> | 132 | ><i class="fa fa-times"></i> |
| 133 | </button> | 133 | </button> |
| 134 | <div class="input-group-append"> | 134 | <div class="input-group-append"> |
| 135 | <button | 135 | <button |
| 136 | ladda="searchLoading" | 136 | ladda="searchLoading" |
| 137 | class="btn btn-outline-secondary" | 137 | class="btn btn-outline-secondary" |
| 138 | type="button" | 138 | type="button" |
| 139 | ng-click="seleccionarLocalidad(13)" | 139 | ng-click="seleccionarLocalidad(13)" |
| 140 | ><i class="fa fa-search" aria-hidden="true"></i> | 140 | ><i class="fa fa-search" aria-hidden="true"></i> |
| 141 | </button> | 141 | </button> |
| 142 | </div> | 142 | </div> |
| 143 | </div> | 143 | </div> |
| 144 | </div> | 144 | </div> |
| 145 | </div> | 145 | </div> |
| 146 | <div class="row"> | 146 | <div class="row"> |
| 147 | <div class="col-md-6 col-12 mt-2"> | 147 | <div class="col-md-6 col-12 mt-2"> |
| 148 | <label>Zona</label> | 148 | <label>Zona</label> |
| 149 | <div class="input-group"> | 149 | <div class="input-group"> |
| 150 | <input | 150 | <input |
| 151 | type="text" | 151 | type="text" |
| 152 | class="form-control form-control-sm" | 152 | class="form-control form-control-sm" |
| 153 | ng-model="cliente.zona.NOM" | 153 | ng-model="cliente.zona.NOM" |
| 154 | ng-keypress="seleccionarZona($event.keyCode)" | 154 | ng-keypress="seleccionarZona($event.keyCode)" |
| 155 | placeholder="Seleccione zona" | 155 | placeholder="Seleccione zona" |
| 156 | ng-required="true" | 156 | ng-required="true" |
| 157 | ng-focus="focus(6)" | 157 | ng-focus="focus(6)" |
| 158 | foca-focus="focused == 6" | 158 | foca-focus="focused == 6" |
| 159 | teclado-virtual | 159 | teclado-virtual |
| 160 | /> | 160 | /> |
| 161 | <button | 161 | <button |
| 162 | ng-show="cliente.zona.NOM !== ''" | 162 | ng-show="cliente.zona.NOM !== ''" |
| 163 | type="button" | 163 | type="button" |
| 164 | class="clear-input" | 164 | class="clear-input" |
| 165 | ng-click="cliente.zona.NOM = ''" | 165 | ng-click="cliente.zona.NOM = ''" |
| 166 | ><i class="fa fa-times"></i> | 166 | ><i class="fa fa-times"></i> |
| 167 | </button> | 167 | </button> |
| 168 | <div class="input-group-append"> | 168 | <div class="input-group-append"> |
| 169 | <button | 169 | <button |
| 170 | ladda="searchLoading" | 170 | ladda="searchLoading" |
| 171 | class="btn btn-outline-secondary" | 171 | class="btn btn-outline-secondary" |
| 172 | type="button" | 172 | type="button" |
| 173 | ng-click="seleccionarZona(13)" | 173 | ng-click="seleccionarZona(13)" |
| 174 | ><i class="fa fa-search" aria-hidden="true"></i> | 174 | ><i class="fa fa-search" aria-hidden="true"></i> |
| 175 | </button> | 175 | </button> |
| 176 | </div> | 176 | </div> |
| 177 | </div> | 177 | </div> |
| 178 | </div> | 178 | </div> |
| 179 | <div class="col-md-6 col-12 mt-2"> | 179 | <div class="col-md-6 col-12 mt-2"> |
| 180 | <label> Actividad </label> | 180 | <label> Actividad </label> |
| 181 | <div class="input-group"> | 181 | <div class="input-group"> |
| 182 | <input | 182 | <input |
| 183 | type="text" | 183 | type="text" |
| 184 | class="form-control form-control-sm" | 184 | class="form-control form-control-sm" |
| 185 | ng-model="cliente.actividad.NOM" | 185 | ng-model="cliente.actividad.NOM" |
| 186 | ng-keypress="seleccionarActividad($event.keyCode)" | 186 | ng-keypress="seleccionarActividad($event.keyCode)" |
| 187 | placeholder="Seleccione actividad" | 187 | placeholder="Seleccione actividad" |
| 188 | ng-required="true" | 188 | ng-required="true" |
| 189 | ng-focus="focus(7)" | 189 | ng-focus="focus(7)" |
| 190 | foca-focus="focused == 7" | 190 | foca-focus="focused == 7" |
| 191 | teclado-virtual | 191 | teclado-virtual |
| 192 | /> | 192 | /> |
| 193 | <button | 193 | <button |
| 194 | ng-show="cliente.actividad.NOM !== ''" | 194 | ng-show="cliente.actividad.NOM !== ''" |
| 195 | type="button" | 195 | type="button" |
| 196 | class="clear-input" | 196 | class="clear-input" |
| 197 | ng-click="cliente.actividad.NOM = ''" | 197 | ng-click="cliente.actividad.NOM = ''" |
| 198 | ><i class="fa fa-times"></i> | 198 | ><i class="fa fa-times"></i> |
| 199 | </button> | 199 | </button> |
| 200 | <div class="input-group-append"> | 200 | <div class="input-group-append"> |
| 201 | <button | 201 | <button |
| 202 | ladda="searchLoading" | 202 | ladda="searchLoading" |
| 203 | class="btn btn-outline-secondary" | 203 | class="btn btn-outline-secondary" |
| 204 | type="button" | 204 | type="button" |
| 205 | ng-click="seleccionarActividad(13)" | 205 | ng-click="seleccionarActividad(13)" |
| 206 | ><i class="fa fa-search" aria-hidden="true"></i> | 206 | ><i class="fa fa-search" aria-hidden="true"></i> |
| 207 | </button> | 207 | </button> |
| 208 | </div> | 208 | </div> |
| 209 | </div> | 209 | </div> |
| 210 | </div> | 210 | </div> |
| 211 | </div> | 211 | </div> |
| 212 | <div class="row"> | 212 | <div class="row"> |
| 213 | <div class="col-md-6 col-12 mt-2"> | 213 | <div class="col-md-6 col-12 mt-2"> |
| 214 | <label>Cobrador</label> | 214 | <label>Cobrador</label> |
| 215 | <div class="input-group"> | 215 | <div class="input-group"> |
| 216 | <input | 216 | <input |
| 217 | type="text" | 217 | type="text" |
| 218 | class="form-control form-control-sm" | 218 | class="form-control form-control-sm" |
| 219 | ng-model="cliente.cobrador.NOM" | 219 | ng-model="cliente.cobrador.NOM" |
| 220 | ng-keypress="seleccionarCobrador($event.keyCode)" | 220 | ng-keypress="seleccionarCobrador($event.keyCode)" |
| 221 | placeholder="Seleccione cobrador" | 221 | placeholder="Seleccione cobrador" |
| 222 | ng-focus="focus(8)" | 222 | ng-focus="focus(8)" |
| 223 | foca-focus="focused == 8" | 223 | foca-focus="focused == 8" |
| 224 | teclado-virtual | 224 | teclado-virtual |
| 225 | /> | 225 | /> |
| 226 | <button | 226 | <button |
| 227 | ng-show="cliente.cobrador.NOM !== ''" | 227 | ng-show="cliente.cobrador.NOM !== ''" |
| 228 | type="button" | 228 | type="button" |
| 229 | class="clear-input" | 229 | class="clear-input" |
| 230 | ng-click="cliente.cobrador.NOM = ''" | 230 | ng-click="cliente.cobrador.NOM = ''" |
| 231 | ><i class="fa fa-times"></i> | 231 | ><i class="fa fa-times"></i> |
| 232 | </button> | 232 | </button> |
| 233 | <div class="input-group-append"> | 233 | <div class="input-group-append"> |
| 234 | <button | 234 | <button |
| 235 | ladda="searchLoading" | 235 | ladda="searchLoading" |
| 236 | class="btn btn-outline-secondary" | 236 | class="btn btn-outline-secondary" |
| 237 | type="button" | 237 | type="button" |
| 238 | ng-click="seleccionarCobrador(13)" | 238 | ng-click="seleccionarCobrador(13)" |
| 239 | ><i class="fa fa-search" aria-hidden="true"></i> | 239 | ><i class="fa fa-search" aria-hidden="true"></i> |
| 240 | </button> | 240 | </button> |
| 241 | </div> | 241 | </div> |
| 242 | </div> | 242 | </div> |
| 243 | </div> | 243 | </div> |
| 244 | <div class="col-md-6 col-12 mt-2"> | 244 | <div class="col-md-6 col-12 mt-2"> |
| 245 | <label>Vendedor</label> | 245 | <label>Vendedor</label> |
| 246 | <div class="input-group"> | 246 | <div class="input-group"> |
| 247 | <input | 247 | <input |
| 248 | type="text" | 248 | type="text" |
| 249 | class="form-control form-control-sm" | 249 | class="form-control form-control-sm" |
| 250 | ng-model="vendedor.NOM" | 250 | ng-model="vendedor.NOM" |
| 251 | ng-keypress="seleccionarVendedor($event.keyCode)" | 251 | ng-keypress="seleccionarVendedor($event.keyCode)" |
| 252 | placeholder="Seleccione vendedor" | 252 | placeholder="Seleccione vendedor" |
| 253 | ng-focus="focus(9)" | 253 | ng-focus="focus(9)" |
| 254 | foca-focus="focused == 9" | 254 | foca-focus="focused == 9" |
| 255 | teclado-virtual | 255 | teclado-virtual |
| 256 | /> | 256 | /> |
| 257 | <button | 257 | <button |
| 258 | ng-show="vendedor.NOM !== ''" | 258 | ng-show="vendedor.NOM !== ''" |
| 259 | type="button" | 259 | type="button" |
| 260 | class="clear-input" | 260 | class="clear-input" |
| 261 | ng-click="vendedor.NOM = ''" | 261 | ng-click="vendedor.NOM = ''" |
| 262 | ><i class="fa fa-times"></i> | 262 | ><i class="fa fa-times"></i> |
| 263 | </button> | 263 | </button> |
| 264 | <div class="input-group-append"> | 264 | <div class="input-group-append"> |
| 265 | <button | 265 | <button |
| 266 | ladda="searchLoading" | 266 | ladda="searchLoading" |
| 267 | class="btn btn-outline-secondary" | 267 | class="btn btn-outline-secondary" |
| 268 | type="button" | 268 | type="button" |
| 269 | ng-click="seleccionarVendedor(13)" | 269 | ng-click="seleccionarVendedor(13)" |
| 270 | ><i class="fa fa-search" aria-hidden="true"></i> | 270 | ><i class="fa fa-search" aria-hidden="true"></i> |
| 271 | </button> | 271 | </button> |
| 272 | </div> | 272 | </div> |
| 273 | </div> | 273 | </div> |
| 274 | </div> | 274 | </div> |
| 275 | <div class="col-md-6 col-12 mt-2"> | 275 | <div class="col-md-6 col-12 mt-2"> |
| 276 | <label>Email</label> | 276 | <label>Email</label> |
| 277 | <div class="input-group"> | 277 | <div class="input-group"> |
| 278 | <input | 278 | <input |
| 279 | type="text" | 279 | type="text" |
| 280 | class="form-control form-control-sm" | 280 | class="form-control form-control-sm" |
| 281 | placeholder="Ingrese Email" | 281 | placeholder="Ingrese Email" |
| 282 | ng-model="cliente.MAIL" | 282 | ng-model="cliente.MAIL" |
| 283 | ng-required="true" | 283 | ng-required="true" |
| 284 | ng-keypress="next($event.keyCode)" | 284 | ng-keypress="next($event.keyCode)" |
| 285 | ng-focus="focus(10)" | 285 | ng-focus="focus(10)" |
| 286 | foca-focus="focused == 10" | 286 | foca-focus="focused == 10" |
| 287 | teclado-virtual> | 287 | teclado-virtual> |
| 288 | </div> | 288 | </div> |
| 289 | </div> | 289 | </div> |
| 290 | <div class="col-md-6 col-12 mt-2"> | 290 | <div class="col-md-6 col-12 mt-2"> |
| 291 | <label>Telefono</label> | 291 | <label>Telefono</label> |
| 292 | <div class="input-group"> | 292 | <div class="input-group"> |
| 293 | <input | 293 | <input |
| 294 | foca-tipo-input | 294 | foca-tipo-input |
| 295 | limite-numeros-max="20" | 295 | limite-numeros-max="20" |
| 296 | class="form-control form-control-sm" | 296 | class="form-control form-control-sm" |
| 297 | placeholder="Ingrese Telefono" | 297 | placeholder="Ingrese Telefono" |
| 298 | ng-model="cliente.TEL" | 298 | ng-model="cliente.TEL" |
| 299 | ng-required="true" | 299 | ng-required="true" |
| 300 | ng-keypress="next($event.keyCode)" | 300 | ng-keypress="next($event.keyCode)" |
| 301 | ng-focus="focus(11)" | 301 | ng-focus="focus(11)" |
| 302 | foca-focus="focused == 11" | 302 | foca-focus="focused == 11" |
| 303 | teclado-virtual> | 303 | teclado-virtual> |
| 304 | </div> | 304 | </div> |
| 305 | </div> | 305 | </div> |
| 306 | </div> | 306 | </div> |
| 307 | <div class="row"> | 307 | <div class="row"> |
| 308 | <div class="col-6 d-flex mt-3"> | 308 | <div class="col-6 d-flex mt-3"> |
| 309 | <div class="custom-control custom-checkbox mt-auto"> | 309 | <div class="custom-control custom-checkbox mt-auto"> |
| 310 | <input | 310 | <input |
| 311 | type="checkbox" | 311 | type="checkbox" |
| 312 | class="custom-control-input" | 312 | class="custom-control-input" |
| 313 | id="checkDistribuidor" | 313 | id="checkDistribuidor" |
| 314 | ng-model="cliente.ES_MAY" | 314 | ng-model="cliente.ES_MAY" |
| 315 | checked | 315 | checked |
| 316 | disabled="disabled"> | 316 | disabled="disabled"> |
| 317 | <label class="custom-control-label" for="checkDistribuidor">ยฟEste cliente es distribuidor?</label> | 317 | <label class="custom-control-label" for="checkDistribuidor">ยฟEste cliente es distribuidor?</label> |
| 318 | </div> | 318 | </div> |
| 319 | </div> | 319 | </div> |
| 320 | </div> | 320 | </div> |
| 321 | </uib-tab> | 321 | </uib-tab> |
| 322 | <uib-tab heading="Datos impositivos"> | 322 | <uib-tab heading="Datos impositivos"> |
| 323 | <div class="row"> | 323 | <div class="row"> |
| 324 | <div class="col-md-7 col-12 mt-2"> | 324 | <div class="col-md-7 col-12 mt-2"> |
| 325 | <label>Responsabilidad ante el IVA</label> | 325 | <label>Responsabilidad ante el IVA</label> |
| 326 | <div class="input-group"> | 326 | <div class="input-group"> |
| 327 | <input | 327 | <input |
| 328 | type="text" | 328 | type="text" |
| 329 | class="form-control form-control-sm" | 329 | class="form-control form-control-sm" |
| 330 | placeholder="Seleccione responsabilidad ante el IVA" | 330 | placeholder="Seleccione responsabilidad ante el IVA" |
| 331 | ng-model="cliente.iva.NOMBRE" | 331 | ng-model="cliente.iva.NOMBRE" |
| 332 | ng-keypress="seleccionarIva($event.keyCode)" | 332 | ng-keypress="seleccionarIva($event.keyCode)" |
| 333 | ng-required="true" | 333 | ng-required="true" |
| 334 | ng-focus="focus(12)" | 334 | ng-focus="focus(12)" |
| 335 | foca-focus="focused == 12" | 335 | foca-focus="focused == 12" |
| 336 | teclado-virtual | 336 | teclado-virtual |
| 337 | /> | 337 | /> |
| 338 | <button | 338 | <button |
| 339 | ng-show="cliente.iva.NOMBRE !== ''" | 339 | ng-show="cliente.iva.NOMBRE !== ''" |
| 340 | type="button" | 340 | type="button" |
| 341 | class="clear-input" | 341 | class="clear-input" |
| 342 | ng-click="cliente.iva.NOMBRE = ''" | 342 | ng-click="cliente.iva.NOMBRE = ''" |
| 343 | ><i class="fa fa-times"></i> | 343 | ><i class="fa fa-times"></i> |
| 344 | </button> | 344 | </button> |
| 345 | <div class="input-group-append"> | 345 | <div class="input-group-append"> |
| 346 | <button | 346 | <button |
| 347 | ladda="searchLoading" | 347 | ladda="searchLoading" |
| 348 | class="btn btn-outline-secondary" | 348 | class="btn btn-outline-secondary" |
| 349 | type="button" | 349 | type="button" |
| 350 | ng-click="seleccionarIva(13)" | 350 | ng-click="seleccionarIva(13)" |
| 351 | ><i class="fa fa-search" aria-hidden="true"></i> | 351 | ><i class="fa fa-search" aria-hidden="true"></i> |
| 352 | </button> | 352 | </button> |
| 353 | </div> | 353 | </div> |
| 354 | </div> | 354 | </div> |
| 355 | </div> | 355 | </div> |
| 356 | <div class="col-md-5 col-12 mt-2"> | 356 | <div class="col-md-5 col-12 mt-2"> |
| 357 | <label>Factura que emite</label> | 357 | <label>Factura que emite</label> |
| 358 | <div class="input-group"> | 358 | <div class="input-group"> |
| 359 | <input | 359 | <input |
| 360 | type="text" | 360 | type="text" |
| 361 | class="form-control form-control-sm" | 361 | class="form-control form-control-sm" |
| 362 | placeholder="Seleccione factura que emite" | 362 | placeholder="Seleccione factura que emite" |
| 363 | ng-model="cliente.tipoFactura.NOMBRE" | 363 | ng-model="cliente.tipoFactura.NOMBRE" |
| 364 | ng-required="true" | 364 | ng-required="true" |
| 365 | ng-keypress="seleccionarTipoFactura(13)" | 365 | ng-keypress="seleccionarTipoFactura(13)" |
| 366 | ng-focus="focus(13)" | 366 | ng-focus="focus(13)" |
| 367 | foca-focus="focused == 13" | 367 | foca-focus="focused == 13" |
| 368 | teclado-virtual> | 368 | teclado-virtual> |
| 369 | <button | 369 | <button |
| 370 | ng-show="cliente.tipoFactura.NOMBRE !== ''" | 370 | ng-show="cliente.tipoFactura.NOMBRE !== ''" |
| 371 | type="button" | 371 | type="button" |
| 372 | class="clear-input" | 372 | class="clear-input" |
| 373 | ng-click="cliente.tipoFactura.NOMBRE = ''" | 373 | ng-click="cliente.tipoFactura.NOMBRE = ''" |
| 374 | ><i class="fa fa-times"></i> | 374 | ><i class="fa fa-times"></i> |
| 375 | </button> | 375 | </button> |
| 376 | <div class="input-group-append"> | 376 | <div class="input-group-append"> |
| 377 | <button | 377 | <button |
| 378 | ladda="searchLoading" | 378 | ladda="searchLoading" |
| 379 | class="btn btn-outline-secondary" | 379 | class="btn btn-outline-secondary" |
| 380 | type="button" | 380 | type="button" |
| 381 | ng-click="seleccionarTipoFactura(13)" | 381 | ng-click="seleccionarTipoFactura(13)" |
| 382 | ><i class="fa fa-search" aria-hidden="true"></i> | 382 | ><i class="fa fa-search" aria-hidden="true"></i> |
| 383 | </button> | 383 | </button> |
| 384 | </div> | 384 | </div> |
| 385 | </div> | 385 | </div> |
| 386 | </div> | 386 | </div> |
| 387 | </div> | 387 | </div> |
| 388 | <div class="row"> | 388 | <div class="row"> |
| 389 | <div class= "col-md-4 col-12 mt-2"> | 389 | <div class= "col-md-4 col-12 mt-2"> |
| 390 | <label>CUIT</label> | 390 | <label>CUIT</label> |
| 391 | <div class="d-flex"> | 391 | <div class="d-flex"> |
| 392 | <input | 392 | <input |
| 393 | type="text" | 393 | type="text" |
| 394 | class="text-center form-control form-control-sm col-2" | 394 | class="text-center form-control form-control-sm col-2" |
| 395 | limite-numeros-max="2" | 395 | limite-numeros-max="2" |
| 396 | ng-model="cliente.cuit1" | 396 | ng-model="cliente.cuit1" |
| 397 | ng-required="true" | 397 | ng-required="true" |
| 398 | ng-keypress="pasarCampoCuit(1)" | 398 | ng-keypress="pasarCampoCuit(1)" |
| 399 | ng-focus="focus(14)" | 399 | ng-focus="focus(14)" |
| 400 | foca-focus="focused == 14" | 400 | foca-focus="focused == 14" |
| 401 | teclado-virtual | 401 | teclado-virtual |
| 402 | foca-tipo-input | 402 | foca-tipo-input |
| 403 | > | 403 | > |
| 404 | <span class="m-1"> - </span> | 404 | <span class="m-1"> - </span> |
| 405 | <input | 405 | <input |
| 406 | type="text" | 406 | type="text" |
| 407 | class="text-center form-control form-control-sm col-5" | 407 | class="text-center form-control form-control-sm col-5" |
| 408 | maxlength="8" | 408 | maxlength="8" |
| 409 | limite-numeros-max="8" | 409 | limite-numeros-max="8" |
| 410 | ng-keypress="pasarCampoCuit(2)" | 410 | ng-keypress="pasarCampoCuit(2)" |
| 411 | ng-model="cliente.cuit2" | 411 | ng-model="cliente.cuit2" |
| 412 | ng-required="true" | 412 | ng-required="true" |
| 413 | ng-focus="focus(15)" | 413 | ng-focus="focus(15)" |
| 414 | foca-focus="cuitActivo == 2 || focused == 15" | 414 | foca-focus="cuitActivo == 2 || focused == 15" |
| 415 | teclado-virtual | 415 | teclado-virtual |
| 416 | foca-tipo-input | 416 | foca-tipo-input |
| 417 | > | 417 | > |
| 418 | <span class="m-1"> - </span> | 418 | <span class="m-1"> - </span> |
| 419 | <input | 419 | <input |
| 420 | type="text" | 420 | type="text" |
| 421 | class="text-center form-control form-control-sm col-2" | 421 | class="text-center form-control form-control-sm col-2" |
| 422 | maxlength="1" | 422 | maxlength="1" |
| 423 | limite-numeros-max="1" | 423 | limite-numeros-max="1" |
| 424 | ng-keypress="pasarCampoCuit(3)" | 424 | ng-keypress="pasarCampoCuit(3)" |
| 425 | ng-model="cliente.cuit3" | 425 | ng-model="cliente.cuit3" |
| 426 | ng-required="true" | 426 | ng-required="true" |
| 427 | ng-focus="focus(16)" | 427 | ng-focus="focus(16)" |
| 428 | foca-focus="cuitActivo == 3 || focused == 16" | 428 | foca-focus="cuitActivo == 3 || focused == 16" |
| 429 | teclado-virtual | 429 | teclado-virtual |
| 430 | foca-tipo-input | 430 | foca-tipo-input |
| 431 | > | 431 | > |
| 432 | </div> | 432 | </div> |
| 433 | </div> | 433 | </div> |
| 434 | <div class="col-md-4 col-12 mt-2"> | 434 | <div class="col-md-4 col-12 mt-2"> |
| 435 | <label>Clase de comprobante</label> | 435 | <label>Clase de comprobante</label> |
| 436 | <div class="input-group"> | 436 | <div class="input-group"> |
| 437 | <input | 437 | <input |
| 438 | type="text" | 438 | type="text" |
| 439 | class="form-control form-control-sm" | 439 | class="form-control form-control-sm" |
| 440 | placeholder="Seleccione clase de comprobante" | 440 | placeholder="Seleccione clase de comprobante" |
| 441 | ng-keypress="seleccionarTipoComprobante($event.keyCode)" | 441 | ng-keypress="seleccionarTipoComprobante($event.keyCode)" |
| 442 | ng-model="cliente.tipoComprobante.NOMBRE" | 442 | ng-model="cliente.tipoComprobante.NOMBRE" |
| 443 | ng-required="true" | 443 | ng-required="true" |
| 444 | ng-focus="focus(17)" | 444 | ng-focus="focus(17)" |
| 445 | foca-focus="focused == 17" | 445 | foca-focus="focused == 17" |
| 446 | teclado-virtual> | 446 | teclado-virtual> |
| 447 | <button | 447 | <button |
| 448 | ng-show="cliente.tipoComprobante.NOMBRE !== ''" | 448 | ng-show="cliente.tipoComprobante.NOMBRE !== ''" |
| 449 | type="button" | 449 | type="button" |
| 450 | class="clear-input" | 450 | class="clear-input" |
| 451 | ng-click="cliente.tipoComprobante.NOMBRE = ''" | 451 | ng-click="cliente.tipoComprobante.NOMBRE = ''" |
| 452 | ><i class="fa fa-times"></i> | 452 | ><i class="fa fa-times"></i> |
| 453 | </button> | 453 | </button> |
| 454 | <div class="input-group-append"> | 454 | <div class="input-group-append"> |
| 455 | <button | 455 | <button |
| 456 | ladda="searchLoading" | 456 | ladda="searchLoading" |
| 457 | class="btn btn-outline-secondary" | 457 | class="btn btn-outline-secondary" |
| 458 | type="button" | 458 | type="button" |
| 459 | ng-click="seleccionarTipoComprobante(13)" | 459 | ng-click="seleccionarTipoComprobante(13)" |
| 460 | ><i class="fa fa-search" aria-hidden="true"></i> | 460 | ><i class="fa fa-search" aria-hidden="true"></i> |
| 461 | </button> | 461 | </button> |
| 462 | </div> | 462 | </div> |
| 463 | </div> | 463 | </div> |
| 464 | </div> | 464 | </div> |
| 465 | <div class="col-md-4 col-12 mt-2"> | 465 | <div class="col-md-4 col-12 mt-2"> |
| 466 | <label>Forma de pago</label> | 466 | <label>Forma de pago</label> |
| 467 | <div class="input-group"> | 467 | <div class="input-group"> |
| 468 | <input | 468 | <input |
| 469 | type="text" | 469 | type="text" |
| 470 | class="form-control form-control-sm" | 470 | class="form-control form-control-sm" |
| 471 | placeholder="Seleccione forma de pago" | 471 | placeholder="Seleccione forma de pago" |
| 472 | ng-model="cliente.formaPago.NOMBRE" | 472 | ng-model="cliente.formaPago.NOMBRE" |
| 473 | ng-required="true" | 473 | ng-required="true" |
| 474 | ng-keypress="seleccionarFormaPago($event.keyCode)" | 474 | ng-keypress="seleccionarFormaPago($event.keyCode)" |
| 475 | ng-focus="focus(18)" | 475 | ng-focus="focus(18)" |
| 476 | foca-focus="focused == 18" | 476 | foca-focus="focused == 18" |
| 477 | teclado-virtual> | 477 | teclado-virtual> |
| 478 | <button | 478 | <button |
| 479 | ng-show="cliente.formaPago.NOMBRE !== ''" | 479 | ng-show="cliente.formaPago.NOMBRE !== ''" |
| 480 | type="button" | 480 | type="button" |
| 481 | class="clear-input" | 481 | class="clear-input" |
| 482 | ng-click="cliente.formaPago.NOMBRE = ''" | 482 | ng-click="cliente.formaPago.NOMBRE = ''" |
| 483 | ><i class="fa fa-times"></i> | 483 | ><i class="fa fa-times"></i> |
| 484 | </button> | 484 | </button> |
| 485 | <div class="input-group-append"> | 485 | <div class="input-group-append"> |
| 486 | <button | 486 | <button |
| 487 | ladda="searchLoading" | 487 | ladda="searchLoading" |
| 488 | class="btn btn-outline-secondary" | 488 | class="btn btn-outline-secondary" |
| 489 | type="button" | 489 | type="button" |
| 490 | ng-click="seleccionarFormaPago(13)" | 490 | ng-click="seleccionarFormaPago(13)" |
| 491 | ><i class="fa fa-search" aria-hidden="true"></i> | 491 | ><i class="fa fa-search" aria-hidden="true"></i> |
| 492 | </button> | 492 | </button> |
| 493 | </div> | 493 | </div> |
| 494 | </div> | 494 | </div> |
| 495 | </div> | 495 | </div> |
| 496 | </div> | 496 | </div> |
| 497 | </uib-tab> | 497 | </uib-tab> |
| 498 | </uib-tabset> | 498 | </uib-tabset> |
| 499 | </fieldset> | 499 | </fieldset> |
| 500 | </form> | 500 | </form> |
| 501 | </div> | 501 | </div> |
| 502 | <div class="modal-footer py-1"> | 502 | <div class="modal-footer py-1"> |
| 503 | <button | 503 | <button |
| 504 | class="btn btn-sm btn-secondary" | 504 | class="btn btn-sm btn-secondary" |
| 505 | type="button" | 505 | type="button" |
| 506 | data-dismiss="modal" | 506 | data-dismiss="modal" |
| 507 | ng-click="cancel()">Cancelar | 507 | ng-click="cancel()">Cancelar |
| 508 | </button> | 508 | </button> |
| 509 | <button | 509 | <button |
| 510 | class="btn btn-sm btn-primary" | 510 | class="btn btn-sm btn-primary" |
| 511 | type="button" | 511 | type="button" |
| 512 | ng-click="guardar()" | 512 | ng-click="guardar()" |
| 513 | >Guardar | 513 | >Guardar |
| 514 | </button> | 514 | </button> |
| 515 | </div> | 515 | </div> |
| 516 | 516 |
src/views/foca-modal-nuevo-cliente.html
| File was created | 1 | <div class="modal-header py-1"> | |
| 2 | <div class="row w-100"> | ||
| 3 | <div class="col-lg-4 col-7"> | ||
| 4 | <h5 class="modal-title my-1">Crear Cliente</h5> | ||
| 5 | </div> | ||
| 6 | <div class="col-lg-3 col-5 front-index"> | ||
| 7 | <div class="custom-control custom-checkbox mt-2"> | ||
| 8 | <input | ||
| 9 | type="checkbox" | ||
| 10 | class="custom-control-input" | ||
| 11 | id="checkProspecto" | ||
| 12 | ng-model="cliente.ES_PROS"> | ||
| 13 | <label class="custom-control-label" for="checkProspecto">ยฟEs prospecto?</label> | ||
| 14 | </div> | ||
| 15 | </div> | ||
| 16 | </div> | ||
| 17 | </div> | ||
| 18 | <div class="modal-body" id="modal-body"> | ||
| 19 | <form name="formCliente"> | ||
| 20 | <fieldset> | ||
| 21 | <uib-tabset class="tabs-right"> | ||
| 22 | <uib-tab heading="Datos cliente"> | ||
| 23 | <div class="row"> | ||
| 24 | <div class="col-3 mt-2"> | ||
| 25 | <label>Cรณdigo</label> | ||
| 26 | <input | ||
| 27 | type="text" | ||
| 28 | class="form-control form-control-sm" | ||
| 29 | ng-model="cliente.COD" | ||
| 30 | readonly | ||
| 31 | /> | ||
| 32 | </div> | ||
| 33 | <div class="col-9 mt-2"> | ||
| 34 | <label>Nombre</label> | ||
| 35 | <input | ||
| 36 | type="text" | ||
| 37 | class="form-control form-control-sm" | ||
| 38 | ng-model="cliente.NOM" | ||
| 39 | teclado-virtual | ||
| 40 | placeholder="Ingrese nombre" | ||
| 41 | ng-required="true" | ||
| 42 | foca-focus="focused == 1" | ||
| 43 | ng-focus="focus(1)" | ||
| 44 | ng-keypress="next($event.keyCode)" | ||
| 45 | /> | ||
| 46 | </div> | ||
| 47 | </div> | ||
| 48 | <div class="row"> | ||
| 49 | <div class="col-md-9 col-12 mt-2"> | ||
| 50 | <label>Domicilio</label> | ||
| 51 | <input | ||
| 52 | type="text" | ||
| 53 | class="form-control form-control-sm" | ||
| 54 | ng-model="cliente.DOM" | ||
| 55 | teclado-virtual | ||
| 56 | placeholder="Ingrese domicilio" | ||
| 57 | ng-required="true" | ||
| 58 | ng-focus="focus(2)" | ||
| 59 | foca-focus="focused == 2" | ||
| 60 | ng-keypress="next($event.keyCode)" | ||
| 61 | /> | ||
| 62 | </div> | ||
| 63 | <div class="col-md-3 col-12 mt-2"> | ||
| 64 | <label>Cรณdigo postal</label> | ||
| 65 | <input | ||
| 66 | type="text" | ||
| 67 | class="form-control form-control-sm" | ||
| 68 | ng-model="cliente.CPO" | ||
| 69 | placeholder="Ingrese CP" | ||
| 70 | ng-required="true" | ||
| 71 | ng-focus="focus(3)" | ||
| 72 | foca-focus="focused == 3" | ||
| 73 | ng-keypress="next($event.keyCode)" | ||
| 74 | teclado-virtual | ||
| 75 | /> | ||
| 76 | </div> | ||
| 77 | </div> | ||
| 78 | <div class="row"> | ||
| 79 | <div class="col-md-6 col-12 mt-2"> | ||
| 80 | <label>Provincia</label> | ||
| 81 | <div class="input-group"> | ||
| 82 | <input | ||
| 83 | type="text" | ||
| 84 | class="form-control form-control-sm" | ||
| 85 | ng-model="cliente.provincia.NOMBRE" | ||
| 86 | ng-keypress="seleccionarProvincia($event.keyCode)" | ||
| 87 | placeholder="Seleccione provincia" | ||
| 88 | ng-required="true" | ||
| 89 | ng-focus="focus(4)" | ||
| 90 | foca-focus="focused == 4" | ||
| 91 | teclado-virtual | ||
| 92 | /> | ||
| 93 | <button | ||
| 94 | ng-show="cliente.provincia.NOMBRE !== ''" | ||
| 95 | type="button" | ||
| 96 | class="clear-input" | ||
| 97 | ng-click= | ||
| 98 | "cliente.provincia.NOMBRE = ''; | ||
| 99 | cliente.provincia.ID = undefined" | ||
| 100 | ><i class="fa fa-times"></i> | ||
| 101 | </button> | ||
| 102 | <div class="input-group-append"> | ||
| 103 | <button | ||
| 104 | ladda="searchLoading" | ||
| 105 | class="btn btn-outline-secondary" | ||
| 106 | type="button" | ||
| 107 | ng-click="seleccionarProvincia(13)" | ||
| 108 | ><i class="fa fa-search" aria-hidden="true"></i> | ||
| 109 | </button> | ||
| 110 | </div> | ||
| 111 | </div> | ||
| 112 | </div> | ||
| 113 | <div class="col-md-6 col-12 mt-2"> | ||
| 114 | <label>Localidad</label> | ||
| 115 | <div class="input-group"> | ||
| 116 | <input | ||
| 117 | type="text" | ||
| 118 | class="form-control form-control-sm" | ||
| 119 | ng-model="cliente.localidad.NOMBRE" | ||
| 120 | ng-keypress="seleccionarLocalidad($event.keyCode)" | ||
| 121 | placeholder="Seleccione localidad" | ||
| 122 | ng-required="true" | ||
| 123 | foca-focus="focused == 5" | ||
| 124 | ng-focus="focus(5)" | ||
| 125 | teclado-virtual | ||
| 126 | /> | ||
| 127 | <button | ||
| 128 | ng-show="cliente.localidad.NOMBRE !== ''" | ||
| 129 | type="button" | ||
| 130 | class="clear-input" | ||
| 131 | ng-click="cliente.localidad.NOMBRE = ''" | ||
| 132 | ><i class="fa fa-times"></i> | ||
| 133 | </button> | ||
| 134 | <div class="input-group-append"> | ||
| 135 | <button | ||
| 136 | ladda="searchLoading" | ||
| 137 | class="btn btn-outline-secondary" | ||
| 138 | type="button" | ||
| 139 | ng-click="seleccionarLocalidad(13)" | ||
| 140 | ><i class="fa fa-search" aria-hidden="true"></i> | ||
| 141 | </button> | ||
| 142 | </div> | ||
| 143 | </div> | ||
| 144 | </div> | ||
| 145 | </div> | ||
| 146 | <div class="row"> | ||
| 147 | <div class="col-md-6 col-12 mt-2"> | ||
| 148 | <label>Zona</label> | ||
| 149 | <div class="input-group"> | ||
| 150 | <input | ||
| 151 | type="text" | ||
| 152 | class="form-control form-control-sm" | ||
| 153 | ng-model="cliente.zona.NOM" | ||
| 154 | ng-keypress="seleccionarZona($event.keyCode)" | ||
| 155 | placeholder="Seleccione zona" | ||
| 156 | ng-required="true" | ||
| 157 | ng-focus="focus(6)" | ||
| 158 | foca-focus="focused == 6" | ||
| 159 | teclado-virtual | ||
| 160 | /> | ||
| 161 | <button | ||
| 162 | ng-show="cliente.zona.NOM !== ''" | ||
| 163 | type="button" | ||
| 164 | class="clear-input" | ||
| 165 | ng-click="cliente.zona.NOM = ''" | ||
| 166 | ><i class="fa fa-times"></i> | ||
| 167 | </button> | ||
| 168 | <div class="input-group-append"> | ||
| 169 | <button | ||
| 170 | ladda="searchLoading" | ||
| 171 | class="btn btn-outline-secondary" | ||
| 172 | type="button" | ||
| 173 | ng-click="seleccionarZona(13)" | ||
| 174 | ><i class="fa fa-search" aria-hidden="true"></i> | ||
| 175 | </button> | ||
| 176 | </div> | ||
| 177 | </div> | ||
| 178 | </div> | ||
| 179 | <div class="col-md-6 col-12 mt-2"> | ||
| 180 | <label> Actividad </label> | ||
| 181 | <div class="input-group"> | ||
| 182 | <input | ||
| 183 | type="text" | ||
| 184 | class="form-control form-control-sm" | ||
| 185 | ng-model="cliente.actividad.NOM" | ||
| 186 | ng-keypress="seleccionarActividad($event.keyCode)" | ||
| 187 | placeholder="Seleccione actividad" | ||
| 188 | ng-required="true" | ||
| 189 | ng-focus="focus(7)" | ||
| 190 | foca-focus="focused == 7" | ||
| 191 | teclado-virtual | ||
| 192 | /> | ||
| 193 | <button | ||
| 194 | ng-show="cliente.actividad.NOM !== ''" | ||
| 195 | type="button" | ||
| 196 | class="clear-input" | ||
| 197 | ng-click="cliente.actividad.NOM = ''" | ||
| 198 | ><i class="fa fa-times"></i> | ||
| 199 | </button> | ||
| 200 | <div class="input-group-append"> | ||
| 201 | <button | ||
| 202 | ladda="searchLoading" | ||
| 203 | class="btn btn-outline-secondary" | ||
| 204 | type="button" | ||
| 205 | ng-click="seleccionarActividad(13)" | ||
| 206 | ><i class="fa fa-search" aria-hidden="true"></i> | ||
| 207 | </button> | ||
| 208 | </div> | ||
| 209 | </div> | ||
| 210 | </div> | ||
| 211 | </div> | ||
| 212 | <div class="row"> | ||
| 213 | <div class="col-md-6 col-12 mt-2"> | ||
| 214 | <label>Cobrador</label> | ||
| 215 | <div class="input-group"> | ||
| 216 | <input | ||
| 217 | type="text" | ||
| 218 | class="form-control form-control-sm" | ||
| 219 | ng-model="cliente.cobrador.NOM" | ||
| 220 | ng-keypress="seleccionarCobrador($event.keyCode)" | ||
| 221 | placeholder="Seleccione cobrador" | ||
| 222 | ng-focus="focus(8)" | ||
| 223 | foca-focus="focused == 8" | ||
| 224 | teclado-virtual | ||
| 225 | /> | ||
| 226 | <button | ||
| 227 | ng-show="cliente.cobrador.NOM !== ''" | ||
| 228 | type="button" | ||
| 229 | class="clear-input" | ||
| 230 | ng-click="cliente.cobrador.NOM = ''" | ||
| 231 | ><i class="fa fa-times"></i> | ||
| 232 | </button> | ||
| 233 | <div class="input-group-append"> | ||
| 234 | <button | ||
| 235 | ladda="searchLoading" | ||
| 236 | class="btn btn-outline-secondary" | ||
| 237 | type="button" | ||
| 238 | ng-click="seleccionarCobrador(13)" | ||
| 239 | ><i class="fa fa-search" aria-hidden="true"></i> | ||
| 240 | </button> | ||
| 241 | </div> | ||
| 242 | </div> | ||
| 243 | </div> | ||
| 244 | <div class="col-md-6 col-12 mt-2"> | ||
| 245 | <label>Vendedor</label> | ||
| 246 | <div class="input-group"> | ||
| 247 | <input | ||
| 248 | type="text" | ||
| 249 | class="form-control form-control-sm" | ||
| 250 | ng-model="vendedor.NOM" | ||
| 251 | ng-keypress="seleccionarVendedor($event.keyCode)" | ||
| 252 | placeholder="Seleccione vendedor" | ||
| 253 | ng-focus="focus(9)" | ||
| 254 | foca-focus="focused == 9" | ||
| 255 | teclado-virtual | ||
| 256 | /> | ||
| 257 | <button | ||
| 258 | ng-show="vendedor.NOM !== ''" | ||
| 259 | type="button" | ||
| 260 | class="clear-input" | ||
| 261 | ng-click="vendedor.NOM = ''" | ||
| 262 | ><i class="fa fa-times"></i> | ||
| 263 | </button> | ||
| 264 | <div class="input-group-append"> | ||
| 265 | <button | ||
| 266 | ladda="searchLoading" | ||
| 267 | class="btn btn-outline-secondary" | ||
| 268 | type="button" | ||
| 269 | ng-click="seleccionarVendedor(13)" | ||
| 270 | ><i class="fa fa-search" aria-hidden="true"></i> | ||
| 271 | </button> | ||
| 272 | </div> | ||
| 273 | </div> | ||
| 274 | </div> | ||
| 275 | <div class="col-md-6 col-12 mt-2"> | ||
| 276 | <label>Email</label> | ||
| 277 | <div class="input-group"> | ||
| 278 | <input | ||
| 279 | type="text" | ||
| 280 | class="form-control form-control-sm" | ||
| 281 | placeholder="Ingrese Email" | ||
| 282 | ng-model="cliente.MAIL" | ||
| 283 | ng-required="true" | ||
| 284 | ng-keypress="next($event.keyCode)" | ||
| 285 | ng-focus="focus(10)" | ||
| 286 | foca-focus="focused == 10" | ||
| 287 | teclado-virtual> | ||
| 288 | </div> | ||
| 289 | </div> | ||
| 290 | <div class="col-md-6 col-12 mt-2"> | ||
| 291 | <label>Telefono</label> | ||
| 292 | <div class="input-group"> | ||
| 293 | <input | ||
| 294 | foca-tipo-input | ||
| 295 | limite-numeros-max="20" | ||
| 296 | class="form-control form-control-sm" | ||
| 297 | placeholder="Ingrese Telefono" | ||
| 298 | ng-model="cliente.TEL" | ||
| 299 | ng-required="true" | ||
| 300 | ng-keypress="next($event.keyCode)" | ||
| 301 | ng-focus="focus(11)" | ||
| 302 | foca-focus="focused == 11" | ||
| 303 | teclado-virtual> | ||
| 304 | </div> | ||
| 305 | </div> | ||
| 306 | </div> | ||
| 307 | <div class="row"> | ||
| 308 | <div class="col-6 d-flex mt-3"> | ||
| 309 | <div class="custom-control custom-checkbox mt-auto"> | ||
| 310 | <input | ||
| 311 | type="checkbox" | ||
| 312 | class="custom-control-input" | ||
| 313 | id="checkDistribuidor" | ||
| 314 | ng-model="cliente.ES_MAY" | ||
| 315 | checked | ||
| 316 | disabled="disabled"> | ||
| 317 | <label class="custom-control-label" for="checkDistribuidor">ยฟEste cliente es distribuidor?</label> | ||
| 318 | </div> | ||
| 319 | </div> | ||
| 320 | </div> | ||
| 321 | </uib-tab> | ||
| 322 | <uib-tab heading="Datos impositivos"> | ||
| 323 | <div class="row"> | ||
| 324 | <div class="col-md-7 col-12 mt-2"> | ||
| 325 | <label>Responsabilidad ante el IVA</label> | ||
| 326 | <div class="input-group"> | ||
| 327 | <input | ||
| 328 | type="text" | ||
| 329 | class="form-control form-control-sm" | ||
| 330 | placeholder="Seleccione responsabilidad ante el IVA" | ||
| 331 | ng-model="cliente.iva.NOMBRE" | ||
| 332 | ng-keypress="seleccionarIva($event.keyCode)" | ||
| 333 | ng-required="true" | ||
| 334 | ng-focus="focus(12)" | ||
| 335 | foca-focus="focused == 12" | ||
| 336 | teclado-virtual | ||
| 337 | /> | ||
| 338 | <button | ||
| 339 | ng-show="cliente.iva.NOMBRE !== ''" | ||
| 340 | type="button" | ||
| 341 | class="clear-input" | ||
| 342 | ng-click="cliente.iva.NOMBRE = ''" | ||
| 343 | ><i class="fa fa-times"></i> | ||
| 344 | </button> | ||
| 345 | <div class="input-group-append"> | ||
| 346 | <button | ||
| 347 | ladda="searchLoading" | ||
| 348 | class="btn btn-outline-secondary" | ||
| 349 | type="button" | ||
| 350 | ng-click="seleccionarIva(13)" | ||
| 351 | ><i class="fa fa-search" aria-hidden="true"></i> | ||
| 352 | </button> | ||
| 353 | </div> | ||
| 354 | </div> | ||
| 355 | </div> | ||
| 356 | <div class="col-md-5 col-12 mt-2"> | ||
| 357 | <label>Factura que emite</label> | ||
| 358 | <div class="input-group"> | ||
| 359 | <input | ||
| 360 | type="text" | ||
| 361 | class="form-control form-control-sm" | ||
| 362 | placeholder="Seleccione factura que emite" | ||
| 363 | ng-model="cliente.tipoFactura.NOMBRE" | ||
| 364 | ng-required="true" | ||
| 365 | ng-keypress="seleccionarTipoFactura(13)" | ||
| 366 | ng-focus="focus(13)" | ||
| 367 | foca-focus="focused == 13" | ||
| 368 | teclado-virtual> | ||
| 369 | <button | ||
| 370 | ng-show="cliente.tipoFactura.NOMBRE !== ''" | ||
| 371 | type="button" | ||
| 372 | class="clear-input" | ||
| 373 | ng-click="cliente.tipoFactura.NOMBRE = ''" | ||
| 374 | ><i class="fa fa-times"></i> | ||
| 375 | </button> | ||
| 376 | <div class="input-group-append"> | ||
| 377 | <button | ||
| 378 | ladda="searchLoading" | ||
| 379 | class="btn btn-outline-secondary" | ||
| 380 | type="button" | ||
| 381 | ng-click="seleccionarTipoFactura(13)" | ||
| 382 | ><i class="fa fa-search" aria-hidden="true"></i> | ||
| 383 | </button> | ||
| 384 | </div> | ||
| 385 | </div> | ||
| 386 | </div> | ||
| 387 | </div> | ||
| 388 | <div class="row"> | ||
| 389 | <div class= "col-md-4 col-12 mt-2"> | ||
| 390 | <label>CUIT</label> | ||
| 391 | <div class="d-flex"> | ||
| 392 | <input | ||
| 393 | type="text" | ||
| 394 | class="text-center form-control form-control-sm col-2" | ||
| 395 | limite-numeros-max="2" | ||
| 396 | ng-model="cliente.cuit1" | ||
| 397 | ng-required="true" | ||
| 398 | ng-keypress="pasarCampoCuit(1)" | ||
| 399 | ng-focus="focus(14)" | ||
| 400 | foca-focus="focused == 14" | ||
| 401 | teclado-virtual | ||
| 402 | foca-tipo-input | ||
| 403 | > | ||
| 404 | <span class="m-1"> - </span> | ||
| 405 | <input | ||
| 406 | type="text" | ||
| 407 | class="text-center form-control form-control-sm col-5" | ||
| 408 | maxlength="8" | ||
| 409 | limite-numeros-max="8" | ||
| 410 | ng-keypress="pasarCampoCuit(2)" | ||
| 411 | ng-model="cliente.cuit2" | ||
| 412 | ng-required="true" | ||
| 413 | ng-focus="focus(15)" | ||
| 414 | foca-focus="cuitActivo == 2 || focused == 15" | ||
| 415 | teclado-virtual | ||
| 416 | foca-tipo-input | ||
| 417 | > | ||
| 418 | <span class="m-1"> - </span> | ||
| 419 | <input | ||
| 420 | type="text" | ||
| 421 | class="text-center form-control form-control-sm col-2" | ||
| 422 | maxlength="1" | ||
| 423 | limite-numeros-max="1" | ||
| 424 | ng-keypress="pasarCampoCuit(3)" | ||
| 425 | ng-model="cliente.cuit3" | ||
| 426 | ng-required="true" | ||
| 427 | ng-focus="focus(16)" | ||
| 428 | foca-focus="cuitActivo == 3 || focused == 16" | ||
| 429 | teclado-virtual | ||
| 430 | foca-tipo-input | ||
| 431 | > | ||
| 432 | </div> | ||
| 433 | </div> | ||
| 434 | <div class="col-md-4 col-12 mt-2"> | ||
| 435 | <label>Clase de comprobante</label> | ||
| 436 | <div class="input-group"> | ||
| 437 | <input | ||
| 438 | type="text" | ||
| 439 | class="form-control form-control-sm" | ||
| 440 | placeholder="Seleccione clase de comprobante" | ||
| 441 | ng-keypress="seleccionarTipoComprobante($event.keyCode)" | ||
| 442 | ng-model="cliente.tipoComprobante.NOMBRE" | ||
| 443 | ng-required="true" | ||
| 444 | ng-focus="focus(17)" | ||
| 445 | foca-focus="focused == 17" | ||
| 446 | teclado-virtual> | ||
| 447 | <button | ||
| 448 | ng-show="cliente.tipoComprobante.NOMBRE !== ''" | ||
| 449 | type="button" | ||
| 450 | class="clear-input" | ||
| 451 | ng-click="cliente.tipoComprobante.NOMBRE = ''" | ||
| 452 | ><i class="fa fa-times"></i> | ||
| 453 | </button> | ||
| 454 | <div class="input-group-append"> | ||
| 455 | <button | ||
| 456 | ladda="searchLoading" | ||
| 457 | class="btn btn-outline-secondary" | ||
| 458 | type="button" | ||
| 459 | ng-click="seleccionarTipoComprobante(13)" | ||
| 460 | ><i class="fa fa-search" aria-hidden="true"></i> | ||
| 461 | </button> | ||
| 462 | </div> | ||
| 463 | </div> | ||
| 464 | </div> | ||
| 465 | <div class="col-md-4 col-12 mt-2"> | ||
| 466 | <label>Forma de pago</label> | ||
| 467 | <div class="input-group"> | ||
| 468 | <input | ||
| 469 | type="text" | ||
| 470 | class="form-control form-control-sm" | ||
| 471 | placeholder="Seleccione forma de pago" | ||
| 472 | ng-model="cliente.formaPago.NOMBRE" | ||
| 473 | ng-required="true" | ||
| 474 | ng-keypress="seleccionarFormaPago($event.keyCode)" | ||
| 475 | ng-focus="focus(18)" | ||
| 476 | foca-focus="focused == 18" | ||
| 477 | teclado-virtual> | ||
| 478 | <button | ||
| 479 | ng-show="cliente.formaPago.NOMBRE !== ''" | ||
| 480 | type="button" | ||
| 481 | class="clear-input" | ||
| 482 | ng-click="cliente.formaPago.NOMBRE = ''" | ||
| 483 | ><i class="fa fa-times"></i> | ||
| 484 | </button> | ||
| 485 | <div class="input-group-append"> | ||
| 486 | <button | ||
| 487 | ladda="searchLoading" | ||
| 488 | class="btn btn-outline-secondary" | ||
| 489 | type="button" | ||
| 490 | ng-click="seleccionarFormaPago(13)" | ||
| 491 | ><i class="fa fa-search" aria-hidden="true"></i> | ||
| 492 | </button> | ||
| 493 | </div> | ||
| 494 | </div> | ||
| 495 | </div> | ||
| 496 | </div> | ||
| 497 | </uib-tab> | ||
| 498 | </uib-tabset> | ||
| 499 | </fieldset> | ||
| 500 | </form> | ||
| 501 | </div> | ||
| 502 | <div class="modal-footer py-1"> | ||
| 503 | <button | ||
| 504 | class="btn btn-sm btn-secondary" | ||
| 505 | type="button" | ||
| 506 | data-dismiss="modal" | ||
| 507 | ng-click="cancel()">Cancelar | ||
| 508 | </button> | ||
| 509 | <button | ||
| 510 | class="btn btn-sm btn-primary" | ||
| 511 | type="button" | ||
| 512 | ng-click="guardar()" | ||
| 513 | >Guardar | ||
| 514 | </button> | ||
| 515 | </div> | ||
| 516 |