Commit 0bb7798affa0c22f35c4ef6aecda846585d13dd2
Exists in
master
Merge branch 'master' into 'develop'
Master(mpuebla) See merge request !120
Showing
1 changed file
Show diff stats
src/js/controller.js
... | ... | @@ -132,6 +132,10 @@ angular.module('focaCrearNotaPedido').controller('notaPedidoCtrl', |
132 | 132 | if (!$scope.notaPedido.cliente.COD) { |
133 | 133 | focaModalService.alert('Ingrese Cliente'); |
134 | 134 | return; |
135 | + } | |
136 | + if (!$scope.notaPedido.vendedor.id) { | |
137 | + focaModalService.alert('Este cliente no tiene vendedor asignado'); | |
138 | + return; | |
135 | 139 | } else if ($scope.notaPedido.idRemito === -1) { |
136 | 140 | focaBotoneraLateralService.alert('No se puede modificar esta nota de pedido'); |
137 | 141 | return; |
... | ... | @@ -485,7 +489,10 @@ angular.module('focaCrearNotaPedido').controller('notaPedidoCtrl', |
485 | 489 | controller: 'focaBusquedaClienteModalController', |
486 | 490 | resolve: { |
487 | 491 | vendedor: function () { return { id: $scope.idVendedor }; }, |
488 | - cobrador: function () { return null; } | |
492 | + cobrador: function () { return null; }, | |
493 | + searchText: function () { | |
494 | + return $scope.cliente ? $scope.cliente.nom : ''; | |
495 | + } | |
489 | 496 | }, |
490 | 497 | size: 'lg' |
491 | 498 | } |