marcofalabretti 10 часов назад
Родитель
Сommit
f70d124c8b
2 измененных файлов: 9 добавлений и 1 удалений
  1. 8
    0
      app/Services/Stampa/CreaComandaCucina.php
  2. 1
    1
      app/Services/Stampa/CreaScontrino.php

+ 8
- 0
app/Services/Stampa/CreaComandaCucina.php Просмотреть файл

93
         $effectiveWidth = (int) (self::LINE_WIDTH / 2);
93
         $effectiveWidth = (int) (self::LINE_WIDTH / 2);
94
         $tavoloWidth = (int) floor($effectiveWidth * 4 / 12);
94
         $tavoloWidth = (int) floor($effectiveWidth * 4 / 12);
95
         $clienteWidth = $effectiveWidth - $tavoloWidth;
95
         $clienteWidth = $effectiveWidth - $tavoloWidth;
96
+        $labelTavoloWidth = $tavoloWidth * 2;
97
+        $labelClienteWidth = self::LINE_WIDTH - $labelTavoloWidth;
96
 
98
 
97
         $tavoloText = mb_strtoupper($this->sanitizeLine((string) ($tavolo ?? '')));
99
         $tavoloText = mb_strtoupper($this->sanitizeLine((string) ($tavolo ?? '')));
98
         $clienteText = mb_strtoupper($this->sanitizeLine((string) ($cliente ?? '')));
100
         $clienteText = mb_strtoupper($this->sanitizeLine((string) ($cliente ?? '')));
101
             return;
103
             return;
102
         }
104
         }
103
 
105
 
106
+        // Label in font normale, più piccola rispetto ai valori 2x2.
107
+        $printer->text(
108
+            str_pad('TAVOLO', $labelTavoloWidth).
109
+            str_pad('CLIENTE', $labelClienteWidth)."\n"
110
+        );
111
+
104
         $tavoloText = mb_substr($tavoloText, 0, $tavoloWidth);
112
         $tavoloText = mb_substr($tavoloText, 0, $tavoloWidth);
105
         $clienteText = mb_substr($clienteText, 0, $clienteWidth);
113
         $clienteText = mb_substr($clienteText, 0, $clienteWidth);
106
 
114
 

+ 1
- 1
app/Services/Stampa/CreaScontrino.php Просмотреть файл

158
         $printer->text($this->separator());
158
         $printer->text($this->separator());
159
         $printer->setJustification(Printer::JUSTIFY_CENTER);
159
         $printer->setJustification(Printer::JUSTIFY_CENTER);
160
         if(Impostazioni::getImpostazione('stampa_qr_code_chiamata')){
160
         if(Impostazioni::getImpostazione('stampa_qr_code_chiamata')){
161
-        $this->qrCode(route('consulta.scontrino.show', ['ordine_id' => $ordine->id]) , Printer::QR_ECLEVEL_L, 6, Printer::QR_MODEL_2);
161
+        $printer->qrCode(route('consulta.scontrino.show', ['ordine_id' => $ordine->id]) , Printer::QR_ECLEVEL_L, 6, Printer::QR_MODEL_2);
162
         // $this->printQrCode($printer, route('consulta.scontrino.show', ['ordine_id' => $ordine->id]));
162
         // $this->printQrCode($printer, route('consulta.scontrino.show', ['ordine_id' => $ordine->id]));
163
         }
163
         }
164
         $printer->text("\n");
164
         $printer->text("\n");

Загрузка…
Отмена
Сохранить