From a855ef132951b99675d7e181b3482a1ccca118b1 Mon Sep 17 00:00:00 2001 From: Giovanni Vella Date: Sun, 24 Oct 2021 12:07:23 +0200 Subject: [PATCH] current date default format string Added a default format for date/time tag DOL_PRINT_CURR_DATE --- htdocs/core/class/dolreceiptprinter.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index cb49f53e0c5..116624c428b 100644 --- a/htdocs/core/class/dolreceiptprinter.class.php +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -712,7 +712,8 @@ class dolReceiptPrinter extends Printer $this->printer->text($title.$spaces.str_pad(price($object->total_ttc), 10, ' ', STR_PAD_LEFT)."\n"); break; case 'DOL_PRINT_CURR_DATE': - $this->printer->text(date($vals[$tplline]['value'])."\n"); + if (strlen($vals[$tplline]['value'])<2) $this->printer->text(date('d/m/Y H:i:s')."\n"); + else $this->printer->text(date($vals[$tplline]['value'])."\n"); break; case 'DOL_LINE_FEED': $this->printer->feed();