fix: Pass order creation date to print modal and display it on the receipt instead of the current date.

This commit is contained in:
Yoga Pangestu 2026-01-04 22:38:12 +07:00
parent a41eb23998
commit 823cb18311
2 changed files with 2 additions and 1 deletions

View File

@ -65,6 +65,7 @@ public function print(Order $order): void
'open-print-modal',
cashier: $order->user?->employee?->full_name ?? '',
customer: $order->customer?->name ?? '',
date: formatDateLocalized($order->created_at, 'd F Y H:i'),
outlet_name: $order->outlet?->name ?? '',
outlet_address: $order->outlet?->address ?? '',
subtotal: $order->subtotal,

View File

@ -278,7 +278,7 @@ function getMaxChar(widthMM) {
text += ESC + "\x61\x00"; // Left Align
text += `Kasir : ${order.cashier || '-'}\n`;
text += `Customer : ${order.customer || '-'}\n`;
text += `Tanggal : ${new Date().toLocaleString('id-ID')}\n`;
text += `Tanggal : ${order.date}\n`;
text += line;
// CONTENT