This commit is contained in:
Laurent Destailleur 2021-02-14 22:44:04 +01:00
parent f2f9085fb5
commit f4c23654f8
2 changed files with 10 additions and 2 deletions

View File

@ -56,7 +56,8 @@ Paymentnumpad=Type of Pad to enter payment
Numberspad=Numbers Pad Numberspad=Numbers Pad
BillsCoinsPad=Coins and banknotes Pad BillsCoinsPad=Coins and banknotes Pad
DolistorePosCategory=TakePOS modules and other POS solutions for Dolibarr DolistorePosCategory=TakePOS modules and other POS solutions for Dolibarr
TakeposNeedsCategories=TakePOS needs product categories to work TakeposNeedsCategories=TakePOS needs at least one product categorie to work
TakeposNeedsAtLeastOnSubCategoryIntoParentCategory=TakePOS needs at least 1 product category under the category <b>%s</b> to work
OrderNotes=Order Notes OrderNotes=Order Notes
CashDeskBankAccountFor=Default account to use for payments in CashDeskBankAccountFor=Default account to use for payments in
NoPaimementModesDefined=No paiment mode defined in TakePOS configuration NoPaimementModesDefined=No paiment mode defined in TakePOS configuration

View File

@ -140,6 +140,7 @@ if ($conf->global->TAKEPOS_ROOT_CATEGORY_ID > 0)
} }
} }
} }
$levelofmaincategories = $levelofrootcategory + 1; $levelofmaincategories = $levelofrootcategory + 1;
$maincategories = array(); $maincategories = array();
@ -961,7 +962,13 @@ if (empty($paiementsModes)) {
setEventMessages($langs->trans("ProblemIsInSetupOfTerminal", $_SESSION["takeposterminal"]), null, 'errors'); setEventMessages($langs->trans("ProblemIsInSetupOfTerminal", $_SESSION["takeposterminal"]), null, 'errors');
} }
if (count($maincategories) == 0) { if (count($maincategories) == 0) {
setEventMessages($langs->trans("TakeposNeedsCategories"), null, 'errors'); if ($conf->global->TAKEPOS_ROOT_CATEGORY_ID > 0) {
$tmpcategory = new Categorie($db);
$tmpcategory->fetch($conf->global->TAKEPOS_ROOT_CATEGORY_ID);
setEventMessages($langs->trans("TakeposNeedsAtLeastOnSubCategoryIntoParentCategory", $tmpcategory->label), null, 'errors');
} else {
setEventMessages($langs->trans("TakeposNeedsCategories"), null, 'errors');
}
} }
// User menu and external TakePOS modules // User menu and external TakePOS modules
$menus = array(); $menus = array();