From 520c2966267d126aa501e2b74b925905fbfddbb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 20 Dec 2021 16:04:32 +0100 Subject: [PATCH 1/2] add url in receipt printer options --- htdocs/core/class/dolreceiptprinter.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index 2062f1b351c..6ea3219ebb0 100644 --- a/htdocs/core/class/dolreceiptprinter.class.php +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -221,6 +221,7 @@ class dolReceiptPrinter extends Printer 'dol_value_mysoc_idprof6' => 'ProfId6', 'dol_value_mysoc_tva_intra' => 'VATIntra', 'dol_value_mysoc_capital' => 'Capital', + 'dol_value_mysoc_url' => 'Web', 'dol_value_vendor_lastname' => 'VendorLastname', 'dol_value_vendor_firstname' => 'VendorFirstname', 'dol_value_vendor_mail' => 'VendorEmail', @@ -607,6 +608,7 @@ class dolReceiptPrinter extends Printer $this->template = str_replace('{dol_value_mysoc_idprof6}', $mysoc->idprof6, $this->template); $this->template = str_replace('{dol_value_mysoc_tva_intra}', $mysoc->tva_intra, $this->template); $this->template = str_replace('{dol_value_mysoc_capital}', $mysoc->capital, $this->template); + $this->template = str_replace('{dol_value_mysoc_url}', $mysoc->url, $this->template); $this->template = str_replace('{dol_value_vendor_firstname}', $user->firstname, $this->template); $this->template = str_replace('{dol_value_vendor_lastname}', $user->lastname, $this->template); From 214feeb1f36405bc97375ba14b3c52ca48e67e42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 21 Dec 2021 10:05:06 +0100 Subject: [PATCH 2/2] Update dolreceiptprinter.class.php --- htdocs/core/class/dolreceiptprinter.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index 6ea3219ebb0..e259627fe22 100644 --- a/htdocs/core/class/dolreceiptprinter.class.php +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -674,9 +674,9 @@ class dolReceiptPrinter extends Printer $vatarray[$line->tva_tx] += $line->total_tva; } foreach ($vatarray as $vatkey => $vatvalue) { - $spacestoadd = $nbcharactbyline - strlen($vatkey) - 12; - $spaces = str_repeat(' ', $spacestoadd > 0 ? $spacestoadd : 0); - $this->printer->text($spaces.$vatkey.'% '.str_pad(price($vatvalue), 10, ' ', STR_PAD_LEFT)."\n"); + $spacestoadd = $nbcharactbyline - strlen($vatkey) - 12; + $spaces = str_repeat(' ', $spacestoadd > 0 ? $spacestoadd : 0); + $this->printer->text($spaces.$vatkey.'% '.str_pad(price($vatvalue), 10, ' ', STR_PAD_LEFT)."\n"); } break; case 'DOL_PRINT_OBJECT_TAX1':