Commit 76ce8a7919aab78ae56bfcdea7702eb6eac0cccd
Exists in
master
and in
1 other branch
Merge branch 'develop' into 'master'
Develop See merge request !25
Showing
3 changed files
Show diff stats
src/js/controller.js
| 1 | 1 | angular.module('focaBusquedaCliente') |
| 2 | 2 | .controller('focaBusquedaClienteModalController', [ |
| 3 | 3 | '$uibModalInstance', 'focaBusquedaClienteService', '$scope', '$filter', |
| 4 | - '$uibModal', 'focaModalService', '$timeout', 'vendedor', | |
| 4 | + '$uibModal', 'focaModalService', '$timeout', 'vendedor', 'cobrador', | |
| 5 | 5 | function($uibModalInstance, focaBusquedaClienteService, $scope, $filter, |
| 6 | - $uibModal, focaModalService, $timeout, vendedor) { | |
| 6 | + $uibModal, focaModalService, $timeout, vendedor, cobrador) { | |
| 7 | 7 | |
| 8 | + $scope.cobrador = cobrador ? cobrador : {}; | |
| 8 | 9 | $scope.vendedor = vendedor ? vendedor : {}; |
| 9 | 10 | $scope.filters = ''; |
| 10 | 11 | $scope.primerBusqueda = false; |
| ... | ... | @@ -15,12 +16,15 @@ angular.module('focaBusquedaCliente') |
| 15 | 16 | $scope.currentPageClientes = []; |
| 16 | 17 | $scope.selectedClientes = -1; |
| 17 | 18 | $scope.ingreso = false; |
| 18 | - $scope.regexCuit = new RegExp(/\b(20|23|24|27|30|33|34)(\D)?[0-9]{8}(\D)?[0-9]/g); | |
| 19 | + $scope.regexCuit = new RegExp(/\b(20|23|24|27|30|33|34)(\D)?[0-9]{8}(\D)?[0-9]/); | |
| 19 | 20 | $scope.focused = 1; |
| 20 | 21 | |
| 21 | 22 | $scope.cliente = { |
| 22 | 23 | COD: 0, |
| 23 | 24 | ES_MAY: true, |
| 25 | + cuit1: '', | |
| 26 | + cuit2: '', | |
| 27 | + cuit3: '', | |
| 24 | 28 | provincia: { |
| 25 | 29 | NOMBRE: '' |
| 26 | 30 | }, |
| ... | ... | @@ -52,12 +56,19 @@ angular.module('focaBusquedaCliente') |
| 52 | 56 | |
| 53 | 57 | $scope.busquedaPress = function(key) { |
| 54 | 58 | if (key === 13) { |
| 55 | - var funcion = ($scope.vendedor.id) ? | |
| 56 | - 'obtenerClientesPorNombreOCuitByVendedor' : 'obtenerClientesPorNombreOCuit'; | |
| 59 | + var funcion; | |
| 60 | + if ($scope.vendedor.id) { | |
| 61 | + funcion = 'obtenerClientesPorNombreOCuitByVendedor'; | |
| 62 | + } else if ($scope.cobrador.id) { | |
| 63 | + funcion = 'obtenerClientesPorNombreOCuitByCobrador'; | |
| 64 | + } else { | |
| 65 | + funcion = 'obtenerClientesPorNombreOCuit'; | |
| 66 | + } | |
| 67 | + | |
| 57 | 68 | |
| 58 | 69 | $scope.searchLoading = true; |
| 59 | 70 | focaBusquedaClienteService |
| 60 | - [funcion]($scope.filters, $scope.vendedor.id) | |
| 71 | + [funcion]($scope.filters, $scope.vendedor.id || $scope.cobrador.id) | |
| 61 | 72 | .then( |
| 62 | 73 | function(res) { |
| 63 | 74 | $scope.primerBusqueda = true; |
| ... | ... | @@ -70,12 +81,12 @@ angular.module('focaBusquedaCliente') |
| 70 | 81 | }; |
| 71 | 82 | |
| 72 | 83 | $scope.search = function (pressed) { |
| 73 | - if($scope.primerBusqueda) { | |
| 84 | + if ($scope.primerBusqueda) { | |
| 74 | 85 | $scope.filteredClientes = $filter('filter')( |
| 75 | 86 | $scope.clientes, {$: $scope.filters} |
| 76 | 87 | ); |
| 77 | 88 | |
| 78 | - if(pressed && $scope.filteredClientes.length === 0){ | |
| 89 | + if (pressed && $scope.filteredClientes.length === 0) { | |
| 79 | 90 | $timeout(function() { |
| 80 | 91 | angular.element('#search')[0].focus(); |
| 81 | 92 | $scope.filters = ''; |
| ... | ... | @@ -110,9 +121,9 @@ angular.module('focaBusquedaCliente') |
| 110 | 121 | }; |
| 111 | 122 | |
| 112 | 123 | $scope.cancel = function() { |
| 113 | - if($scope.ingreso) { | |
| 124 | + if ($scope.ingreso) { | |
| 114 | 125 | $scope.ingreso = false; |
| 115 | - }else { | |
| 126 | + } else { | |
| 116 | 127 | $uibModalInstance.dismiss('cancel'); |
| 117 | 128 | } |
| 118 | 129 | }; |
| ... | ... | @@ -150,8 +161,9 @@ angular.module('focaBusquedaCliente') |
| 150 | 161 | }; |
| 151 | 162 | |
| 152 | 163 | $scope.seleccionarProvincia = function(key) { |
| 153 | - if(key === 13) { | |
| 164 | + if (key === 13) { | |
| 154 | 165 | var parametrosModal = { |
| 166 | + searchText: $scope.cliente.provincia.NOMBRE, | |
| 155 | 167 | query: '/provincia', |
| 156 | 168 | columnas: [ |
| 157 | 169 | { |
| ... | ... | @@ -159,8 +171,9 @@ angular.module('focaBusquedaCliente') |
| 159 | 171 | nombre: 'Codigo', |
| 160 | 172 | filtro: { |
| 161 | 173 | nombre: 'rellenarDigitos', |
| 162 | - parametro: 3} | |
| 163 | - }, | |
| 174 | + parametro: 3 | |
| 175 | + } | |
| 176 | + }, | |
| 164 | 177 | { |
| 165 | 178 | propiedad: 'NOMBRE', |
| 166 | 179 | nombre: 'Nombre' |
| ... | ... | @@ -172,7 +185,7 @@ angular.module('focaBusquedaCliente') |
| 172 | 185 | focaModalService.modal(parametrosModal).then(function(provincia) { |
| 173 | 186 | $scope.cliente.provincia = provincia; |
| 174 | 187 | $timeout(function() { |
| 175 | - $scope.focused = 5; | |
| 188 | + $scope.focused = 4; | |
| 176 | 189 | }); |
| 177 | 190 | }, function() { |
| 178 | 191 | //TODO: funciรณn llamada cuando cancela el modal |
| ... | ... | @@ -180,12 +193,13 @@ angular.module('focaBusquedaCliente') |
| 180 | 193 | } |
| 181 | 194 | }; |
| 182 | 195 | $scope.seleccionarLocalidad = function(key) { |
| 183 | - if($scope.cliente.provincia.ID === undefined) { | |
| 196 | + if ($scope.cliente.provincia.ID === undefined) { | |
| 184 | 197 | focaModalService.alert('Seleccione una provincia'); |
| 185 | 198 | return; |
| 186 | 199 | } |
| 187 | - if(key === 13) { | |
| 200 | + if (key === 13) { | |
| 188 | 201 | var parametrosModal = { |
| 202 | + searchText: $scope.cliente.localidad.NOMBRE, | |
| 189 | 203 | query: '/localidad/' + $scope.cliente.provincia.ID, |
| 190 | 204 | columnas: [ |
| 191 | 205 | { |
| ... | ... | @@ -207,7 +221,7 @@ angular.module('focaBusquedaCliente') |
| 207 | 221 | focaModalService.modal(parametrosModal).then(function(localidad) { |
| 208 | 222 | $scope.cliente.localidad = localidad; |
| 209 | 223 | $timeout(function() { |
| 210 | - $scope.focused = 6; | |
| 224 | + $scope.focused = 5; | |
| 211 | 225 | }); |
| 212 | 226 | }, function() { |
| 213 | 227 | //TODO: funciรณn llamada cuando cancela el modal |
| ... | ... | @@ -215,9 +229,10 @@ angular.module('focaBusquedaCliente') |
| 215 | 229 | } |
| 216 | 230 | }; |
| 217 | 231 | $scope.seleccionarIva = function(key) { |
| 218 | - if(key === 13) { | |
| 232 | + if (key === 13) { | |
| 219 | 233 | var parametrosModal = { |
| 220 | 234 | query: '/iva', |
| 235 | + searchText: $scope.cliente.iva.NOMBRE, | |
| 221 | 236 | columnas: [ |
| 222 | 237 | { |
| 223 | 238 | propiedad: 'ID', |
| ... | ... | @@ -239,7 +254,7 @@ angular.module('focaBusquedaCliente') |
| 239 | 254 | function(iva) { |
| 240 | 255 | $scope.cliente.iva = iva; |
| 241 | 256 | $timeout(function() { |
| 242 | - $scope.focused = 10; | |
| 257 | + $scope.focused = 12; | |
| 243 | 258 | }); |
| 244 | 259 | }, function() { |
| 245 | 260 | // funcion ejecutada cuando se cancela el modal |
| ... | ... | @@ -247,8 +262,9 @@ angular.module('focaBusquedaCliente') |
| 247 | 262 | } |
| 248 | 263 | }; |
| 249 | 264 | $scope.seleccionarActividad = function(key) { |
| 250 | - if(key === 13) { | |
| 265 | + if (key === 13) { | |
| 251 | 266 | var parametrosModal = { |
| 267 | + searchText: $scope.cliente.actividad.NOM, | |
| 252 | 268 | query: '/actividad', |
| 253 | 269 | columnas: [ |
| 254 | 270 | { |
| ... | ... | @@ -271,7 +287,7 @@ angular.module('focaBusquedaCliente') |
| 271 | 287 | function(actividad) { |
| 272 | 288 | $scope.cliente.actividad = actividad; |
| 273 | 289 | $timeout(function() { |
| 274 | - $scope.focused = 8; | |
| 290 | + $scope.focused = 7; | |
| 275 | 291 | }); |
| 276 | 292 | }, function() { |
| 277 | 293 | // funcion ejecutada cuando se cancela el modal |
| ... | ... | @@ -279,8 +295,9 @@ angular.module('focaBusquedaCliente') |
| 279 | 295 | } |
| 280 | 296 | }; |
| 281 | 297 | $scope.seleccionarZona = function(key) { |
| 282 | - if(key === 13) { | |
| 298 | + if (key === 13) { | |
| 283 | 299 | var parametrosModal = { |
| 300 | + searchText: $scope.cliente.zona.NOM, | |
| 284 | 301 | query: '/zona', |
| 285 | 302 | columnas: [ |
| 286 | 303 | { |
| ... | ... | @@ -303,7 +320,7 @@ angular.module('focaBusquedaCliente') |
| 303 | 320 | function(zona) { |
| 304 | 321 | $scope.cliente.zona = zona; |
| 305 | 322 | $timeout(function() { |
| 306 | - $scope.focused = 7; | |
| 323 | + $scope.focused = 6; | |
| 307 | 324 | }); |
| 308 | 325 | }, function() { |
| 309 | 326 | // funcion ejecutada cuando se cancela el modal |
| ... | ... | @@ -311,36 +328,58 @@ angular.module('focaBusquedaCliente') |
| 311 | 328 | } |
| 312 | 329 | }; |
| 313 | 330 | $scope.seleccionarTipoFactura = function(key) { |
| 314 | - if(key === 13) { | |
| 315 | - var parametrosModal = { | |
| 316 | - query: '/tipo-factura', | |
| 331 | + if (key === 13) { | |
| 332 | + var datos; | |
| 333 | + if ($scope.cliente.iva.ID == 1) { | |
| 334 | + datos = [ | |
| 335 | + { | |
| 336 | + ID: 'A', | |
| 337 | + NOMBRE: 'Factura A' | |
| 338 | + }, | |
| 339 | + { | |
| 340 | + ID: 'M', | |
| 341 | + NOMBRE: 'Factura M' | |
| 342 | + }, | |
| 343 | + { | |
| 344 | + ID: 'R', | |
| 345 | + NOMBRE: 'Remito' | |
| 346 | + } | |
| 347 | + ]; | |
| 348 | + } else { | |
| 349 | + datos = [ | |
| 350 | + { | |
| 351 | + ID: 'B', | |
| 352 | + NOMBRE: 'Factura B' | |
| 353 | + }, | |
| 354 | + { | |
| 355 | + ID: 'R', | |
| 356 | + NOMBRE: 'Remito' | |
| 357 | + } | |
| 358 | + ]; | |
| 359 | + } | |
| 360 | + focaModalService.modal({ | |
| 361 | + titulo: 'Seleccionar Factura', | |
| 362 | + data: datos, | |
| 363 | + size: 'md', | |
| 317 | 364 | columnas: [ |
| 318 | 365 | { |
| 319 | 366 | propiedad: 'ID', |
| 320 | - nombre: 'Cรณdigo' | |
| 367 | + NOMBRE: 'Codigo' | |
| 321 | 368 | }, |
| 322 | 369 | { |
| 323 | 370 | propiedad: 'NOMBRE', |
| 324 | - nombre: 'Nombre' | |
| 371 | + NOMBRE: 'Factura' | |
| 325 | 372 | } |
| 326 | 373 | ], |
| 327 | - titulo: 'Bรบsqueda de tipos de factura', | |
| 328 | - size: 'md' | |
| 329 | - }; | |
| 330 | - focaModalService.modal(parametrosModal).then( | |
| 331 | - function(tipoFactura) { | |
| 332 | - $scope.cliente.tipoFactura = tipoFactura; | |
| 333 | - $timeout(function() { | |
| 334 | - $scope.focused = 11; | |
| 335 | - }); | |
| 336 | - }, function() { | |
| 337 | - // funcion ejecutada cuando se cancela el modal | |
| 338 | - }); | |
| 374 | + }).then(function(res) { | |
| 375 | + $scope.cliente.tipoFactura = res; | |
| 376 | + }); | |
| 339 | 377 | } |
| 340 | 378 | }; |
| 341 | 379 | $scope.seleccionarTipoComprobante = function(key) { |
| 342 | - if(key === 13) { | |
| 380 | + if (key === 13) { | |
| 343 | 381 | var parametrosModal = { |
| 382 | + searchText: $scope.cliente.tipoComprobante.NOMBRE, | |
| 344 | 383 | query: '/tipo-comprobante', |
| 345 | 384 | columnas: [ |
| 346 | 385 | { |
| ... | ... | @@ -359,7 +398,7 @@ angular.module('focaBusquedaCliente') |
| 359 | 398 | function(tipoComprobante) { |
| 360 | 399 | $scope.cliente.tipoComprobante = tipoComprobante; |
| 361 | 400 | $timeout(function() { |
| 362 | - $scope.focused = 13; | |
| 401 | + $scope.focused = 17; | |
| 363 | 402 | }); |
| 364 | 403 | }, function() { |
| 365 | 404 | // funcion ejecutada cuando se cancela el modal |
| ... | ... | @@ -367,8 +406,9 @@ angular.module('focaBusquedaCliente') |
| 367 | 406 | } |
| 368 | 407 | }; |
| 369 | 408 | $scope.seleccionarFormaPago = function(key) { |
| 370 | - if(key === 13) { | |
| 409 | + if (key === 13) { | |
| 371 | 410 | var parametrosModal = { |
| 411 | + searchText: $scope.cliente.formaPago.NOMBRE, | |
| 372 | 412 | query: '/forma-pago', |
| 373 | 413 | columnas: [ |
| 374 | 414 | { |
| ... | ... | @@ -396,8 +436,9 @@ angular.module('focaBusquedaCliente') |
| 396 | 436 | } |
| 397 | 437 | }; |
| 398 | 438 | $scope.seleccionarCobrador = function(key) { |
| 399 | - if(key === 13) { | |
| 439 | + if (key === 13) { | |
| 400 | 440 | var parametrosModal = { |
| 441 | + searchText: $scope.cliente.cobrador.NOM, | |
| 401 | 442 | query: '/cobrador', |
| 402 | 443 | columnas: [ |
| 403 | 444 | { |
| ... | ... | @@ -413,7 +454,7 @@ angular.module('focaBusquedaCliente') |
| 413 | 454 | size: 'md' |
| 414 | 455 | }; |
| 415 | 456 | focaModalService.modal(parametrosModal).then( |
| 416 | - function(cobrador) { | |
| 457 | + function(cobrador) { | |
| 417 | 458 | $scope.cliente.cobrador = cobrador; |
| 418 | 459 | }, function() { |
| 419 | 460 | // funcion ejecutada cuando se cancela el modal |
| ... | ... | @@ -421,8 +462,16 @@ angular.module('focaBusquedaCliente') |
| 421 | 462 | } |
| 422 | 463 | }; |
| 423 | 464 | |
| 424 | - $scope.guardar = function() { | |
| 465 | + $scope.pasarCampoCuit = function(numeroCuit) { | |
| 466 | + | |
| 467 | + if (numeroCuit === 1 && $scope.cliente.cuit1.length === 2) { | |
| 468 | + $scope.cuitActivo = 2; | |
| 469 | + } else if ( numeroCuit === 2 && $scope.cliente.cuit2.length === 8) { | |
| 470 | + $scope.cuitActivo = 3; | |
| 471 | + } | |
| 472 | + }; | |
| 425 | 473 | |
| 474 | + $scope.guardar = function() { | |
| 426 | 475 | if (!$scope.cliente.NOM) { |
| 427 | 476 | focaModalService.alert('Ingrese Nombre'); |
| 428 | 477 | return; |
| ... | ... | @@ -447,14 +496,23 @@ angular.module('focaBusquedaCliente') |
| 447 | 496 | } else if (!$scope.cliente.cobrador.NUM) { |
| 448 | 497 | focaModalService.alert('Seleccione un cobrador'); |
| 449 | 498 | return; |
| 499 | + } else if (!$scope.cliente.TEL) { | |
| 500 | + focaModalService.alert('Ingrese un numero de telefono'); | |
| 501 | + return; | |
| 450 | 502 | } else if (!$scope.cliente.iva.NOMBRE) { |
| 451 | 503 | focaModalService.alert('Seleccione responsabilidad ante el IVA'); |
| 452 | 504 | return; |
| 453 | 505 | } else if (!$scope.cliente.tipoFactura.NOMBRE) { |
| 454 | 506 | focaModalService.alert('Seleccione tipo de Factura'); |
| 455 | 507 | return; |
| 456 | - } else if (!$scope.cliente.CUIT) { | |
| 457 | - focaModalService.alert('Ingresar CUIT'); | |
| 508 | + } else if (!$scope.cliente.cuit1 && !$scope.cliente.cuit2 && !$scope.cliente.cuit3) { | |
| 509 | + focaModalService.alert('Ingrese CUIT'); | |
| 510 | + return; | |
| 511 | + } else if (!$scope.cliente.cuit1 || !$scope.cliente.cuit2 || !$scope.cliente.cuit3){ | |
| 512 | + focaModalService.alert('Ingrese CUIT vรกlido'); | |
| 513 | + return; | |
| 514 | + } else if (!$scope.regexCuit.test($scope.cliente.cuit1 + $scope.cliente.cuit2 + $scope.cliente.cuit3) ) { | |
| 515 | + focaModalService.alert('Ingrese CUIT con formato: XX-XXXXXXXX-X'); | |
| 458 | 516 | return; |
| 459 | 517 | } else if (!$scope.cliente.tipoComprobante.NOMBRE) { |
| 460 | 518 | focaModalService.alert('Seleccione un Comprobante'); |
| ... | ... | @@ -464,29 +522,10 @@ angular.module('focaBusquedaCliente') |
| 464 | 522 | return; |
| 465 | 523 | } |
| 466 | 524 | |
| 467 | - $scope.cliente.PCX = $scope.cliente.provincia.ID; | |
| 468 | - $scope.cliente.LOX = $scope.cliente.localidad.ID; | |
| 469 | - $scope.cliente.IVA = $scope.cliente.iva.ID; | |
| 470 | - $scope.cliente.ACT = $scope.cliente.actividad.ID; | |
| 471 | - $scope.cliente.ZON = $scope.cliente.zona.ID; | |
| 472 | - $scope.cliente.TIP = $scope.cliente.tipoFactura.ID; | |
| 473 | - $scope.cliente.TCO = $scope.cliente.tipoComprobante.ID; | |
| 474 | - $scope.cliente.FPA = $scope.cliente.formaPago.ID; | |
| 475 | - $scope.cliente.VEN = $scope.vendedor.id; | |
| 476 | - $scope.cliente.idCobrador = $scope.cliente.cobrador.id; | |
| 477 | - | |
| 478 | - delete $scope.cliente.provincia; | |
| 479 | - delete $scope.cliente.localidad; | |
| 480 | - delete $scope.cliente.iva; | |
| 481 | - delete $scope.cliente.actividad; | |
| 482 | - delete $scope.cliente.zona; | |
| 483 | - delete $scope.cliente.tipoFactura; | |
| 484 | - delete $scope.cliente.tipoComprobante; | |
| 485 | - delete $scope.cliente.formaPago; | |
| 486 | - delete $scope.cliente.cobrador; | |
| 525 | + var cliente = crearCopia(); | |
| 487 | 526 | |
| 488 | 527 | focaBusquedaClienteService |
| 489 | - .guardarCliente($scope.cliente) | |
| 528 | + .guardarCliente(cliente) | |
| 490 | 529 | .then(function(res) { |
| 491 | 530 | var cliente = { |
| 492 | 531 | cod: res.data.COD, |
| ... | ... | @@ -497,6 +536,37 @@ angular.module('focaBusquedaCliente') |
| 497 | 536 | $scope.select(cliente, true); |
| 498 | 537 | }); |
| 499 | 538 | }; |
| 539 | + | |
| 540 | + function crearCopia(){ | |
| 541 | + var cliente = angular.copy($scope.cliente); | |
| 542 | + | |
| 543 | + cliente.PCX = cliente.provincia.ID; | |
| 544 | + cliente.LOX = cliente.localidad.ID; | |
| 545 | + cliente.IVA = cliente.iva.ID; | |
| 546 | + cliente.ACT = cliente.actividad.ID; | |
| 547 | + cliente.ZON = cliente.zona.ID; | |
| 548 | + cliente.TIP = cliente.tipoFactura.ID; | |
| 549 | + cliente.TCO = cliente.tipoComprobante.ID; | |
| 550 | + cliente.FPA = cliente.formaPago.ID; | |
| 551 | + cliente.VEN = vendedor.ID; | |
| 552 | + cliente.CUIT = cliente.cuit1 + cliente.cuit2 + cliente.cuit3; | |
| 553 | + cliente.idCobrador = cliente.cobrador.ID; | |
| 554 | + | |
| 555 | + delete cliente.provincia; | |
| 556 | + delete cliente.localidad; | |
| 557 | + delete cliente.iva; | |
| 558 | + delete cliente.actividad; | |
| 559 | + delete cliente.zona; | |
| 560 | + delete cliente.tipoFactura; | |
| 561 | + delete cliente.tipoComprobante; | |
| 562 | + delete cliente.formaPago; | |
| 563 | + delete cliente.cobrador; | |
| 564 | + delete cliente.cuit1; | |
| 565 | + delete cliente.cuit2; | |
| 566 | + delete cliente.cuit3; | |
| 567 | + | |
| 568 | + return cliente; | |
| 569 | + } | |
| 500 | 570 | |
| 501 | 571 | function calcularPages(paginaActual) { |
| 502 | 572 | var paginas = []; |
| ... | ... | @@ -561,5 +631,6 @@ angular.module('focaBusquedaCliente') |
| 561 | 631 | $scope.selectedClientes = 0; |
| 562 | 632 | } |
| 563 | 633 | } |
| 634 | + | |
| 564 | 635 | } |
| 565 | 636 | ]); |
src/js/service.js
| ... | ... | @@ -5,6 +5,10 @@ angular.module('focaBusquedaCliente') |
| 5 | 5 | return $http.post(API_ENDPOINT.URL + '/cliente/listar', |
| 6 | 6 | {nombreOCuit: nombreOCuit, idVendedor: idVendedor}); |
| 7 | 7 | }, |
| 8 | + obtenerClientesPorNombreOCuitByCobrador: function(nombreOCuit, idCobrador) { | |
| 9 | + return $http.post(API_ENDPOINT.URL + '/cliente/listar', | |
| 10 | + {nombreOCuit: nombreOCuit, idCobrador: idCobrador}); | |
| 11 | + }, | |
| 8 | 12 | obtenerClientesPorNombreOCuit: function(nombreOCuit) { |
| 9 | 13 | return $http.post(API_ENDPOINT.URL + '/cliente/listar', |
| 10 | 14 | {nombreOCuit: nombreOCuit}); |
src/views/foca-busqueda-cliente-modal.html
| ... | ... | @@ -164,7 +164,7 @@ |
| 164 | 164 | class="form-control form-control-sm" |
| 165 | 165 | ng-model="cliente.provincia.NOMBRE" |
| 166 | 166 | ng-keypress="seleccionarProvincia($event.keyCode)" |
| 167 | - placeholder="Ingrese provincia" | |
| 167 | + placeholder="Seleccione provincia" | |
| 168 | 168 | ng-required="true" |
| 169 | 169 | ng-focus="focus(4)" |
| 170 | 170 | foca-focus="focused == 4" |
| ... | ... | @@ -190,7 +190,7 @@ |
| 190 | 190 | class="form-control form-control-sm" |
| 191 | 191 | ng-model="cliente.localidad.NOMBRE" |
| 192 | 192 | ng-keypress="seleccionarLocalidad($event.keyCode)" |
| 193 | - placeholder="Ingrese localidad" | |
| 193 | + placeholder="Seleccione localidad" | |
| 194 | 194 | ng-required="true" |
| 195 | 195 | foca-focus="focused == 5" |
| 196 | 196 | ng-focus="focus(5)" |
| ... | ... | @@ -218,7 +218,7 @@ |
| 218 | 218 | class="form-control form-control-sm" |
| 219 | 219 | ng-model="cliente.zona.NOM" |
| 220 | 220 | ng-keypress="seleccionarZona($event.keyCode)" |
| 221 | - placeholder="Ingrese zona" | |
| 221 | + placeholder="Seleccione zona" | |
| 222 | 222 | ng-required="true" |
| 223 | 223 | ng-focus="focus(6)" |
| 224 | 224 | foca-focus="focused == 6" |
| ... | ... | @@ -237,14 +237,14 @@ |
| 237 | 237 | </div> |
| 238 | 238 | </div> |
| 239 | 239 | <div class="col-md-6 col-12"> |
| 240 | - <label>Actividad</label> | |
| 240 | + <label> Actividad </label> | |
| 241 | 241 | <div class="input-group"> |
| 242 | 242 | <input |
| 243 | 243 | type="text" |
| 244 | 244 | class="form-control form-control-sm" |
| 245 | 245 | ng-model="cliente.actividad.NOM" |
| 246 | 246 | ng-keypress="seleccionarActividad($event.keyCode)" |
| 247 | - placeholder="Ingrese actividad" | |
| 247 | + placeholder="Seleccione actividad" | |
| 248 | 248 | ng-required="true" |
| 249 | 249 | ng-focus="focus(7)" |
| 250 | 250 | foca-focus="focused == 7" |
| ... | ... | @@ -272,7 +272,7 @@ |
| 272 | 272 | class="form-control form-control-sm" |
| 273 | 273 | ng-model="cliente.cobrador.NOM" |
| 274 | 274 | ng-keypress="seleccionarCobrador($event.keyCode)" |
| 275 | - placeholder="Ingrese cobrador" | |
| 275 | + placeholder="Seleccione cobrador" | |
| 276 | 276 | ng-focus="focus(8)" |
| 277 | 277 | foca-focus="focused == 8" |
| 278 | 278 | teclado-virtual |
| ... | ... | @@ -295,11 +295,41 @@ |
| 295 | 295 | <input |
| 296 | 296 | type="text" |
| 297 | 297 | class="form-control form-control-sm" |
| 298 | - ng-model="vendedor.NomVen" | |
| 298 | + ng-model="vendedor.NOM" | |
| 299 | 299 | disabled="true" |
| 300 | 300 | /> |
| 301 | 301 | </div> |
| 302 | 302 | </div> |
| 303 | + <div class="col-md-6 col-12"> | |
| 304 | + <label>Email</label> | |
| 305 | + <div class="input-group"> | |
| 306 | + <input | |
| 307 | + type="email" | |
| 308 | + class="form-control form-control-sm" | |
| 309 | + placeholder="Ingrese Email" | |
| 310 | + ng-model="cliente.MAIL" | |
| 311 | + ng-required="true" | |
| 312 | + ng-keypress="next($event.keyCode)" | |
| 313 | + ng-focus="focus(10)" | |
| 314 | + foca-focus="focused == 10" | |
| 315 | + teclado-virtual> | |
| 316 | + </div> | |
| 317 | + </div> | |
| 318 | + <div class="col-md-6 col-12"> | |
| 319 | + <label>Telefono</label> | |
| 320 | + <div class="input-group"> | |
| 321 | + <input | |
| 322 | + type="text" | |
| 323 | + class="form-control form-control-sm" | |
| 324 | + placeholder="Ingrese Telefono" | |
| 325 | + ng-model="cliente.TEL" | |
| 326 | + ng-required="true" | |
| 327 | + ng-keypress="next($event.keyCode)" | |
| 328 | + ng-focus="focus(11)" | |
| 329 | + foca-focus="focused == 11" | |
| 330 | + teclado-virtual> | |
| 331 | + </div> | |
| 332 | + </div> | |
| 303 | 333 | </div> |
| 304 | 334 | <div class="row"> |
| 305 | 335 | <div class="col-6 d-flex"> |
| ... | ... | @@ -324,12 +354,12 @@ |
| 324 | 354 | <input |
| 325 | 355 | type="text" |
| 326 | 356 | class="form-control form-control-sm" |
| 327 | - placeholder="Ingrese responsabilidad ante el IVA" | |
| 357 | + placeholder="Seleccione responsabilidad ante el IVA" | |
| 328 | 358 | ng-model="cliente.iva.NOMBRE" |
| 329 | 359 | ng-keypress="seleccionarIva($event.keyCode)" |
| 330 | 360 | ng-required="true" |
| 331 | - ng-focus="focus(9)" | |
| 332 | - foca-focus="focused == 9" | |
| 361 | + ng-focus="focus(12)" | |
| 362 | + foca-focus="focused == 12" | |
| 333 | 363 | teclado-virtual |
| 334 | 364 | /> |
| 335 | 365 | <div class="input-group-append"> |
| ... | ... | @@ -350,12 +380,12 @@ |
| 350 | 380 | <input |
| 351 | 381 | type="text" |
| 352 | 382 | class="form-control form-control-sm" |
| 353 | - placeholder="Ingrese factura que emite" | |
| 383 | + placeholder="Seleccione factura que emite" | |
| 354 | 384 | ng-model="cliente.tipoFactura.NOMBRE" |
| 355 | 385 | ng-required="true" |
| 356 | 386 | ng-keypress="seleccionarTipoFactura(13)" |
| 357 | - ng-focus="focus(10)" | |
| 358 | - foca-focus="focused == 10" | |
| 387 | + ng-focus="focus(13)" | |
| 388 | + foca-focus="focused == 13" | |
| 359 | 389 | teclado-virtual> |
| 360 | 390 | <div class="input-group-append"> |
| 361 | 391 | <button |
| ... | ... | @@ -370,22 +400,46 @@ |
| 370 | 400 | </div> |
| 371 | 401 | </div> |
| 372 | 402 | </div> |
| 403 | + | |
| 373 | 404 | <div class="row"> |
| 374 | - <div class="col-md-4 col-12"> | |
| 405 | + <div class= "col-md-4 col-12"> | |
| 375 | 406 | <label>CUIT</label> |
| 376 | - <div class="input-group"> | |
| 407 | + <div class="d-flex"> | |
| 377 | 408 | <input |
| 378 | 409 | type="text" |
| 379 | - class="form-control form-control-sm" | |
| 380 | - placeholder="Ingrese CUIT" | |
| 381 | - ng-model="cliente.CUIT" | |
| 410 | + class="form-control form-control-sm col-2" | |
| 411 | + maxlength="2" | |
| 412 | + ng-model="cliente.cuit1" | |
| 382 | 413 | ng-required="true" |
| 383 | - ng-pattern="regexCuit" | |
| 384 | - ng-maxlength="13" | |
| 385 | - ng-keypress="next($event.keyCode)" | |
| 386 | - ng-focus="focus(11)" | |
| 387 | - foca-focus="focused == 11" | |
| 388 | - teclado-virtual> | |
| 414 | + ng-keypress="pasarCampoCuit(1)" | |
| 415 | + ng-focus="focus(14)" | |
| 416 | + foca-focus="focused == 14" | |
| 417 | + teclado-virtual | |
| 418 | + > | |
| 419 | + <span class="m-1"> - </span> | |
| 420 | + <input | |
| 421 | + type="text" | |
| 422 | + class="form-control form-control-sm col-5" | |
| 423 | + maxlength="8" | |
| 424 | + ng-keypress="pasarCampoCuit(2)" | |
| 425 | + ng-model="cliente.cuit2" | |
| 426 | + ng-required="true" | |
| 427 | + ng-focus="focus(15)" | |
| 428 | + foca-focus="cuitActivo == 2 || focused == 15" | |
| 429 | + teclado-virtual | |
| 430 | + > | |
| 431 | + <span class="m-1"> - </span> | |
| 432 | + <input | |
| 433 | + type="text" | |
| 434 | + class="form-control form-control-sm col-2" | |
| 435 | + maxlength="1" | |
| 436 | + ng-keypress="pasarCampoCuit(3)" | |
| 437 | + ng-model="cliente.cuit3" | |
| 438 | + ng-required="true" | |
| 439 | + ng-focus="focus(16)" | |
| 440 | + foca-focus="cuitActivo == 3 || focused == 16" | |
| 441 | + teclado-virtual | |
| 442 | + > | |
| 389 | 443 | </div> |
| 390 | 444 | </div> |
| 391 | 445 | <div class="col-md-4 col-12"> |
| ... | ... | @@ -394,12 +448,12 @@ |
| 394 | 448 | <input |
| 395 | 449 | type="text" |
| 396 | 450 | class="form-control form-control-sm" |
| 397 | - placeholder="Ingrese clase de comprobante" | |
| 451 | + placeholder="Seleccione clase de comprobante" | |
| 398 | 452 | ng-keypress="seleccionarTipoComprobante($event.keyCode)" |
| 399 | 453 | ng-model="cliente.tipoComprobante.NOMBRE" |
| 400 | 454 | ng-required="true" |
| 401 | - ng-focus="focus(12)" | |
| 402 | - foca-focus="focused == 12" | |
| 455 | + ng-focus="focus(17)" | |
| 456 | + foca-focus="focused == 17" | |
| 403 | 457 | teclado-virtual> |
| 404 | 458 | <div class="input-group-append"> |
| 405 | 459 | <button |
| ... | ... | @@ -419,12 +473,12 @@ |
| 419 | 473 | <input |
| 420 | 474 | type="text" |
| 421 | 475 | class="form-control form-control-sm" |
| 422 | - placeholder="Ingrese forma de pago" | |
| 476 | + placeholder="Seleccione forma de pago" | |
| 423 | 477 | ng-model="cliente.formaPago.NOMBRE" |
| 424 | 478 | ng-required="true" |
| 425 | 479 | ng-keypress="seleccionarFormaPago($event.keyCode)" |
| 426 | - ng-focus="focus(13)" | |
| 427 | - foca-focus="focused == 13" | |
| 480 | + ng-focus="focus(18)" | |
| 481 | + foca-focus="focused == 18" | |
| 428 | 482 | teclado-virtual> |
| 429 | 483 | <div class="input-group-append"> |
| 430 | 484 | <button |