Commit c4b114ffad542c0d0a1506942deef8ae96861fb6
1 parent
b31adf1015
Exists in
master
Auto stash before merge of "master" and "upstream/develop"
Showing
2 changed files
with
158 additions
and
73 deletions
Show diff stats
src/js/controller.js
| ... | ... | @@ -16,12 +16,15 @@ angular.module('focaBusquedaCliente') |
| 16 | 16 | $scope.currentPageClientes = []; |
| 17 | 17 | $scope.selectedClientes = -1; |
| 18 | 18 | $scope.ingreso = false; |
| 19 | - $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]/); | |
| 20 | 20 | $scope.focused = 1; |
| 21 | 21 | |
| 22 | 22 | $scope.cliente = { |
| 23 | 23 | COD: 0, |
| 24 | 24 | ES_MAY: true, |
| 25 | + cuit1: '', | |
| 26 | + cuit2: '', | |
| 27 | + cuit3: '', | |
| 25 | 28 | provincia: { |
| 26 | 29 | NOMBRE: '' |
| 27 | 30 | }, |
| ... | ... | @@ -78,12 +81,12 @@ angular.module('focaBusquedaCliente') |
| 78 | 81 | }; |
| 79 | 82 | |
| 80 | 83 | $scope.search = function (pressed) { |
| 81 | - if($scope.primerBusqueda) { | |
| 84 | + if ($scope.primerBusqueda) { | |
| 82 | 85 | $scope.filteredClientes = $filter('filter')( |
| 83 | 86 | $scope.clientes, {$: $scope.filters} |
| 84 | 87 | ); |
| 85 | 88 | |
| 86 | - if(pressed && $scope.filteredClientes.length === 0){ | |
| 89 | + if (pressed && $scope.filteredClientes.length === 0) { | |
| 87 | 90 | $timeout(function() { |
| 88 | 91 | angular.element('#search')[0].focus(); |
| 89 | 92 | $scope.filters = ''; |
| ... | ... | @@ -118,9 +121,9 @@ angular.module('focaBusquedaCliente') |
| 118 | 121 | }; |
| 119 | 122 | |
| 120 | 123 | $scope.cancel = function() { |
| 121 | - if($scope.ingreso) { | |
| 124 | + if ($scope.ingreso) { | |
| 122 | 125 | $scope.ingreso = false; |
| 123 | - }else { | |
| 126 | + } else { | |
| 124 | 127 | $uibModalInstance.dismiss('cancel'); |
| 125 | 128 | } |
| 126 | 129 | }; |
| ... | ... | @@ -158,7 +161,7 @@ angular.module('focaBusquedaCliente') |
| 158 | 161 | }; |
| 159 | 162 | |
| 160 | 163 | $scope.seleccionarProvincia = function(key) { |
| 161 | - if(key === 13) { | |
| 164 | + if (key === 13) { | |
| 162 | 165 | var parametrosModal = { |
| 163 | 166 | query: '/provincia', |
| 164 | 167 | columnas: [ |
| ... | ... | @@ -181,7 +184,7 @@ angular.module('focaBusquedaCliente') |
| 181 | 184 | focaModalService.modal(parametrosModal).then(function(provincia) { |
| 182 | 185 | $scope.cliente.provincia = provincia; |
| 183 | 186 | $timeout(function() { |
| 184 | - $scope.focused = 5; | |
| 187 | + $scope.focused = 4; | |
| 185 | 188 | }); |
| 186 | 189 | }, function() { |
| 187 | 190 | //TODO: función llamada cuando cancela el modal |
| ... | ... | @@ -189,11 +192,11 @@ angular.module('focaBusquedaCliente') |
| 189 | 192 | } |
| 190 | 193 | }; |
| 191 | 194 | $scope.seleccionarLocalidad = function(key) { |
| 192 | - if($scope.cliente.provincia.ID === undefined) { | |
| 195 | + if ($scope.cliente.provincia.ID === undefined) { | |
| 193 | 196 | focaModalService.alert('Seleccione una provincia'); |
| 194 | 197 | return; |
| 195 | 198 | } |
| 196 | - if(key === 13) { | |
| 199 | + if (key === 13) { | |
| 197 | 200 | var parametrosModal = { |
| 198 | 201 | query: '/localidad/' + $scope.cliente.provincia.ID, |
| 199 | 202 | columnas: [ |
| ... | ... | @@ -216,7 +219,7 @@ angular.module('focaBusquedaCliente') |
| 216 | 219 | focaModalService.modal(parametrosModal).then(function(localidad) { |
| 217 | 220 | $scope.cliente.localidad = localidad; |
| 218 | 221 | $timeout(function() { |
| 219 | - $scope.focused = 6; | |
| 222 | + $scope.focused = 5; | |
| 220 | 223 | }); |
| 221 | 224 | }, function() { |
| 222 | 225 | //TODO: función llamada cuando cancela el modal |
| ... | ... | @@ -224,7 +227,7 @@ angular.module('focaBusquedaCliente') |
| 224 | 227 | } |
| 225 | 228 | }; |
| 226 | 229 | $scope.seleccionarIva = function(key) { |
| 227 | - if(key === 13) { | |
| 230 | + if (key === 13) { | |
| 228 | 231 | var parametrosModal = { |
| 229 | 232 | query: '/iva', |
| 230 | 233 | columnas: [ |
| ... | ... | @@ -248,7 +251,7 @@ angular.module('focaBusquedaCliente') |
| 248 | 251 | function(iva) { |
| 249 | 252 | $scope.cliente.iva = iva; |
| 250 | 253 | $timeout(function() { |
| 251 | - $scope.focused = 10; | |
| 254 | + $scope.focused = 12; | |
| 252 | 255 | }); |
| 253 | 256 | }, function() { |
| 254 | 257 | // funcion ejecutada cuando se cancela el modal |
| ... | ... | @@ -256,7 +259,7 @@ angular.module('focaBusquedaCliente') |
| 256 | 259 | } |
| 257 | 260 | }; |
| 258 | 261 | $scope.seleccionarActividad = function(key) { |
| 259 | - if(key === 13) { | |
| 262 | + if (key === 13) { | |
| 260 | 263 | var parametrosModal = { |
| 261 | 264 | query: '/actividad', |
| 262 | 265 | columnas: [ |
| ... | ... | @@ -280,7 +283,7 @@ angular.module('focaBusquedaCliente') |
| 280 | 283 | function(actividad) { |
| 281 | 284 | $scope.cliente.actividad = actividad; |
| 282 | 285 | $timeout(function() { |
| 283 | - $scope.focused = 8; | |
| 286 | + $scope.focused = 7; | |
| 284 | 287 | }); |
| 285 | 288 | }, function() { |
| 286 | 289 | // funcion ejecutada cuando se cancela el modal |
| ... | ... | @@ -288,7 +291,7 @@ angular.module('focaBusquedaCliente') |
| 288 | 291 | } |
| 289 | 292 | }; |
| 290 | 293 | $scope.seleccionarZona = function(key) { |
| 291 | - if(key === 13) { | |
| 294 | + if (key === 13) { | |
| 292 | 295 | var parametrosModal = { |
| 293 | 296 | query: '/zona', |
| 294 | 297 | columnas: [ |
| ... | ... | @@ -312,7 +315,7 @@ angular.module('focaBusquedaCliente') |
| 312 | 315 | function(zona) { |
| 313 | 316 | $scope.cliente.zona = zona; |
| 314 | 317 | $timeout(function() { |
| 315 | - $scope.focused = 7; | |
| 318 | + $scope.focused = 6; | |
| 316 | 319 | }); |
| 317 | 320 | }, function() { |
| 318 | 321 | // funcion ejecutada cuando se cancela el modal |
| ... | ... | @@ -320,7 +323,7 @@ angular.module('focaBusquedaCliente') |
| 320 | 323 | } |
| 321 | 324 | }; |
| 322 | 325 | $scope.seleccionarTipoFactura = function(key) { |
| 323 | - if(key === 13) { | |
| 326 | + if (key === 13) { | |
| 324 | 327 | var parametrosModal = { |
| 325 | 328 | query: '/tipo-factura', |
| 326 | 329 | columnas: [ |
| ... | ... | @@ -340,7 +343,7 @@ angular.module('focaBusquedaCliente') |
| 340 | 343 | function(tipoFactura) { |
| 341 | 344 | $scope.cliente.tipoFactura = tipoFactura; |
| 342 | 345 | $timeout(function() { |
| 343 | - $scope.focused = 11; | |
| 346 | + $scope.focused = 13; | |
| 344 | 347 | }); |
| 345 | 348 | }, function() { |
| 346 | 349 | // funcion ejecutada cuando se cancela el modal |
| ... | ... | @@ -348,7 +351,7 @@ angular.module('focaBusquedaCliente') |
| 348 | 351 | } |
| 349 | 352 | }; |
| 350 | 353 | $scope.seleccionarTipoComprobante = function(key) { |
| 351 | - if(key === 13) { | |
| 354 | + if (key === 13) { | |
| 352 | 355 | var parametrosModal = { |
| 353 | 356 | query: '/tipo-comprobante', |
| 354 | 357 | columnas: [ |
| ... | ... | @@ -368,7 +371,7 @@ angular.module('focaBusquedaCliente') |
| 368 | 371 | function(tipoComprobante) { |
| 369 | 372 | $scope.cliente.tipoComprobante = tipoComprobante; |
| 370 | 373 | $timeout(function() { |
| 371 | - $scope.focused = 13; | |
| 374 | + $scope.focused = 17; | |
| 372 | 375 | }); |
| 373 | 376 | }, function() { |
| 374 | 377 | // funcion ejecutada cuando se cancela el modal |
| ... | ... | @@ -376,7 +379,7 @@ angular.module('focaBusquedaCliente') |
| 376 | 379 | } |
| 377 | 380 | }; |
| 378 | 381 | $scope.seleccionarFormaPago = function(key) { |
| 379 | - if(key === 13) { | |
| 382 | + if (key === 13) { | |
| 380 | 383 | var parametrosModal = { |
| 381 | 384 | query: '/forma-pago', |
| 382 | 385 | columnas: [ |
| ... | ... | @@ -405,7 +408,7 @@ angular.module('focaBusquedaCliente') |
| 405 | 408 | } |
| 406 | 409 | }; |
| 407 | 410 | $scope.seleccionarCobrador = function(key) { |
| 408 | - if(key === 13) { | |
| 411 | + if (key === 13) { | |
| 409 | 412 | var parametrosModal = { |
| 410 | 413 | query: '/cobrador', |
| 411 | 414 | columnas: [ |
| ... | ... | @@ -422,7 +425,7 @@ angular.module('focaBusquedaCliente') |
| 422 | 425 | size: 'md' |
| 423 | 426 | }; |
| 424 | 427 | focaModalService.modal(parametrosModal).then( |
| 425 | - function(cobrador) { | |
| 428 | + function(cobrador) { | |
| 426 | 429 | $scope.cliente.cobrador = cobrador; |
| 427 | 430 | }, function() { |
| 428 | 431 | // funcion ejecutada cuando se cancela el modal |
| ... | ... | @@ -430,7 +433,15 @@ angular.module('focaBusquedaCliente') |
| 430 | 433 | } |
| 431 | 434 | }; |
| 432 | 435 | |
| 433 | - $scope.guardar = function() { | |
| 436 | + $scope.pasarCampoCuit = function(numeroCuit) { | |
| 437 | + if (numeroCuit === 1 && $scope.cliente.cuit1.length === 2) { | |
| 438 | + $scope.cuitActivo = 2; | |
| 439 | + } else if ( numeroCuit === 2 && $scope.cliente.cuit2.length === 8) { | |
| 440 | + $scope.cuitActivo = 3; | |
| 441 | + } | |
| 442 | + }; | |
| 443 | + | |
| 444 | + $scope.guardar = function() { | |
| 434 | 445 | |
| 435 | 446 | if (!$scope.cliente.NOM) { |
| 436 | 447 | focaModalService.alert('Ingrese Nombre'); |
| ... | ... | @@ -456,15 +467,21 @@ angular.module('focaBusquedaCliente') |
| 456 | 467 | } else if (!$scope.cliente.cobrador.NUM) { |
| 457 | 468 | focaModalService.alert('Seleccione un cobrador'); |
| 458 | 469 | return; |
| 470 | + } else if (!$scope.cliente.TEL) { | |
| 471 | + focaModalService.alert('Ingrese un numero de telefono'); | |
| 472 | + return; | |
| 459 | 473 | } else if (!$scope.cliente.iva.NOMBRE) { |
| 460 | 474 | focaModalService.alert('Seleccione responsabilidad ante el IVA'); |
| 461 | 475 | return; |
| 462 | 476 | } else if (!$scope.cliente.tipoFactura.NOMBRE) { |
| 463 | 477 | focaModalService.alert('Seleccione tipo de Factura'); |
| 464 | 478 | return; |
| 465 | - } else if (!$scope.cliente.CUIT) { | |
| 479 | + } else if (!$scope.cliente.cuit1 && !$scope.cliente.cuit2 && !$scope.cliente.cuit3) { | |
| 466 | 480 | focaModalService.alert('Ingresar CUIT'); |
| 467 | 481 | return; |
| 482 | + } else if (!$scope.regexCuit.test($scope.cliente.cuit1 + $scope.cliente.cuit2 + $scope.cliente.cuit3) ) { | |
| 483 | + focaModalService.alert('Debe ingresar CUIT con formato: XX-XXXXXXXX-X'); | |
| 484 | + return; | |
| 468 | 485 | } else if (!$scope.cliente.tipoComprobante.NOMBRE) { |
| 469 | 486 | focaModalService.alert('Seleccione un Comprobante'); |
| 470 | 487 | return; |
| ... | ... | @@ -473,29 +490,11 @@ angular.module('focaBusquedaCliente') |
| 473 | 490 | return; |
| 474 | 491 | } |
| 475 | 492 | |
| 476 | - $scope.cliente.PCX = $scope.cliente.provincia.ID; | |
| 477 | - $scope.cliente.LOX = $scope.cliente.localidad.ID; | |
| 478 | - $scope.cliente.IVA = $scope.cliente.iva.ID; | |
| 479 | - $scope.cliente.ACT = $scope.cliente.actividad.ID; | |
| 480 | - $scope.cliente.ZON = $scope.cliente.zona.ID; | |
| 481 | - $scope.cliente.TIP = $scope.cliente.tipoFactura.ID; | |
| 482 | - $scope.cliente.TCO = $scope.cliente.tipoComprobante.ID; | |
| 483 | - $scope.cliente.FPA = $scope.cliente.formaPago.ID; | |
| 484 | - $scope.cliente.VEN = $scope.vendedor.id; | |
| 485 | - $scope.cliente.idCobrador = $scope.cliente.cobrador.id; | |
| 486 | - | |
| 487 | - delete $scope.cliente.provincia; | |
| 488 | - delete $scope.cliente.localidad; | |
| 489 | - delete $scope.cliente.iva; | |
| 490 | - delete $scope.cliente.actividad; | |
| 491 | - delete $scope.cliente.zona; | |
| 492 | - delete $scope.cliente.tipoFactura; | |
| 493 | - delete $scope.cliente.tipoComprobante; | |
| 494 | - delete $scope.cliente.formaPago; | |
| 495 | - delete $scope.cliente.cobrador; | |
| 493 | + | |
| 494 | + var cliente = crearCopia(); | |
| 496 | 495 | |
| 497 | 496 | focaBusquedaClienteService |
| 498 | - .guardarCliente($scope.cliente) | |
| 497 | + .guardarCliente(cliente) | |
| 499 | 498 | .then(function(res) { |
| 500 | 499 | var cliente = { |
| 501 | 500 | cod: res.data.COD, |
| ... | ... | @@ -506,6 +505,37 @@ angular.module('focaBusquedaCliente') |
| 506 | 505 | $scope.select(cliente, true); |
| 507 | 506 | }); |
| 508 | 507 | }; |
| 508 | + | |
| 509 | + function crearCopia(){ | |
| 510 | + var cliente = angular.copy($scope.cliente); | |
| 511 | + | |
| 512 | + cliente.PCX = cliente.provincia.ID; | |
| 513 | + cliente.LOX = cliente.localidad.ID; | |
| 514 | + cliente.IVA = cliente.iva.ID; | |
| 515 | + cliente.ACT = cliente.actividad.ID; | |
| 516 | + cliente.ZON = cliente.zona.ID; | |
| 517 | + cliente.TIP = cliente.tipoFactura.ID; | |
| 518 | + cliente.TCO = cliente.tipoComprobante.ID; | |
| 519 | + cliente.FPA = cliente.formaPago.ID; | |
| 520 | + cliente.VEN = vendedor.ID; | |
| 521 | + cliente.CUIT = cliente.cuit1 + cliente.cuit2 + cliente.cuit3; | |
| 522 | + cliente.idCobrador = cliente.cobrador.ID; | |
| 523 | + | |
| 524 | + delete cliente.provincia; | |
| 525 | + delete cliente.localidad; | |
| 526 | + delete cliente.iva; | |
| 527 | + delete cliente.actividad; | |
| 528 | + delete cliente.zona; | |
| 529 | + delete cliente.tipoFactura; | |
| 530 | + delete cliente.tipoComprobante; | |
| 531 | + delete cliente.formaPago; | |
| 532 | + delete cliente.cobrador; | |
| 533 | + delete cliente.cuit1; | |
| 534 | + delete cliente.cuit2; | |
| 535 | + delete cliente.cuit3; | |
| 536 | + | |
| 537 | + return cliente; | |
| 538 | + } | |
| 509 | 539 | |
| 510 | 540 | function calcularPages(paginaActual) { |
| 511 | 541 | var paginas = []; |
| ... | ... | @@ -570,5 +600,6 @@ angular.module('focaBusquedaCliente') |
| 570 | 600 | $scope.selectedClientes = 0; |
| 571 | 601 | } |
| 572 | 602 | } |
| 603 | + | |
| 573 | 604 | } |
| 574 | 605 | ]); |
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 |
| ... | ... | @@ -300,6 +300,36 @@ |
| 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"> |
| ... | ... | @@ -328,8 +358,8 @@ |
| 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"> |
| ... | ... | @@ -354,8 +384,8 @@ |
| 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 |