Commit 1ec4e9a4af5e8f921c09083878aad840b02e6371
1 parent
71d49b9116
Exists in
master
precios y condiciones relacion con cliente
Showing
1 changed file
with
12 additions
and
2 deletions
Show diff stats
src/js/controller.js
| ... | ... | @@ -585,7 +585,8 @@ angular.module('focaCrearRemito') .controller('remitoController', |
| 585 | 585 | COD: cliente.cod, |
| 586 | 586 | CUIT: cliente.cuit, |
| 587 | 587 | NOM: cliente.nom, |
| 588 | - MAIL: cliente.mail | |
| 588 | + MAIL: cliente.mail, | |
| 589 | + MOD: cliente.mod | |
| 589 | 590 | }; |
| 590 | 591 | |
| 591 | 592 | |
| ... | ... | @@ -647,13 +648,22 @@ angular.module('focaCrearRemito') .controller('remitoController', |
| 647 | 648 | }; |
| 648 | 649 | |
| 649 | 650 | $scope.seleccionarPreciosYCondiciones = function() { |
| 651 | + if (!$scope.remito.cliente.COD) { | |
| 652 | + focaModalService.alert('Primero seleccione un cliente'); | |
| 653 | + return; | |
| 654 | + } | |
| 650 | 655 | if(varlidarRemitoFacturado()) { |
| 651 | 656 | var modalInstance = $uibModal.open( |
| 652 | 657 | { |
| 653 | 658 | ariaLabelledBy: 'Busqueda de Precio Condición', |
| 654 | 659 | templateUrl: 'modal-precio-condicion.html', |
| 655 | 660 | controller: 'focaModalPrecioCondicionController', |
| 656 | - size: 'lg' | |
| 661 | + size: 'lg', | |
| 662 | + resolve: { | |
| 663 | + idListaPrecio: function() { | |
| 664 | + return $scope.remito.cliente.MOD || null; | |
| 665 | + } | |
| 666 | + } | |
| 657 | 667 | } |
| 658 | 668 | ); |
| 659 | 669 | modalInstance.result.then( |