From a5a2d6075552e6244a2ca13ab4ee3870f7778faa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 5 Mar 2020 00:20:39 +0100 Subject: [PATCH 1/3] Fix phpcs --- htdocs/core/lib/functions.lib.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 25a5ab85973..d9b22d096e5 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1788,7 +1788,7 @@ function dol_print_date($time, $format = '', $tzoutput = 'tzserver', $outputlang $format=str_replace('%A', '__A__', $format); } - + // Analyze date $reg=array(); if (preg_match('/^([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])$/i', $time, $reg)) // Deprecated. Ex: 1970-01-01, 1970-01-01 01:00:00, 19700101010000 @@ -1822,8 +1822,6 @@ function dol_print_date($time, $format = '', $tzoutput = 'tzserver', $outputlang $ret=adodb_strftime($format, $timetouse, $to_gmt); } else $ret='Bad value '.$time.' for date'; - - } if (preg_match('/__b__/i', $format)) From 0123fa769675a8720d567e475b2bf6c33299e6f9 Mon Sep 17 00:00:00 2001 From: kamel Date: Thu, 5 Mar 2020 15:37:01 +0100 Subject: [PATCH 2/3] FIX subsitute lines dates values on doc generator (ODT, ...) --- htdocs/core/class/commondocgenerator.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 5eb833dc262..087d21f1b5e 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -562,12 +562,12 @@ abstract class CommonDocGenerator 'line_price_ttc_locale'=>price($line->total_ttc, 0, $outputlangs), 'line_price_vat_locale'=>price($line->total_tva, 0, $outputlangs), // Dates - 'line_date_start'=>dol_print_date($line->date_start, 'day', 'tzuser'), - 'line_date_start_locale'=>dol_print_date($line->date_start, 'day', 'tzuser', $outputlangs), - 'line_date_start_rfc'=>dol_print_date($line->date_start, 'dayrfc', 'tzuser'), - 'line_date_end'=>dol_print_date($line->date_end, 'day', 'tzuser'), - 'line_date_end_locale'=>dol_print_date($line->date_end, 'day', 'tzuser', $outputlangs), - 'line_date_end_rfc'=>dol_print_date($line->date_end, 'dayrfc', 'tzuser'), + 'line_date_start'=>dol_print_date($line->date_start, 'day'), + 'line_date_start_locale'=>dol_print_date($line->date_start, 'day', 'tzserver', $outputlangs), + 'line_date_start_rfc'=>dol_print_date($line->date_start, 'dayrfc'), + 'line_date_end'=>dol_print_date($line->date_end, 'day'), + 'line_date_end_locale'=>dol_print_date($line->date_end, 'day', 'tzserver', $outputlangs), + 'line_date_end_rfc'=>dol_print_date($line->date_end, 'dayrfc'), 'line_multicurrency_code' => price2num($line->multicurrency_code), 'line_multicurrency_subprice' => price2num($line->multicurrency_subprice), From a9d7bbc2edfa0e17fb1c3542637cc632240d855a Mon Sep 17 00:00:00 2001 From: ATM-Nicolas Date: Fri, 6 Mar 2020 09:52:19 +0100 Subject: [PATCH 3/3] FIX : Remove unexisting link --- htdocs/comm/propal/list.php | 2 -- htdocs/contrat/list.php | 2 -- htdocs/projet/list.php | 2 -- htdocs/societe/canvas/actions_card_common.class.php | 2 -- 4 files changed, 8 deletions(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 511166991bf..17b8f80df68 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -972,9 +972,7 @@ if ($resql) $nbofsalesrepresentative=count($listsalesrepresentatives); if ($nbofsalesrepresentative > 3) // We print only number { - print ''; print $nbofsalesrepresentative; - print ''; } else if ($nbofsalesrepresentative > 0) { diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 57d47402049..9e5f5c811b2 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -706,9 +706,7 @@ while ($i < min($num,$limit)) $nbofsalesrepresentative=count($listsalesrepresentatives); if ($nbofsalesrepresentative > 3) // We print only number { - print ''; print $nbofsalesrepresentative; - print ''; } else if ($nbofsalesrepresentative > 0) { diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index a0e068c79f6..352140f9cb1 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -747,9 +747,7 @@ while ($i < min($num,$limit)) $nbofsalesrepresentative=count($listsalesrepresentatives); if ($nbofsalesrepresentative > 3) // We print only number { - print ''; print $nbofsalesrepresentative; - print ''; } else if ($nbofsalesrepresentative > 0) { diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index ffcd7c7a00f..e696f8596db 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -306,9 +306,7 @@ abstract class ActionsCardCommon $nbofsalesrepresentative=count($listsalesrepresentatives); if ($nbofsalesrepresentative > 3) // We print only number { - $this->tpl['sales_representatives'].= ''; $this->tpl['sales_representatives'].= $nbofsalesrepresentative; - $this->tpl['sales_representatives'].= ''; } else if ($nbofsalesrepresentative > 0) {