Commit 638e7c6e59b464b14587424d31a30e31fec66242
1 parent
49f819a76e
Exists in
master
and in
1 other branch
Cambios
Showing
1 changed file
with
3 additions
and
4 deletions
Show diff stats
src/js/controller.js
... | ... | @@ -128,7 +128,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
128 | 128 | }, true); |
129 | 129 | |
130 | 130 | $scope.crearNotaPedido = function() { |
131 | - if (!$scope.notaPedido.cliente.COD) { | |
131 | + if (!$scope.notaPedido.cliente.COD && validarNotaRemitada()) { | |
132 | 132 | focaModalService.alert('Ingrese Cliente'); |
133 | 133 | return; |
134 | 134 | } else if (!$scope.notaPedido.proveedor.COD) { |
... | ... | @@ -154,7 +154,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
154 | 154 | } else if ($scope.notaPedido.articulosNotaPedido.length === 0) { |
155 | 155 | focaModalService.alert('Debe cargar al menos un articulo'); |
156 | 156 | return; |
157 | - } else if (validarNotaRemitada()) { | |
157 | + } | |
158 | 158 | focaBotoneraLateralService.startGuardar(); |
159 | 159 | $scope.saveLoading = true; |
160 | 160 | var notaPedido = { |
... | ... | @@ -225,7 +225,6 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
225 | 225 | console.info(error); |
226 | 226 | } |
227 | 227 | ); |
228 | - } | |
229 | 228 | }; |
230 | 229 | |
231 | 230 | $scope.seleccionarNotaPedido = function() { |
... | ... | @@ -819,7 +818,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
819 | 818 | function setearNotaPedido(notaPedido) { |
820 | 819 | //añado cabeceras |
821 | 820 | |
822 | - if (notaPedido.idRemito == null) { | |
821 | + if (validarNotaRemitada()) { | |
823 | 822 | $scope.validar = true; |
824 | 823 | } else { |
825 | 824 | $scope.validar = false; |