fix: Pass order creation date to print modal and display it on the receipt instead of the current date.
This commit is contained in:
parent
a41eb23998
commit
823cb18311
@ -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,
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user