Commit 7750f3b50398347da36f64f0310646e5f0250fb8
Exists in
master
Merge remote-tracking branch 'upstream/develop'
Showing
1 changed file
Show diff stats
src/js/controller.js
... | ... | @@ -461,13 +461,14 @@ angular.module('focaCrearNotaPedido').controller('notaPedidoCtrl', |
461 | 461 | |
462 | 462 | $scope.seleccionarCliente = function () { |
463 | 463 | if (validarNotaRemitada()) { |
464 | + | |
464 | 465 | var modalInstance = $uibModal.open( |
465 | 466 | { |
466 | 467 | ariaLabelledBy: 'Busqueda de Cliente', |
467 | 468 | templateUrl: 'foca-busqueda-cliente-modal.html', |
468 | 469 | controller: 'focaBusquedaClienteModalController', |
469 | 470 | resolve: { |
470 | - vendedor: function () { return null; }, | |
471 | + vendedor: function () { return { id: $scope.idVendedor} }, | |
471 | 472 | cobrador: function () { return null; } |
472 | 473 | }, |
473 | 474 | size: 'lg' |
... | ... | @@ -651,12 +652,13 @@ angular.module('focaCrearNotaPedido').controller('notaPedidoCtrl', |
651 | 652 | $scope.notaPedido.notaPedidoPlazo = precioCondicion.plazoPago; |
652 | 653 | $scope.notaPedido.precioCondicion = precioCondicion; |
653 | 654 | $scope.notaPedido.idPrecioCondicion = precioCondicion.listaPrecio.ID; |
654 | - $scope.idLista = precioCondicion.listaPrecio.ID; | |
655 | + $scope.idLista = parseInt(precioCondicion.listaPrecio.ID) ? | |
656 | + parseInt(precioCondicion.listaPrecio.ID) : -1; | |
655 | 657 | for (var i = 0; i < precioCondicion.plazoPago.length; i++) { |
656 | 658 | plazosConcat += precioCondicion.plazoPago[i].dias + ', '; |
657 | 659 | } |
658 | 660 | plazosConcat = plazosConcat.substring(0, plazosConcat.length - 2); |
659 | - cabecera = $filter('rellenarDigitos')(parseInt(precioCondicion.listaPrecio.ID), 4) + | |
661 | + cabecera = $filter('rellenarDigitos')($scope.idLista, 4) + | |
660 | 662 | ' - ' + precioCondicion.listaPrecio.DES + ' ' + plazosConcat.trim(); |
661 | 663 | } else { //Cuando se ingresan los plazos manualmente |
662 | 664 | $scope.notaPedido.idPrecioCondicion = 0; |