diff --git a/htdocs/takepos/ajax/ajax.php b/htdocs/takepos/ajax/ajax.php index 063b2b06448..af38a5b7ba5 100644 --- a/htdocs/takepos/ajax/ajax.php +++ b/htdocs/takepos/ajax/ajax.php @@ -71,7 +71,12 @@ if ($action == 'getProducts') { $object = new Categorie($db); if ($category == "supplements") { $category = getDolGlobalInt('TAKEPOS_SUPPLEMENTS_CATEGORY'); + if (empty($category)) { + echo 'Error, the category to use for supplements is not defined. Go into setup of module TakePOS.'; + exit; + } } + $result = $object->fetch($category); if ($result > 0) { $filter = array();