X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/1b46f3217d53fcd31eb37f7b3a3dd793666a06e6..6c20bff1fde66612b803b2716589f97b1441612a:/js/kivi.Inventory.js diff --git a/js/kivi.Inventory.js b/js/kivi.Inventory.js index 64e877fb0..cf5bdbe07 100644 --- a/js/kivi.Inventory.js +++ b/js/kivi.Inventory.js @@ -52,6 +52,28 @@ namespace('kivi.Inventory', function(ns) { $('#already_counted_dialog').dialog("close"); }; + ns.check_stocktaking_qty_threshold = function() { + var data = $('#stocktaking_form').serializeArray(); + data.push({ name: 'action', value: 'Inventory/stocktaking_get_warn_qty_threshold' }); + + var warn = false; + $.ajax({ + url: 'controller.pl', + data: data, + method: "GET", + async: false, + dataType: 'text', + success: function(val) { + warn = val; + } + }); + + if (warn) { + return confirm(warn); + } else { + return true; + } + }; }); $(function(){