Commit 39156ba867110841c9f2288ee5bcb8ca8dcc281b
Exists in
master
and in
1 other branch
Merge branch 'master' into 'develop'
Master See merge request !23
Showing
2 changed files
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 = ''; |
... | ... | @@ -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 | searchText: $scope.cliente.provincia.NOMBRE, |
164 | 167 | query: '/provincia', |
... | ... | @@ -182,7 +185,7 @@ angular.module('focaBusquedaCliente') |
182 | 185 | focaModalService.modal(parametrosModal).then(function(provincia) { |
183 | 186 | $scope.cliente.provincia = provincia; |
184 | 187 | $timeout(function() { |
185 | - $scope.focused = 5; | |
188 | + $scope.focused = 4; | |
186 | 189 | }); |
187 | 190 | }, function() { |
188 | 191 | //TODO: función llamada cuando cancela el modal |
... | ... | @@ -190,11 +193,11 @@ angular.module('focaBusquedaCliente') |
190 | 193 | } |
191 | 194 | }; |
192 | 195 | $scope.seleccionarLocalidad = function(key) { |
193 | - if($scope.cliente.provincia.ID === undefined) { | |
196 | + if ($scope.cliente.provincia.ID === undefined) { | |
194 | 197 | focaModalService.alert('Seleccione una provincia'); |
195 | 198 | return; |
196 | 199 | } |
197 | - if(key === 13) { | |
200 | + if (key === 13) { | |
198 | 201 | var parametrosModal = { |
199 | 202 | searchText: $scope.cliente.localidad.NOMBRE, |
200 | 203 | query: '/localidad/' + $scope.cliente.provincia.ID, |
... | ... | @@ -218,7 +221,7 @@ angular.module('focaBusquedaCliente') |
218 | 221 | focaModalService.modal(parametrosModal).then(function(localidad) { |
219 | 222 | $scope.cliente.localidad = localidad; |
220 | 223 | $timeout(function() { |
221 | - $scope.focused = 6; | |
224 | + $scope.focused = 5; | |
222 | 225 | }); |
223 | 226 | }, function() { |
224 | 227 | //TODO: función llamada cuando cancela el modal |
... | ... | @@ -226,7 +229,7 @@ angular.module('focaBusquedaCliente') |
226 | 229 | } |
227 | 230 | }; |
228 | 231 | $scope.seleccionarIva = function(key) { |
229 | - if(key === 13) { | |
232 | + if (key === 13) { | |
230 | 233 | var parametrosModal = { |
231 | 234 | searchText: $scope.cliente.iva.NOMBRE, |
232 | 235 | query: '/iva', |
... | ... | @@ -251,7 +254,7 @@ angular.module('focaBusquedaCliente') |
251 | 254 | function(iva) { |
252 | 255 | $scope.cliente.iva = iva; |
253 | 256 | $timeout(function() { |
254 | - $scope.focused = 10; | |
257 | + $scope.focused = 12; | |
255 | 258 | }); |
256 | 259 | }, function() { |
257 | 260 | // funcion ejecutada cuando se cancela el modal |
... | ... | @@ -259,7 +262,7 @@ angular.module('focaBusquedaCliente') |
259 | 262 | } |
260 | 263 | }; |
261 | 264 | $scope.seleccionarActividad = function(key) { |
262 | - if(key === 13) { | |
265 | + if (key === 13) { | |
263 | 266 | var parametrosModal = { |
264 | 267 | searchText: $scope.cliente.actividad.NOM, |
265 | 268 | query: '/actividad', |
... | ... | @@ -284,7 +287,7 @@ angular.module('focaBusquedaCliente') |
284 | 287 | function(actividad) { |
285 | 288 | $scope.cliente.actividad = actividad; |
286 | 289 | $timeout(function() { |
287 | - $scope.focused = 8; | |
290 | + $scope.focused = 7; | |
288 | 291 | }); |
289 | 292 | }, function() { |
290 | 293 | // funcion ejecutada cuando se cancela el modal |
... | ... | @@ -292,7 +295,7 @@ angular.module('focaBusquedaCliente') |
292 | 295 | } |
293 | 296 | }; |
294 | 297 | $scope.seleccionarZona = function(key) { |
295 | - if(key === 13) { | |
298 | + if (key === 13) { | |
296 | 299 | var parametrosModal = { |
297 | 300 | searchText: $scope.cliente.zona.NOM, |
298 | 301 | query: '/zona', |
... | ... | @@ -317,7 +320,7 @@ angular.module('focaBusquedaCliente') |
317 | 320 | function(zona) { |
318 | 321 | $scope.cliente.zona = zona; |
319 | 322 | $timeout(function() { |
320 | - $scope.focused = 7; | |
323 | + $scope.focused = 6; | |
321 | 324 | }); |
322 | 325 | }, function() { |
323 | 326 | // funcion ejecutada cuando se cancela el modal |
... | ... | @@ -325,36 +328,57 @@ angular.module('focaBusquedaCliente') |
325 | 328 | } |
326 | 329 | }; |
327 | 330 | $scope.seleccionarTipoFactura = function(key) { |
328 | - if(key === 13) { | |
329 | - var parametrosModal = { | |
330 | - searchText: $scope.cliente.tipoFactura.NOMBRE, | |
331 | - 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 | + | |
349 | + } else { | |
350 | + datos = [ | |
351 | + { | |
352 | + id: 'B', | |
353 | + nombre: 'Factura B' | |
354 | + }, | |
355 | + { | |
356 | + id: 'R', | |
357 | + nombre: 'Remito' | |
358 | + } | |
359 | + ]; | |
360 | + } | |
361 | + focaModalService.modal({ | |
362 | + titulo: 'Seleccionar Factura', | |
363 | + data: datos, | |
364 | + size: 'md', | |
332 | 365 | columnas: [ |
333 | 366 | { |
334 | - propiedad: 'ID', | |
335 | - nombre: 'Código' | |
367 | + propiedad: 'id', | |
368 | + nombre: 'Codigo' | |
336 | 369 | }, |
337 | 370 | { |
338 | - propiedad: 'NOMBRE', | |
339 | - nombre: 'Nombre' | |
371 | + propiedad: 'nombre', | |
372 | + nombre: 'Factura' | |
340 | 373 | } |
341 | 374 | ], |
342 | - titulo: 'Búsqueda de tipos de factura', | |
343 | - size: 'md' | |
344 | - }; | |
345 | - focaModalService.modal(parametrosModal).then( | |
346 | - function(tipoFactura) { | |
347 | - $scope.cliente.tipoFactura = tipoFactura; | |
348 | - $timeout(function() { | |
349 | - $scope.focused = 11; | |
350 | - }); | |
351 | - }, function() { | |
352 | - // funcion ejecutada cuando se cancela el modal | |
353 | - }); | |
375 | + }).then(function(res) { | |
376 | + $scope.cliente.tipoFactura.NOMBRE = res.nombre; | |
377 | + }); | |
354 | 378 | } |
355 | 379 | }; |
356 | 380 | $scope.seleccionarTipoComprobante = function(key) { |
357 | - if(key === 13) { | |
381 | + if (key === 13) { | |
358 | 382 | var parametrosModal = { |
359 | 383 | searchText: $scope.cliente.tipoComprobante.NOMBRE, |
360 | 384 | query: '/tipo-comprobante', |
... | ... | @@ -375,7 +399,7 @@ angular.module('focaBusquedaCliente') |
375 | 399 | function(tipoComprobante) { |
376 | 400 | $scope.cliente.tipoComprobante = tipoComprobante; |
377 | 401 | $timeout(function() { |
378 | - $scope.focused = 13; | |
402 | + $scope.focused = 17; | |
379 | 403 | }); |
380 | 404 | }, function() { |
381 | 405 | // funcion ejecutada cuando se cancela el modal |
... | ... | @@ -383,7 +407,7 @@ angular.module('focaBusquedaCliente') |
383 | 407 | } |
384 | 408 | }; |
385 | 409 | $scope.seleccionarFormaPago = function(key) { |
386 | - if(key === 13) { | |
410 | + if (key === 13) { | |
387 | 411 | var parametrosModal = { |
388 | 412 | searchText: $scope.cliente.formaPago.NOMBRE, |
389 | 413 | query: '/forma-pago', |
... | ... | @@ -413,7 +437,7 @@ angular.module('focaBusquedaCliente') |
413 | 437 | } |
414 | 438 | }; |
415 | 439 | $scope.seleccionarCobrador = function(key) { |
416 | - if(key === 13) { | |
440 | + if (key === 13) { | |
417 | 441 | var parametrosModal = { |
418 | 442 | searchText: $scope.cliente.cobrador.NOM, |
419 | 443 | query: '/cobrador', |
... | ... | @@ -431,7 +455,7 @@ angular.module('focaBusquedaCliente') |
431 | 455 | size: 'md' |
432 | 456 | }; |
433 | 457 | focaModalService.modal(parametrosModal).then( |
434 | - function(cobrador) { | |
458 | + function(cobrador) { | |
435 | 459 | $scope.cliente.cobrador = cobrador; |
436 | 460 | }, function() { |
437 | 461 | // funcion ejecutada cuando se cancela el modal |
... | ... | @@ -439,8 +463,15 @@ angular.module('focaBusquedaCliente') |
439 | 463 | } |
440 | 464 | }; |
441 | 465 | |
442 | - $scope.guardar = function() { | |
466 | + $scope.pasarCampoCuit = function(numeroCuit) { | |
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 | + }; | |
443 | 473 | |
474 | + $scope.guardar = function() { | |
444 | 475 | if (!$scope.cliente.NOM) { |
445 | 476 | focaModalService.alert('Ingrese Nombre'); |
446 | 477 | return; |
... | ... | @@ -465,14 +496,23 @@ angular.module('focaBusquedaCliente') |
465 | 496 | } else if (!$scope.cliente.cobrador.NUM) { |
466 | 497 | focaModalService.alert('Seleccione un cobrador'); |
467 | 498 | return; |
499 | + } else if (!$scope.cliente.TEL) { | |
500 | + focaModalService.alert('Ingrese un numero de telefono'); | |
501 | + return; | |
468 | 502 | } else if (!$scope.cliente.iva.NOMBRE) { |
469 | 503 | focaModalService.alert('Seleccione responsabilidad ante el IVA'); |
470 | 504 | return; |
471 | 505 | } else if (!$scope.cliente.tipoFactura.NOMBRE) { |
472 | 506 | focaModalService.alert('Seleccione tipo de Factura'); |
473 | 507 | return; |
474 | - } else if (!$scope.cliente.CUIT) { | |
475 | - 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'); | |
476 | 516 | return; |
477 | 517 | } else if (!$scope.cliente.tipoComprobante.NOMBRE) { |
478 | 518 | focaModalService.alert('Seleccione un Comprobante'); |
... | ... | @@ -482,29 +522,10 @@ angular.module('focaBusquedaCliente') |
482 | 522 | return; |
483 | 523 | } |
484 | 524 | |
485 | - $scope.cliente.PCX = $scope.cliente.provincia.ID; | |
486 | - $scope.cliente.LOX = $scope.cliente.localidad.ID; | |
487 | - $scope.cliente.IVA = $scope.cliente.iva.ID; | |
488 | - $scope.cliente.ACT = $scope.cliente.actividad.ID; | |
489 | - $scope.cliente.ZON = $scope.cliente.zona.ID; | |
490 | - $scope.cliente.TIP = $scope.cliente.tipoFactura.ID; | |
491 | - $scope.cliente.TCO = $scope.cliente.tipoComprobante.ID; | |
492 | - $scope.cliente.FPA = $scope.cliente.formaPago.ID; | |
493 | - $scope.cliente.VEN = $scope.vendedor.id; | |
494 | - $scope.cliente.idCobrador = $scope.cliente.cobrador.id; | |
495 | - | |
496 | - delete $scope.cliente.provincia; | |
497 | - delete $scope.cliente.localidad; | |
498 | - delete $scope.cliente.iva; | |
499 | - delete $scope.cliente.actividad; | |
500 | - delete $scope.cliente.zona; | |
501 | - delete $scope.cliente.tipoFactura; | |
502 | - delete $scope.cliente.tipoComprobante; | |
503 | - delete $scope.cliente.formaPago; | |
504 | - delete $scope.cliente.cobrador; | |
525 | + var cliente = crearCopia(); | |
505 | 526 | |
506 | 527 | focaBusquedaClienteService |
507 | - .guardarCliente($scope.cliente) | |
528 | + .guardarCliente(cliente) | |
508 | 529 | .then(function(res) { |
509 | 530 | var cliente = { |
510 | 531 | cod: res.data.COD, |
... | ... | @@ -515,6 +536,37 @@ angular.module('focaBusquedaCliente') |
515 | 536 | $scope.select(cliente, true); |
516 | 537 | }); |
517 | 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 | + } | |
518 | 570 | |
519 | 571 | function calcularPages(paginaActual) { |
520 | 572 | var paginas = []; |
... | ... | @@ -579,5 +631,6 @@ angular.module('focaBusquedaCliente') |
579 | 631 | $scope.selectedClientes = 0; |
580 | 632 | } |
581 | 633 | } |
634 | + | |
582 | 635 | } |
583 | 636 | ]); |
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"> |
... | ... | @@ -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 |