Commit 478c8edb644a98c5cd79133172c99b63438e9dbc
1 parent
eeb26b5e5b
Exists in
master
and in
1 other branch
Guardar y busqueda arreglado
Showing
1 changed file
with
19 additions
and
18 deletions
Show diff stats
src/js/controller.js
... | ... | @@ -231,7 +231,6 @@ angular.module('focaBusquedaCliente') |
231 | 231 | $scope.seleccionarIva = function(key) { |
232 | 232 | if (key === 13) { |
233 | 233 | var parametrosModal = { |
234 | - searchText: $scope.cliente.iva.NOMBRE, | |
235 | 234 | query: '/iva', |
236 | 235 | columnas: [ |
237 | 236 | { |
... | ... | @@ -333,28 +332,27 @@ angular.module('focaBusquedaCliente') |
333 | 332 | if ($scope.cliente.iva.ID == 1) { |
334 | 333 | datos = [ |
335 | 334 | { |
336 | - id: 'A', | |
337 | - nombre: 'Factura A' | |
335 | + ID: 'A', | |
336 | + NOMBRE: 'Factura A' | |
338 | 337 | }, |
339 | 338 | { |
340 | - id: 'M', | |
341 | - nombre: 'Factura M' | |
339 | + ID: 'M', | |
340 | + NOMBRE: 'Factura M' | |
342 | 341 | }, |
343 | 342 | { |
344 | - id: 'R', | |
345 | - nombre: 'Remito' | |
343 | + ID: 'R', | |
344 | + NOMBRE: 'Remito' | |
346 | 345 | } |
347 | 346 | ]; |
348 | - | |
349 | 347 | } else { |
350 | 348 | datos = [ |
351 | 349 | { |
352 | - id: 'B', | |
353 | - nombre: 'Factura B' | |
350 | + ID: 'B', | |
351 | + NOMBRE: 'Factura B' | |
354 | 352 | }, |
355 | 353 | { |
356 | - id: 'R', | |
357 | - nombre: 'Remito' | |
354 | + ID: 'R', | |
355 | + NOMBRE: 'Remito' | |
358 | 356 | } |
359 | 357 | ]; |
360 | 358 | } |
... | ... | @@ -364,16 +362,16 @@ angular.module('focaBusquedaCliente') |
364 | 362 | size: 'md', |
365 | 363 | columnas: [ |
366 | 364 | { |
367 | - propiedad: 'id', | |
368 | - nombre: 'Codigo' | |
365 | + propiedad: 'ID', | |
366 | + NOMBRE: 'Codigo' | |
369 | 367 | }, |
370 | 368 | { |
371 | - propiedad: 'nombre', | |
372 | - nombre: 'Factura' | |
369 | + propiedad: 'NOMBRE', | |
370 | + NOMBRE: 'Factura' | |
373 | 371 | } |
374 | 372 | ], |
375 | 373 | }).then(function(res) { |
376 | - $scope.cliente.tipoFactura.NOMBRE = res.nombre; | |
374 | + $scope.cliente.tipoFactura = res; | |
377 | 375 | }); |
378 | 376 | } |
379 | 377 | }; |
... | ... | @@ -464,6 +462,7 @@ angular.module('focaBusquedaCliente') |
464 | 462 | }; |
465 | 463 | |
466 | 464 | $scope.pasarCampoCuit = function(numeroCuit) { |
465 | + | |
467 | 466 | if (numeroCuit === 1 && $scope.cliente.cuit1.length === 2) { |
468 | 467 | $scope.cuitActivo = 2; |
469 | 468 | } else if ( numeroCuit === 2 && $scope.cliente.cuit2.length === 8) { |
... | ... | @@ -472,6 +471,8 @@ angular.module('focaBusquedaCliente') |
472 | 471 | }; |
473 | 472 | |
474 | 473 | $scope.guardar = function() { |
474 | + console.log('Cliente: ', $scope.cliente); | |
475 | + | |
475 | 476 | if (!$scope.cliente.NOM) { |
476 | 477 | focaModalService.alert('Ingrese Nombre'); |
477 | 478 | return; |
... | ... | @@ -564,7 +565,7 @@ angular.module('focaBusquedaCliente') |
564 | 565 | delete cliente.cuit1; |
565 | 566 | delete cliente.cuit2; |
566 | 567 | delete cliente.cuit3; |
567 | - | |
568 | + console.log('Copia Cliente: ',cliente); | |
568 | 569 | return cliente; |
569 | 570 | } |
570 | 571 |