Commit 8b14f3e4bea73b0db79a8b9cc030e6974b79ebf8
1 parent
1a30061d01
Exists in
master
precios y condiciones, relacion con cliente
Showing
1 changed file
with
14 additions
and
4 deletions
Show diff stats
src/js/controller.js
| ... | ... | @@ -299,10 +299,10 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 299 | 299 | }; |
| 300 | 300 | |
| 301 | 301 | $scope.seleccionarPuntosDeDescarga = function() { |
| 302 | - if(!$scope.notaPedido.cliente.COD || !$scope.notaPedido.domicilio.id) { | |
| 302 | + if (!$scope.notaPedido.cliente.COD || !$scope.notaPedido.domicilio.id) { | |
| 303 | 303 | focaModalService.alert('Primero seleccione un cliente y un domicilio'); |
| 304 | 304 | return; |
| 305 | - }else { | |
| 305 | + } else { | |
| 306 | 306 | var modalInstance = $uibModal.open( |
| 307 | 307 | { |
| 308 | 308 | ariaLabelledBy: 'Búsqueda de Puntos de descarga', |
| ... | ... | @@ -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() { |
| 586 | + if (!$scope.notaPedido.cliente.COD) { | |
| 587 | + focaModalService.alert('Primero seleccione un cliente'); | |
| 588 | + return; | |
| 589 | + } | |
| 585 | 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( |