Commit 07e0d7c7b1594141e9eeca5345448e681ed93866
1 parent
dca6a3afd6
Exists in
master
Auto stash before revert of "Validar id remito"
Showing
1 changed file
with
3 additions
and
2 deletions
Show diff stats
src/js/controller.js
... | ... | @@ -127,10 +127,12 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
127 | 127 | }, true); |
128 | 128 | |
129 | 129 | $scope.crearNotaPedido = function() { |
130 | - if (validarNotaRemitada()) { | |
131 | 130 | if (!$scope.notaPedido.cliente.COD ) { |
132 | 131 | focaModalService.alert('Ingrese Cliente'); |
133 | 132 | return; |
133 | + } else if ($scope.notaPedido.idRemito === -1) { | |
134 | + focaBotoneraLateralService.alert('No se puede modificar esta nota de pedido'); | |
135 | + return; | |
134 | 136 | } else if (!$scope.notaPedido.proveedor.COD) { |
135 | 137 | focaModalService.alert('Ingrese Proveedor'); |
136 | 138 | return; |
... | ... | @@ -224,7 +226,6 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
224 | 226 | $scope.saveLoading = false; |
225 | 227 | console.info(error); |
226 | 228 | }); |
227 | - } | |
228 | 229 | }; |
229 | 230 | |
230 | 231 | $scope.seleccionarNotaPedido = function() { |