feat: add automatic item pickup slip printing via HP ePrint
This commit is contained in:
@@ -141,6 +141,15 @@ class PagesController extends Controller
|
||||
'cc_amount' => $cc_amount,
|
||||
]
|
||||
);
|
||||
|
||||
// Automatically print item pickup slips
|
||||
try {
|
||||
$printerService = app(\App\Services\PrinterService::class);
|
||||
$printerService->printForCheckout(\App\Models\Checkout::find($checkout_result));
|
||||
} catch (\Exception $e) {
|
||||
\Illuminate\Support\Facades\Log::error('Auto-print failed: ' . $e->getMessage());
|
||||
}
|
||||
|
||||
return view('checkout_complete', [
|
||||
'checkout_result' => $checkout_result,
|
||||
'checkout_list_results' => $checkout_list_results,
|
||||
|
||||
Reference in New Issue
Block a user