Commit 4c42f95cad4d983604d1d5b3aadd79e9fa254e25
Exists in
master
and in
1 other branch
Merge branch 'master' into 'develop'
Master See merge request !57
Showing
1 changed file
Show diff stats
src/js/controller.js
... | ... | @@ -529,7 +529,8 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
529 | 529 | $scope.notaPedido.cliente = { |
530 | 530 | COD: cliente.cod, |
531 | 531 | CUIT: cliente.cuit, |
532 | - NOM: cliente.nom | |
532 | + NOM: cliente.nom, | |
533 | + MOD: cliente.mod | |
533 | 534 | }; |
534 | 535 | var domicilioStamp = |
535 | 536 | domicilio.Calle + ' ' + domicilio.Numero + ', ' + |
... | ... | @@ -582,13 +583,22 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
582 | 583 | }; |
583 | 584 | |
584 | 585 | $scope.seleccionarPreciosYCondiciones = function() { |
585 | - if (validarNotaRemitada()) { | |
586 | + if (!$scope.notaPedido.cliente.COD) { | |
587 | + focaModalService.alert('Primero seleccione un cliente'); | |
588 | + return; | |
589 | + } | |
590 | + if(validarNotaRemitada()) { | |
586 | 591 | var modalInstance = $uibModal.open( |
587 | 592 | { |
588 | 593 | ariaLabelledBy: 'Busqueda de Precio Condición', |
589 | 594 | templateUrl: 'modal-precio-condicion.html', |
590 | 595 | controller: 'focaModalPrecioCondicionController', |
591 | - size: 'lg' | |
596 | + size: 'lg', | |
597 | + resolve: { | |
598 | + idListaPrecio: function() { | |
599 | + return $scope.notaPedido.cliente.MOD || null; | |
600 | + } | |
601 | + } | |
592 | 602 | } |
593 | 603 | ); |
594 | 604 | modalInstance.result.then( |