Commit e941f54e469cde4940f796b0c2b25d7c4dd54081
1 parent
9ba87dc9a4
Exists in
develop
sin parseFloat
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(parseFloat($scope.articuloACargar.cantidad))) { | |
968 | + } else if (!Number.isInteger(+$scope.articuloACargar.cantidad)) { | |
969 | 969 | focaModalService.alert('Debes introducir un número entero'); |
970 | 970 | return; |
971 | 971 | } else if ($scope.articuloACargar.cantidad > 100000) { |
... | ... | @@ -1009,7 +1009,7 @@ angular.module('focaCrearRemito').controller('remitoController', |
1009 | 1009 | } else if (tmpCantidad < 0 || tmpPrecio < 0) { |
1010 | 1010 | focaModalService.alert('Los valores no pueden ser negativos'); |
1011 | 1011 | return; |
1012 | - } else if (!Number.isInteger(parseFloat(tmpCantidad))) { | |
1012 | + } else if (!Number.isInteger(+tmpCantidad)) { | |
1013 | 1013 | focaModalService.alert('Debes introducir un número entero'); |
1014 | 1014 | return; |
1015 | 1015 | } else if (tmpCantidad > 100000) { |