diff --git a/src/js/controller.js b/src/js/controller.js index e0b351e..a6fc4d1 100644 --- a/src/js/controller.js +++ b/src/js/controller.js @@ -966,7 +966,7 @@ angular.module('focaCrearRemito').controller('remitoController', focaModalService.alert('Los valores no pueden ser negativos'); return; } else if (!Number.isInteger(+$scope.articuloACargar.cantidad)) { - focaModalService.alert('Debes introducir un número entero'); + focaModalService.alert('La cantidad debe ser un número entero'); return; } else if ($scope.articuloACargar.cantidad > 100000) { focaModalService.alert('La cantidad máxima permitida es 100.000'); @@ -1023,6 +1023,17 @@ angular.module('focaCrearRemito').controller('remitoController', } } }; + //Si el monto Total es superior a $10.000.000.000,00 desactivo el botón Guardar + $scope.comprobarTotal = function() { + if ($scope.getTotal() >= 10000000000) { + focaModalService.alert('El monto total debe ser menor a $10.000.000.000,00, elimina un artículo o reduce las cantidades'); + $( "#guardar" ).prop( "disabled", true ); + return true; + } else { + $( "#guardar" ).prop( "disabled", false ); + return false; + } + }; $scope.cancelarEditar = function (articulo) { $scope.tmpCantidad = articulo.cantidad; diff --git a/src/views/remito.html b/src/views/remito.html index dd2fa22..933874c 100644 --- a/src/views/remito.html +++ b/src/views/remito.html @@ -228,6 +228,7 @@ Salir