Commit 4efe4b16bf623d19f58c3d8b81c36e563be60acc

Authored by Luis Suarez
1 parent b602102ac5
Exists in develop

parseInt

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
src/js/controller.js
... ... @@ -965,7 +965,7 @@ angular.module('focaCrearRemito').controller('remitoController',
965 965 } else if ($scope.articuloACargar.cantidad < 0 || $scope.articuloACargar.precio < 0) {
966 966 focaModalService.alert('Los valores no pueden ser negativos');
967 967 return;
968   - } else if (!Number.isInteger($scope.articuloACargar.cantidad)) {
  968 + } else if ($scope.articuloACargar.cantidad != parseInt($scope.articuloACargar.cantidad, 10)) {
969 969 focaModalService.alert('Debes introducir un número entero');
970 970 return;
971 971 }
... ... @@ -1005,7 +1005,7 @@ angular.module(&#39;focaCrearRemito&#39;).controller(&#39;remitoController&#39;,
1005 1005 } else if (tmpCantidad < 0 || tmpPrecio < 0) {
1006 1006 focaModalService.alert('Los valores no pueden ser negativos');
1007 1007 return;
1008   - } else if (!Number.isInteger(tmpCantidad)) {
  1008 + } else if (tmpCantidad != parseInt(tmpCantidad, 10)) {
1009 1009 focaModalService.alert('Debes introducir un número entero');
1010 1010 return;
1011 1011 } else {