Commit 1fae4ccbb1aa6b62704e3f97db49e9b73e375506
Exists in
master
and in
1 other branch
Merge branch 'develop' of http://git.focasoftware.com/npm/foca-crear-nota-pedido
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 | } |