From 2793abd8ed8da0a8ecce7dde3d843f9e8d227a11 Mon Sep 17 00:00:00 2001 From: Yoga Pangestu Date: Wed, 29 Apr 2026 21:03:58 +0700 Subject: [PATCH] refactor: update order print discount display to use pre-formatted string value --- resources/js/pages/admin/manage/order/hooks/use-order-print.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/resources/js/pages/admin/manage/order/hooks/use-order-print.ts b/resources/js/pages/admin/manage/order/hooks/use-order-print.ts index 595ecdf..252bac5 100644 --- a/resources/js/pages/admin/manage/order/hooks/use-order-print.ts +++ b/resources/js/pages/admin/manage/order/hooks/use-order-print.ts @@ -1,6 +1,5 @@ import { usePrinter } from '@/hooks/use-printer'; import { EscPosEncoder } from '@/lib/esc-pos-encoder'; -import { formatCurrency } from '@/lib/formatters'; import type { Order } from '@/types/order'; import { format } from 'date-fns'; import { id } from 'date-fns/locale'; @@ -68,7 +67,7 @@ export function useOrderPrint() { if (discountAmount > 0) { const discountLabel = 'Diskon:'; - const discountVal = `- ${formatCurrency(discountAmount)}`; + const discountVal = '-' + order.discount_formatted; const dSpaces = width - discountLabel.length - discountVal.length; result.line(discountLabel + ' '.repeat(Math.max(0, dSpaces)) + discountVal); }