Commit 44d96ee19c3c80cb96fdab5d72e707fc88891af5
1 parent
638e7c6e59
Exists in
master
and in
1 other branch
Cambio
Showing
2 changed files
with
7 additions
and
6 deletions
Show diff stats
src/js/controller.js
... | ... | @@ -29,7 +29,6 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
29 | 29 | $scope.isNumber = angular.isNumber; |
30 | 30 | $scope.datepickerAbierto = false; |
31 | 31 | $scope.show = false; |
32 | - $scope.validar = true; | |
33 | 32 | $scope.cargando = true; |
34 | 33 | $scope.botonera = crearNotaPedidoService.getBotonera(); |
35 | 34 | $scope.puntoVenta = $filter('rellenarDigitos')(0, 4); |
... | ... | @@ -128,7 +127,8 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
128 | 127 | }, true); |
129 | 128 | |
130 | 129 | $scope.crearNotaPedido = function() { |
131 | - if (!$scope.notaPedido.cliente.COD && validarNotaRemitada()) { | |
130 | + if (validarNotaRemitada()) { | |
131 | + if (!$scope.notaPedido.cliente.COD ) { | |
132 | 132 | focaModalService.alert('Ingrese Cliente'); |
133 | 133 | return; |
134 | 134 | } else if (!$scope.notaPedido.proveedor.COD) { |
... | ... | @@ -225,6 +225,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
225 | 225 | console.info(error); |
226 | 226 | } |
227 | 227 | ); |
228 | + } | |
228 | 229 | }; |
229 | 230 | |
230 | 231 | $scope.seleccionarNotaPedido = function() { |
src/views/nota-pedido.html
... | ... | @@ -68,7 +68,7 @@ |
68 | 68 | ></td> |
69 | 69 | <td class="col text-right"> |
70 | 70 | <input |
71 | - ng-show="articulo.editCantidad && validar" | |
71 | + ng-show="articulo.editCantidad && notaPedido.idRemito !== -1" | |
72 | 72 | ng-model="tmpCantidad" |
73 | 73 | class="form-control" |
74 | 74 | foca-tipo-input |
... | ... | @@ -84,13 +84,13 @@ |
84 | 84 | <i |
85 | 85 | class="selectable" |
86 | 86 | ng-click="cambioEdit(articulo, 'cantidad')" |
87 | - ng-hide="articulo.editCantidad && validar" | |
87 | + ng-hide="articulo.editCantidad && notaPedido.idRemito !== -1" | |
88 | 88 | ng-bind="articulo.cantidad"> |
89 | 89 | </i> |
90 | 90 | </td> |
91 | 91 | <td class="col text-right"> |
92 | 92 | <input |
93 | - ng-show="articulo.editPrecio && validar" | |
93 | + ng-show="articulo.editPrecio && notaPedido.idRemito !== -1" | |
94 | 94 | ng-model="tmpPrecio" |
95 | 95 | class="form-control" |
96 | 96 | foca-tipo-input |
... | ... | @@ -107,7 +107,7 @@ |
107 | 107 | <i |
108 | 108 | class="selectable" |
109 | 109 | ng-click="cambioEdit(articulo, 'precio')" |
110 | - ng-hide="articulo.editPrecio && validar" | |
110 | + ng-hide="articulo.editPrecio && notaPedido.idRemito !== -1" | |
111 | 111 | ng-bind="articulo.precio | number: 4" |
112 | 112 | > |
113 | 113 | </i> |