From f5ef2eee4908bf65ca5990a1465a772aa25ee815 Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Sun, 1 Dec 2024 15:47:01 +0100 Subject: [PATCH] Debug v21 --- htdocs/core/modules/modTakePos.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/modTakePos.class.php b/htdocs/core/modules/modTakePos.class.php index 208439f0cfa..b9d43c6099d 100644 --- a/htdocs/core/modules/modTakePos.class.php +++ b/htdocs/core/modules/modTakePos.class.php @@ -269,6 +269,7 @@ class modTakePos extends DolibarrModules public function init($options = '') { global $conf, $langs, $user, $mysoc; + $langs->load("cashdesk"); dolibarr_set_const($this->db, "TAKEPOS_PRINT_METHOD", "browser", 'chaine', 0, '', $conf->entity); @@ -301,7 +302,7 @@ class modTakePos extends DolibarrModules $categories = new Categorie($this->db); $cate_arbo = $categories->get_full_arbo('product', 0, 1); if (is_array($cate_arbo)) { - if (!count($cate_arbo) || !getDolGlobalString('TAKEPOS_ROOT_CATEGORY_ID')) { + if (!count($cate_arbo) || (!getDolGlobalString('TAKEPOS_ROOT_CATEGORY_ID') || getDolGlobalString('TAKEPOS_ROOT_CATEGORY_ID') == '-1')) { $category = new Categorie($this->db); $category->label = $langs->trans("DefaultPOSCatLabel");