Commit a9b60dfe62d4f34cb2ce662a02cd82c44ac2d39c
Exists in
master
Merge branch 'develop' into 'master'
Develop See merge request !106
Showing
2 changed files
Show diff stats
src/js/controller.js
| ... | ... | @@ -356,6 +356,14 @@ angular.module('focaCrearNotaPedido').controller('notaPedidoCtrl', |
| 356 | 356 | } |
| 357 | 357 | }; |
| 358 | 358 | |
| 359 | + $scope.seleccionarDomicilioDeEntrega = function () { | |
| 360 | + if (!$scope.notaPedido.cliente.COD) { | |
| 361 | + focaModalService.alert('Seleccione un Cliente'); | |
| 362 | + return; | |
| 363 | + } else { | |
| 364 | + $scope.abrirModalDomicilios($scope.cliente); | |
| 365 | + } | |
| 366 | + }; | |
| 359 | 367 | $scope.seleccionarProveedor = function () { |
| 360 | 368 | $scope.abrirModalProveedores(function () { |
| 361 | 369 | if (validarNotaRemitada()) { |
| ... | ... | @@ -461,13 +469,14 @@ angular.module('focaCrearNotaPedido').controller('notaPedidoCtrl', |
| 461 | 469 | |
| 462 | 470 | $scope.seleccionarCliente = function () { |
| 463 | 471 | if (validarNotaRemitada()) { |
| 472 | + | |
| 464 | 473 | var modalInstance = $uibModal.open( |
| 465 | 474 | { |
| 466 | 475 | ariaLabelledBy: 'Busqueda de Cliente', |
| 467 | 476 | templateUrl: 'foca-busqueda-cliente-modal.html', |
| 468 | 477 | controller: 'focaBusquedaClienteModalController', |
| 469 | 478 | resolve: { |
| 470 | - vendedor: function () { return null; }, | |
| 479 | + vendedor: function () { return { id: $scope.idVendedor} }, | |
| 471 | 480 | cobrador: function () { return null; } |
| 472 | 481 | }, |
| 473 | 482 | size: 'lg' |
| ... | ... | @@ -583,6 +592,8 @@ angular.module('focaCrearNotaPedido').controller('notaPedidoCtrl', |
| 583 | 592 | // Seteo checked en botonera |
| 584 | 593 | $filter('filter')($scope.botonera, |
| 585 | 594 | { label: 'Cliente' })[0].checked = true; |
| 595 | + $filter('filter')($scope.botonera, | |
| 596 | + { label: 'Domicilio de Entrega' })[0].checked = true; | |
| 586 | 597 | }) |
| 587 | 598 | .catch(function (e) { console.log(e); }); |
| 588 | 599 | }, function () { |
src/js/service.js