add tests batch 20
This commit is contained in:
@@ -10,7 +10,8 @@ class SlipPrinterService
|
||||
private SlipPrinterConfigService $configService,
|
||||
private SlipPrinterFormatterService $formatter,
|
||||
private SlipPrinterPdfService $pdfService
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function print(array $input, ?int $userId): array
|
||||
{
|
||||
@@ -44,7 +45,7 @@ class SlipPrinterService
|
||||
|
||||
return [
|
||||
'ok' => true,
|
||||
'text' => $header.$body.$footer,
|
||||
'text' => $header . $body . $footer,
|
||||
'width' => $width,
|
||||
];
|
||||
}
|
||||
@@ -96,7 +97,7 @@ class SlipPrinterService
|
||||
public function reprint(int $id, ?int $userId): array
|
||||
{
|
||||
$row = LateSlipLog::query()->find($id);
|
||||
if (! $row) {
|
||||
if (!$row) {
|
||||
return ['ok' => false, 'message' => 'Slip not found.'];
|
||||
}
|
||||
|
||||
@@ -172,7 +173,6 @@ class SlipPrinterService
|
||||
{
|
||||
$cfg = $this->configService->printerConfig();
|
||||
$width = (int) ($cfg['chars_per_line'] ?? 48);
|
||||
|
||||
return $width > 0 ? $width : 48;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user