ソースを参照

fix 2 scontrini

marcofalabretti 10時間前
コミット
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,6 +93,8 @@ class CreaComandaCucina
93 93
         $effectiveWidth = (int) (self::LINE_WIDTH / 2);
94 94
         $tavoloWidth = (int) floor($effectiveWidth * 4 / 12);
95 95
         $clienteWidth = $effectiveWidth - $tavoloWidth;
96
+        $labelTavoloWidth = $tavoloWidth * 2;
97
+        $labelClienteWidth = self::LINE_WIDTH - $labelTavoloWidth;
96 98
 
97 99
         $tavoloText = mb_strtoupper($this->sanitizeLine((string) ($tavolo ?? '')));
98 100
         $clienteText = mb_strtoupper($this->sanitizeLine((string) ($cliente ?? '')));
@@ -101,6 +103,12 @@ class CreaComandaCucina
101 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 112
         $tavoloText = mb_substr($tavoloText, 0, $tavoloWidth);
105 113
         $clienteText = mb_substr($clienteText, 0, $clienteWidth);
106 114
 

+ 1
- 1
app/Services/Stampa/CreaScontrino.php ファイルの表示

@@ -158,7 +158,7 @@ class CreaScontrino
158 158
         $printer->text($this->separator());
159 159
         $printer->setJustification(Printer::JUSTIFY_CENTER);
160 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 162
         // $this->printQrCode($printer, route('consulta.scontrino.show', ['ordine_id' => $ordine->id]));
163 163
         }
164 164
         $printer->text("\n");

読み込み中…
キャンセル
保存