diff --git a/src/js/controller.js b/src/js/controller.js index f7afadc..5221339 100644 --- a/src/js/controller.js +++ b/src/js/controller.js @@ -29,7 +29,6 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', $scope.isNumber = angular.isNumber; $scope.datepickerAbierto = false; $scope.show = false; - $scope.validar = true; $scope.cargando = true; $scope.botonera = crearNotaPedidoService.getBotonera(); $scope.puntoVenta = $filter('rellenarDigitos')(0, 4); @@ -128,7 +127,8 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', }, true); $scope.crearNotaPedido = function() { - if (!$scope.notaPedido.cliente.COD && validarNotaRemitada()) { + if (validarNotaRemitada()) { + if (!$scope.notaPedido.cliente.COD ) { focaModalService.alert('Ingrese Cliente'); return; } else if (!$scope.notaPedido.proveedor.COD) { @@ -225,6 +225,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', console.info(error); } ); + } }; $scope.seleccionarNotaPedido = function() { diff --git a/src/views/nota-pedido.html b/src/views/nota-pedido.html index f28e276..30be62c 100644 --- a/src/views/nota-pedido.html +++ b/src/views/nota-pedido.html @@ -68,7 +68,7 @@ >