From 96f08082a2ca3c372d84d196524fdb866587748a Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 26 Oct 2021 18:25:49 +0200 Subject: [PATCH 1/2] fix: getFilterSelectQuery get correct table --- htdocs/categories/class/categorie.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 3ddfaa4d92b..8d401ff5794 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1963,6 +1963,12 @@ class Categorie extends CommonObject if ($type == 'bank_account') { $type = 'account'; } + if ($type == 'customer') { + $type = 'societe'; + } + if ($type == 'supplier') { + $type = 'fournisseur'; + } if (empty($searchList) && !is_array($searchList)) { return ""; From da5274242133f495b378f7ff5ce0638ea216ac5d Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Fri, 29 Oct 2021 05:47:29 +0200 Subject: [PATCH 2/2] FIX Accountancy - Product admin - SQL error when we affect accounting account with product_perentity activated --- htdocs/accountancy/admin/productaccount.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index 58ffa9bd150..6056a310be7 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -198,7 +198,7 @@ if ($action == 'update') { $nb_exists = $db->num_rows($resql_exists); if ($nb_exists <= 0) { // insert - $sql = "INSERT INTO " . MAIN_DB_PREFIX . "product_perentity (fk_product, entity, '" . $db->escape($accountancy_field_name) . "')"; + $sql = "INSERT INTO " . MAIN_DB_PREFIX . "product_perentity (fk_product, entity, " . $db->escape($accountancy_field_name) . ")"; $sql .= " VALUES (" . ((int) $productid) . ", " . ((int) $conf->entity) . ", '" . $db->escape($accounting->account_number) . "')"; } else { $obj_exists = $db->fetch_object($resql_exists);