From 5707bf0d73a86e7db8ae37446b9ceb26508a2ad2 Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Mon, 6 Apr 2020 19:38:50 +0200 Subject: [PATCH] NEW RECEIPT_PRINTER_NB_CHARACT_BY_LINE and FIX product label --- htdocs/core/class/dolreceiptprinter.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index 468cdf050bc..e089a89190a 100644 --- a/htdocs/core/class/dolreceiptprinter.class.php +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -597,7 +597,7 @@ class dolReceiptPrinter extends Printer //print '
'.print_r($vals, true).'
'; // print ticket $level = 0; - $nbcharactbyline = 48; + $nbcharactbyline = (!empty($conf->global->RECEIPT_PRINTER_NB_CHARACT_BY_LINE) ? $conf->global->RECEIPT_PRINTER_NB_CHARACT_BY_LINE : 48); $ret = $this->initPrinter($printerid); if ($ret > 0) { setEventMessages($this->error, $this->errors, 'errors'); @@ -615,7 +615,7 @@ class dolReceiptPrinter extends Printer $spacestoadd = $nbcharactbyline - strlen($line->ref) - strlen($line->qty) - 10 - 1; $spaces = str_repeat(' ', $spacestoadd); $this->printer->text($line->ref.$spaces.$line->qty.' '.str_pad(price($line->total_ttc), 10, ' ', STR_PAD_LEFT)."\n"); - $this->printer->text(strip_tags(htmlspecialchars_decode($line->desc))."\n"); + $this->printer->text(strip_tags(htmlspecialchars_decode($line->product_label))."\n"); } break; case 'DOL_PRINT_OBJECT_TAX':