Commit 13b8ea7401e22fe7f4d9f226e317ac4a203a05e4
Exists in
master
and in
1 other branch
Merge branch 'master' into 'develop'
Master See merge request !74
Showing
2 changed files
Show diff stats
src/js/controller.js
... | ... | @@ -130,6 +130,9 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
130 | 130 | if (!$scope.notaPedido.cliente.COD) { |
131 | 131 | focaModalService.alert('Ingrese Cliente'); |
132 | 132 | return; |
133 | + } else if ($scope.notaPedido.idRemito === -1) { | |
134 | + focaBotoneraLateralService.alert('No se puede modificar esta nota de pedido'); | |
135 | + return; | |
133 | 136 | } else if (!$scope.notaPedido.proveedor.COD) { |
134 | 137 | focaModalService.alert('Ingrese Proveedor'); |
135 | 138 | return; |
... | ... | @@ -154,6 +157,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
154 | 157 | focaModalService.alert('Debe cargar al menos un articulo'); |
155 | 158 | return; |
156 | 159 | } |
160 | + | |
157 | 161 | focaBotoneraLateralService.startGuardar(); |
158 | 162 | $scope.saveLoading = true; |
159 | 163 | var notaPedido = { |
... | ... | @@ -222,8 +226,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
222 | 226 | focaBotoneraLateralService.endGuardar(); |
223 | 227 | $scope.saveLoading = false; |
224 | 228 | console.info(error); |
225 | - } | |
226 | - ); | |
229 | + }); | |
227 | 230 | }; |
228 | 231 | |
229 | 232 | $scope.seleccionarNotaPedido = function() { |
... | ... | @@ -769,12 +772,12 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
769 | 772 | articulo.editCantidad = articulo.editPrecio = false; |
770 | 773 | } |
771 | 774 | }; |
772 | - | |
775 | + | |
773 | 776 | $scope.cancelarEditar = function(articulo) { |
774 | 777 | $scope.tmpCantidad = articulo.cantidad; |
775 | 778 | $scope.tmpPrecio = articulo.precio; |
776 | 779 | articulo.editCantidad = articulo.editPrecio = false; |
777 | - }; | |
780 | + }; | |
778 | 781 | |
779 | 782 | $scope.cambioEdit = function(articulo, propiedad) { |
780 | 783 | if (propiedad === 'cantidad') { |
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" | |
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" | |
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" | |
93 | + ng-show="articulo.editPrecio && notaPedido.idRemito !== -1" | |
94 | 94 | ng-model="tmpPrecio" |
95 | 95 | class="form-control" |
96 | 96 | foca-tipo-input |
... | ... | @@ -107,8 +107,9 @@ |
107 | 107 | <i |
108 | 108 | class="selectable" |
109 | 109 | ng-click="cambioEdit(articulo, 'precio')" |
110 | - ng-hide="articulo.editPrecio" | |
111 | - ng-bind="articulo.precio | number: 4"> | |
110 | + ng-hide="articulo.editPrecio && notaPedido.idRemito !== -1" | |
111 | + ng-bind="articulo.precio | number: 4" | |
112 | + > | |
112 | 113 | </i> |
113 | 114 | </td> |
114 | 115 | <td |