|
|
@@ -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
|
|