Properly show and handle that the new amount during inventory cannot equal the current stock amount (this now closes #224)

This commit is contained in:
Bernd Bestel
2019-05-03 19:08:54 +02:00
parent 7fc4992b3a
commit 595171afa5
4 changed files with 20 additions and 5 deletions

View File

@@ -13,3 +13,15 @@ $(".numberpicker-up-button").unbind('click').on("click", function()
$(inputElement).trigger('keyup');
$(inputElement).trigger('change');
});
$(".numberpicker").on("keyup", function()
{
if ($(this).data("not-equal") && !$(this).data("not-equal").toString().isEmpty() && $(this).data("not-equal") == $(this).val())
{
$(this)[0].setCustomValidity("error");
}
else
{
$(this)[0].setCustomValidity("");
}
});