From e394e5ba43a4f881b5c0fc791302adc73a2b1dcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Courtier?= Date: Tue, 18 Apr 2023 11:24:40 +0200 Subject: [PATCH 1/6] FIX: Fiscal year list ref display --- htdocs/accountancy/admin/fiscalyear.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index 2eb77815b60..d20ba244375 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -143,6 +143,7 @@ if ($result) { while ($i < $num && $i < $max) { $obj = $db->fetch_object($result); + $fiscalyearstatic->ref = $obj->rowid; $fiscalyearstatic->id = $obj->rowid; print ''; From 3de0a682c1386e9e20cc317222c3fd67710d645f Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Tue, 18 Apr 2023 16:31:58 +0200 Subject: [PATCH 2/6] FIX for empty shipping --- htdocs/expedition/card.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index e2220ec6367..3286f97002e 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -317,7 +317,7 @@ if (empty($reshook)) { //var_dump($batch_line[2]); - if ($totalqty > 0) { // There is at least one thing to ship + if ($totalqty > 0 && !empty($conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS)) { // There is at least one thing to ship //var_dump($_POST);exit; for ($i = 0; $i < $num; $i++) { $qty = "qtyl".$i; @@ -327,7 +327,7 @@ if (empty($reshook)) { //shipment from multiple stock locations $nbstockline = count($stockLine[$i]); for ($j = 0; $j < $nbstockline; $j++) { - if ($stockLine[$i][$j]['qty'] > 0) { + if ($stockLine[$i][$j]['qty'] > 0 || ($stockLine[$i][$j]['qty'] == 0 && !empty($conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS))) { $ret = $object->addline($stockLine[$i][$j]['warehouse_id'], $stockLine[$i][$j]['ix_l'], $stockLine[$i][$j]['qty'], $array_options[$i]); if ($ret < 0) { setEventMessages($object->error, $object->errors, 'errors'); @@ -336,7 +336,7 @@ if (empty($reshook)) { } } } else { - if (GETPOST($qty, 'int') > 0 || (GETPOST($qty, 'int') == 0 && $conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS)) { + if (GETPOST($qty, 'int') > 0 || (GETPOST($qty, 'int') == 0 && !empty($conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS))) { $ent = "entl".$i; $idl = "idl".$i; $entrepot_id = is_numeric(GETPOST($ent, 'int')) ?GETPOST($ent, 'int') : GETPOST('entrepot_id', 'int'); From d7436d5d8c0d4629393746b7f906e91e3b2fd537 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Tue, 18 Apr 2023 16:38:13 +0200 Subject: [PATCH 3/6] fix test --- htdocs/expedition/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 3286f97002e..6dbcc538397 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -317,7 +317,7 @@ if (empty($reshook)) { //var_dump($batch_line[2]); - if ($totalqty > 0 && !empty($conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS)) { // There is at least one thing to ship + if ($totalqty > 0 || !empty($conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS)) { // There is at least one thing to ship //var_dump($_POST);exit; for ($i = 0; $i < $num; $i++) { $qty = "qtyl".$i; From b4c196b2fbd636e4645f041b27c811dae5011bef Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio <68746600+marc-dll@users.noreply.github.com> Date: Thu, 20 Apr 2023 15:50:24 +0200 Subject: [PATCH 4/6] FIX: product notes rights --- htdocs/core/tpl/notes.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/tpl/notes.tpl.php b/htdocs/core/tpl/notes.tpl.php index 0430ec16e0e..aa7e752fbc0 100644 --- a/htdocs/core/tpl/notes.tpl.php +++ b/htdocs/core/tpl/notes.tpl.php @@ -91,7 +91,7 @@ if ($module == 'propal') { } elseif ($module == 'shipping') { $permission = $user->hasRight("expedition", "creer"); } elseif ($module == 'product') { - $permission = $user->hasRight("produit", "creer"); + $permission = $user->hasRight("product", "creer"); } elseif ($module == 'service') { $permission = $user->hasRight("service", "creer"); } elseif ($module == 'ecmfiles') { From 5ec6b2934511ff3fffba9efdcf3ea3af23a58edb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alo=C3=AFs=20Micard?= Date: Sun, 23 Apr 2023 14:01:52 +0200 Subject: [PATCH 5/6] Fix order line origin/origin_id when creating from proposal --- htdocs/commande/class/commande.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index c636b4e905d..5c38cbdf51d 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1325,6 +1325,9 @@ class Commande extends CommonOrder $line->marge_tx = $marginInfos[1]; $line->marque_tx = $marginInfos[2]; + $line->origin = $object->element; + $line->origin_id = $object->lines[$i]->id; + // get extrafields from original line $object->lines[$i]->fetch_optionals(); foreach ($object->lines[$i]->array_options as $options_key => $value) { From 08b81e90912b016b1925eed05470993aa51b4780 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 25 Apr 2023 11:17:27 +0200 Subject: [PATCH 6/6] fix: with auguria when user have only supplier invoie right the Financial top menu is not displayed --- htdocs/core/menus/init_menu_auguria.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index 3b173cecb26..f488fc80a8e 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -14,7 +14,7 @@ insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, left insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('bom|mrp', '$conf->bom->enabled || $conf->mrp->enabled', 16__+MAX_llx_menu__, __HANDLER__, 'top', 'mrp', '', 0, '/mrp/index.php?mainmenu=mrp&leftmenu=', 'MRP', -1, 'mrp', '$user->rights->bom->read||$user->rights->mrp->read', '', 0, 31, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('projet', '$conf->projet->enabled', 7__+MAX_llx_menu__, __HANDLER__, 'top', 'project', '', 0, '/projet/index.php?mainmenu=project&leftmenu=', 'Projects', -1, 'projects', '$user->rights->projet->lire', '', 2, 32, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('propal|commande|fournisseur|supplier_order|supplier_invoice|contrat|ficheinter', '$conf->propal->enabled || $conf->commande->enabled || $conf->supplier_order->enabled || $conf->contrat->enabled || $conf->ficheinter->enabled', 5__+MAX_llx_menu__, __HANDLER__, 'top', 'commercial', '', 0, '/comm/index.php?mainmenu=commercial&leftmenu=', 'Commercial', -1, 'commercial', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 40, __ENTITY__); -insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('facture|don|tax|salaries|loan|banque', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled || $conf->supplier_invoice->enabled || $conf->loan->enabled || $conf->banque->enabled', 6__+MAX_llx_menu__, __HANDLER__, 'top', 'billing', '', 0, '/compta/index.php?mainmenu=billing&leftmenu=', 'MenuFinancial', -1, 'compta', '$user->rights->facture->lire|| $user->rights->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read || $user->rights->loan->read || $user->rights->banque->lire', '', 2, 50, __ENTITY__); +insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('facture|don|tax|salaries|loan|banque', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled || $conf->supplier_invoice->enabled || $conf->loan->enabled || $conf->banque->enabled', 6__+MAX_llx_menu__, __HANDLER__, 'top', 'billing', '', 0, '/compta/index.php?mainmenu=billing&leftmenu=', 'MenuFinancial', -1, 'compta', '$user->rights->facture->lire|| $user->rights->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read || $user->rights->loan->read || $user->rights->banque->lire || ($user->rights->fournisseur->facture->lire || $user->rights->supplier_invoice->lire)', '', 2, 50, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('banque|prelevement', '$conf->banque->enabled || $conf->prelevement->enabled', 14__+MAX_llx_menu__, __HANDLER__, 'top', 'bank', '', 0, '/compta/bank/list.php?mainmenu=bank&leftmenu=bank', 'MenuBankCash', -1, 'banks', '$user->rights->banque->lire || $user->rights->prelevement->bons->lire', '', 0, 52, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('comptabilite|accounting|asset', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->asset->enabled', 9__+MAX_llx_menu__, __HANDLER__, 'top', 'accountancy', '', 0, '/compta/index.php?mainmenu=accountancy&leftmenu=accountancy', 'MenuAccountancy', -1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->mouvements->lire || $user->rights->asset->read', '', 2, 54, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '', 8__+MAX_llx_menu__, __HANDLER__, 'top', 'tools', '', 0, '/core/tools.php?mainmenu=tools&leftmenu=', 'Tools', -1, 'other', '', '', 2, 90, __ENTITY__);