From 7124b5bf755199b00173d7308a6799fa826942f8 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Wed, 14 Sep 2022 05:16:50 +0200 Subject: [PATCH 01/15] FIX #22264 Accountancy - Translation on chart of accounts export --- htdocs/core/modules/modAccounting.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index e0bf3a9bbc5..83c1e99183f 100644 --- a/htdocs/core/modules/modAccounting.class.php +++ b/htdocs/core/modules/modAccounting.class.php @@ -256,11 +256,11 @@ class modAccounting extends DolibarrModules $r++; $this->export_code[$r] = $this->rights_class.'_'.$r; $this->export_label[$r] = 'Chartofaccounts'; - $this->export_icon[$r] = 'accounting'; + $this->export_icon[$r] = 'Accounting'; $this->export_permission[$r] = array(array("accounting", "chartofaccount")); $this->export_fields_array[$r] = array('ac.rowid'=>'ChartofaccountsId', 'ac.pcg_version'=>'Chartofaccounts', 'aa.rowid'=>'ID', 'aa.account_number'=>"AccountAccounting", 'aa.label'=>"Label", 'aa.account_parent'=>"Accountparent", 'aa.pcg_type'=>"Pcgtype", 'aa.active'=>'Status'); $this->export_TypeFields_array[$r] = array('ac.rowid'=>'List:accounting_system:pcg_version', 'ac.pcg_version'=>'Text', 'aa.rowid'=>'Numeric', 'aa.account_number'=>"Text", 'aa.label'=>"Text", 'aa.account_parent'=>"Text", 'aa.pcg_type'=>'Text', 'aa.active'=>'Status'); - $this->export_entities_array[$r] = array('ac.rowid'=>"Accounting", 'ac.pcg_version'=>"Accounting", 'aa.rowid'=>'Accounting', 'aa.account_number'=>"Accounting", 'aa.label'=>"Accounting", 'aa.accountparent'=>"Accounting", 'aa.pcg_type'=>"Accounting", 'aa_active'=>"Accounting"); + $this->export_entities_array[$r] = array(); // We define here only fields that use another picto $this->export_sql_start[$r] = 'SELECT DISTINCT '; $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'accounting_account as aa'; From 7d4b2a664e80b233e172625d3e137681763972fd Mon Sep 17 00:00:00 2001 From: Jean Date: Fri, 23 Sep 2022 16:47:54 +0200 Subject: [PATCH 02/15] FIX #22379 creating events on supplier order --- htdocs/user/class/user.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 4b6ee860c74..dd02873489d 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -689,6 +689,7 @@ class User extends CommonObject 'inventory' => 'stock', 'invoice' => 'facture', 'invoice_supplier' => 'fournisseur', + 'order_supplier' => 'fournisseur', 'knowledgerecord' => 'knowledgerecord@knowledgemanagement', 'skill@hrm' => 'all@hrm', // skill / job / position objects rights are for the moment grouped into right level "all" 'job@hrm' => 'all@hrm', // skill / job / position objects rights are for the moment grouped into right level "all" From 88ff4ad4bc4bf81c3fa7a8f95346423a71e807ed Mon Sep 17 00:00:00 2001 From: Jean Date: Sat, 24 Sep 2022 09:13:19 +0200 Subject: [PATCH 03/15] FIX #22379 creating events on supplier order --- htdocs/user/class/user.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index dd02873489d..e57fc387bc7 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -689,7 +689,7 @@ class User extends CommonObject 'inventory' => 'stock', 'invoice' => 'facture', 'invoice_supplier' => 'fournisseur', - 'order_supplier' => 'fournisseur', + 'order_supplier' => 'fournisseur', 'knowledgerecord' => 'knowledgerecord@knowledgemanagement', 'skill@hrm' => 'all@hrm', // skill / job / position objects rights are for the moment grouped into right level "all" 'job@hrm' => 'all@hrm', // skill / job / position objects rights are for the moment grouped into right level "all" From a919618bf4b324355c15d6c1026c8d8c5d059793 Mon Sep 17 00:00:00 2001 From: Jean Date: Sat, 24 Sep 2022 09:47:56 +0200 Subject: [PATCH 04/15] FIX #22382 Error on length of supplier reference --- htdocs/product/fournisseurs.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 2fe78f11e99..f18cbc241e7 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -508,9 +508,9 @@ if ($id > 0 || $ref) { print ''.$langs->trans("SupplierRef").''; if ($rowid) { print ''; - print ''; + print ''; } else { - print ''; + print ''; } print ''; print ''; From fe501f7214935f16a1a6358b6febfd9cd29e583b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 24 Sep 2022 11:42:05 +0200 Subject: [PATCH 05/15] Fix inventorycode --- htdocs/fourn/class/fournisseur.commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index ad666573b18..c77b8284698 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -2041,7 +2041,7 @@ class CommandeFournisseur extends CommonOrder // $price should take into account discount (except if option STOCK_EXCLUDE_DISCOUNT_FOR_PMP is on) $mouv->origin = &$this; $mouv->setOrigin($this->element, $this->id); - $result = $mouv->reception($user, $product, $entrepot, $qty, $price, $comment, $eatby, $sellby, $batch, $inventorycode); + $result = $mouv->reception($user, $product, $entrepot, $qty, $price, $comment, $eatby, $sellby, $batch, '', 0, $inventorycode); if ($result < 0) { $this->error = $mouv->error; $this->errors = $mouv->errors; From 322d0955f20e6cbf7ed93e40649458ae8e197c2a Mon Sep 17 00:00:00 2001 From: Guido Schratzer Date: Sat, 24 Sep 2022 17:58:58 +0300 Subject: [PATCH 06/15] FIX: Issue #16476 on massaction the pdf generation is not using the thirdparty language settings --- htdocs/core/actions_massactions.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index ddee2ad5fb4..c673111d0d7 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -1388,6 +1388,7 @@ if (!$error && $massaction == 'generate_doc' && $permissiontoread) { foreach ($toselect as $toselectid) { $result = $objecttmp->fetch($toselectid); if ($result > 0) { + $objecttmp->fetch_thirdparty(); //load lang from thirdparty $outputlangs = $langs; $newlang = ''; From 33291b7cc791ed95ace0c565041607b43eae6303 Mon Sep 17 00:00:00 2001 From: priojk Date: Sat, 24 Sep 2022 17:19:52 +0200 Subject: [PATCH 07/15] FIX #21799 inactive companies cannot be selected --- htdocs/comm/propal/card.php | 2 +- htdocs/commande/card.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index cb7e512bc36..c737ea63ebe 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1585,7 +1585,7 @@ if ($action == 'create') { //$warehouse_id = $soc->warehouse_id; } else { print ''; - print img_picto('', 'company').$form->select_company('', 'socid', '(s.client = 1 OR s.client = 2 OR s.client = 3) AND status=1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300 maxwidth500 widthcentpercentminusxx'); + print img_picto('', 'company').$form->select_company('', 'socid', '((s.client = 1 OR s.client = 2 OR s.client = 3) AND status=1)', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300 maxwidth500 widthcentpercentminusxx'); // reload page to retrieve customer informations if (empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED)) { print '