@@ -, +, @@ planning value to statistics --- .../prog/en/modules/acqui/neworderempty.tmpl | 35 ++++++++++++++++--- 1 files changed, 29 insertions(+), 6 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl @@ -63,8 +63,29 @@ if (ok) { ff.submit(); } - - +$(document).ready(function() + { + //We apply the fonction only for modify option + + $('#quantity').blur(function() + { + // if user decreases the quantity + if($(this).val() < ) + { + alert("You have deleted item(s) in the order, don't forget to delete it(them) in the catalog"); + return true; + } + else + { + // if user increases the quantity + alert("You can't add a new item, please create a new order line"); + // and we replace the original value + $(this).val() + return false; + } + }); + + }); //]]> @@ -83,7 +104,7 @@ ff.submit();