From 2d50b73072686c26aad8c12465b3f3f1c08e7cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 16 Nov 2022 14:18:51 +0100 Subject: [PATCH] add new tags in receipt printer --- htdocs/core/class/dolreceiptprinter.class.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index 7a7c380adf9..3b10f38d238 100644 --- a/htdocs/core/class/dolreceiptprinter.class.php +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -64,7 +64,8 @@ * Replaced by month number * Replaced by day number * Replaced by day number - * Replaced by current date + * Replaced by current date and time + * Replaced by current date without time * Replaced by object id * Replaced by object ref * Replaced by customer firstname @@ -192,7 +193,8 @@ class dolReceiptPrinter extends Printer 'dol_value_day' => 'DOL_VALUE_DAY', 'dol_value_day_letters' => 'DOL_VALUE_DAY', 'dol_value_currentdate' => 'DOL_VALUE_CURRENTDATE', - 'dol_value_currentdate_time' => 'CurrentDateWithTime', + 'dol_value_currentdate_notime' => 'CurrentDateWithTime', + 'dol_value_currentdate_letters' => 'DOL_VALUE_CURRENTDATE_LETTERS', 'dol_value_currentyear' => 'CurrentYear', 'dol_value_currentmonth_letters' => 'DOL_VALUE_CURRENT_MONTH_LETTERS', 'dol_value_currentmonth' => 'DOL_VALUE_CURRENT_MONTH', @@ -603,9 +605,9 @@ class dolReceiptPrinter extends Printer $this->template = str_replace('{dol_value_day}', dol_print_date($object->date, '%d'), $this->template); $this->template = str_replace('{dol_value_day_letters}', $langs->trans("Day".dol_print_date($object->date, '%m')[1]), $this->template); - $this->template = str_replace('{dol_value_currentdate}', dol_print_date($now, 'day'), $this->template); - $this->template = str_replace('{dol_value_currentdate_time}', dol_print_date($now, 'dayhour'), $this->template); - $this->template = str_replace('{dol_value_currentdate_time_letters}', dol_print_date($now, 'dayhourtext'), $this->template); + $this->template = str_replace('{dol_value_currentdate}', dol_print_date($now, 'dayhour'), $this->template); + $this->template = str_replace('{dol_value_currentdate_notime}', dol_print_date($now, 'day'), $this->template); + $this->template = str_replace('{dol_value_currentdate_letters}', dol_print_date($now, 'dayhourtext'), $this->template); $this->template = str_replace('{dol_value_currentyear}', dol_print_date($now, '%Y'), $this->template); $this->template = str_replace('{dol_value_currentmonth_letters}', $langs->trans("Month".dol_print_date($now, '%m')), $this->template); $this->template = str_replace('{dol_value_currentmonth}', dol_print_date($now, '%m'), $this->template);