Commit c960e78e3ba80a535b57351fcc106dbb6d7c1642

Authored by Jose Pinto
1 parent 2674312b76
Exists in master

envio vendedor a modal cliente

Showing 1 changed file with 9 additions and 6 deletions   Show diff stats
src/js/controller.js
... ... @@ -456,12 +456,19 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl',
456 456 };
457 457  
458 458 $scope.seleccionarCliente = function() {
  459 + if(!$scope.notaPedido.vendedor.CodVen) {
  460 + focaModalService.alert('Primero seleccione un vendedor');
  461 + return;
  462 + }
459 463 if(validarNotaRemitada()) {
460 464 var modalInstance = $uibModal.open(
461 465 {
462 466 ariaLabelledBy: 'Busqueda de Cliente',
463 467 templateUrl: 'foca-busqueda-cliente-modal.html',
464 468 controller: 'focaBusquedaClienteModalController',
  469 + resolve: {
  470 + vendedor: function() { return $scope.notaPedido.vendedor; }
  471 + },
465 472 size: 'lg'
466 473 }
467 474 );
... ... @@ -480,13 +487,9 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl',
480 487 templateUrl: 'modal-domicilio.html',
481 488 controller: 'focaModalDomicilioController',
482 489 resolve: {
483   - idCliente: function() {
484   - return cliente.cod;
485   - },
  490 + idCliente: function() { return cliente.cod; },
486 491 esNuevo: function() { return cliente.esNuevo; },
487   - articulos: function() {
488   - return $scope.articulosTabla;
489   - }
  492 + articulos: function() { return $scope.articulosTabla; },
490 493 },
491 494 size: 'lg',
492 495 }