From ff0f49c466feecaa5d25c0582c39896fc9eabe60 Mon Sep 17 00:00:00 2001 From: ATM-Sami Date: Tue, 7 Nov 2023 08:37:28 +0100 Subject: [PATCH 1/3] add product price list by customer for csv export --- class/actions_listincsv.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class/actions_listincsv.class.php b/class/actions_listincsv.class.php index 6377057..e595bf8 100644 --- a/class/actions_listincsv.class.php +++ b/class/actions_listincsv.class.php @@ -93,7 +93,7 @@ function printCommonFooter($parameters, &$object, &$action, $hookmanager) $context_list = preg_grep('/(consumptionthirdparty)/i', $TContext); } - if (!empty($context_list) || in_array('stockatdate', $TContext)) + if (!empty($context_list) || in_array('stockatdate', $TContext) || in_array('thirdpartycustomerprice', $TContext)) { global $langs, $user, $conf; $langs->load('listincsv@listincsv'); From ee34b30f47c1889eaa7661122061dbbe3a8392b9 Mon Sep 17 00:00:00 2001 From: ATM-Sami Date: Tue, 7 Nov 2023 08:39:40 +0100 Subject: [PATCH 2/3] update changelog and mod --- ChangeLog.md | 2 +- core/modules/modListInCSV.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 242a7cf..f511190 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,10 +1,10 @@ #Change Log ## Unreleased +- NEW : Ajout de la possibilité d'exporter la liste des prix clients *07/10/2023* - 1.7.0 ## 1.6 - - NEW : Ajout icône listincsv sur objets référents produit et tiers *07/02/2023* - 1.6.0 ## 1.5 diff --git a/core/modules/modListInCSV.class.php b/core/modules/modListInCSV.class.php index f204fe0..cb20d54 100644 --- a/core/modules/modListInCSV.class.php +++ b/core/modules/modListInCSV.class.php @@ -60,7 +60,7 @@ function __construct($db) // Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module) $this->description = "ListInCSV permet d'exporter en CSV une liste Dolibarr telle qu'elle apparaît à l'écran."; // Possible values for version are: 'development', 'experimental', 'dolibarr' or version - $this->version = '1.6.0'; + $this->version = '1.7.0'; // Url to the file with your last numberversion of this module require_once __DIR__ . '/../../class/techatm.class.php'; From bde8332f94c6ed2cf6037c4de1f85a9038a71455 Mon Sep 17 00:00:00 2001 From: ATM-Sami Date: Tue, 7 Nov 2023 08:46:15 +0100 Subject: [PATCH 3/3] good practices --- class/actions_listincsv.class.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/class/actions_listincsv.class.php b/class/actions_listincsv.class.php index e595bf8..f9beedf 100644 --- a/class/actions_listincsv.class.php +++ b/class/actions_listincsv.class.php @@ -93,7 +93,17 @@ function printCommonFooter($parameters, &$object, &$action, $hookmanager) $context_list = preg_grep('/(consumptionthirdparty)/i', $TContext); } - if (!empty($context_list) || in_array('stockatdate', $TContext) || in_array('thirdpartycustomerprice', $TContext)) + // Gestion des écrans objets référents tiers + if(empty($context_list)) { + $context_list = preg_grep('/(stockatdate)/i', $TContext); + } + + // Gestion des écrans objets référents tiers + if(empty($context_list)) { + $context_list = preg_grep('/(thirdpartycustomerprice)/i', $TContext); + } + + if (!empty($context_list)) { global $langs, $user, $conf; $langs->load('listincsv@listincsv');