Commit ad95f17ebaea1a2c7b2802ecf245bc9e5b3cedb5
1 parent
4c52cedd85
Exists in
master
and in
1 other branch
Validacion en precio
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
src/js/controller.js
... | ... | @@ -966,10 +966,10 @@ angular.module('focaCrearRemito').controller('remitoController', |
966 | 966 | $scope.editarArticulo = function (key, articulo, tmpCantidad, tmpPrecio) { |
967 | 967 | if (key === 13) { |
968 | 968 | if (!articulo.cantidad || !articulo.precio || !tmpCantidad || !tmpPrecio) { |
969 | - focaModalService.alert('Ingrese cantidad'); | |
969 | + focaModalService.alert('Los valores deben ser al menos 1'); | |
970 | 970 | return; |
971 | - } else if (tmpCantidad === "0") { | |
972 | - focaModalService.alert('Esta ingresando un producto con cantidad 0'); | |
971 | + } else if (tmpCantidad === "0" || tmpPrecio === "0") { | |
972 | + focaModalService.alert('Esta ingresando un producto con valor 0'); | |
973 | 973 | } else if (articulo.cantidad < 0 || articulo.precio < 0) { |
974 | 974 | focaModalService.alert('Los valores no pueden ser negativos'); |
975 | 975 | return; |