From 2476b6a4b41b2dd4ce31799ac4e688818ef59588 Mon Sep 17 00:00:00 2001 From: rstubryan Date: Thu, 26 Feb 2026 14:52:44 +0700 Subject: [PATCH] refactor(FE): Format prices and totals as currency in InventoryAdjustmentTable --- .../inventory/adjustment/InventoryAdjustmentTable.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/pages/inventory/adjustment/InventoryAdjustmentTable.tsx b/src/components/pages/inventory/adjustment/InventoryAdjustmentTable.tsx index 67b5daac..3954ae33 100644 --- a/src/components/pages/inventory/adjustment/InventoryAdjustmentTable.tsx +++ b/src/components/pages/inventory/adjustment/InventoryAdjustmentTable.tsx @@ -8,7 +8,7 @@ import Button from '@/components/Button'; import Table from '@/components/Table'; import RequirePermission from '@/components/helper/RequirePermission'; import { isResponseSuccess } from '@/lib/api-helper'; -import { cn, formatNumber, formatDate } from '@/lib/helper'; +import { cn, formatNumber, formatDate, formatCurrency } from '@/lib/helper'; import { InventoryAdjustmentApi } from '@/services/api/inventory'; import { useTableFilter } from '@/services/hooks/useTableFilter'; import { InventoryAdjustment } from '@/types/api/inventory/adjustment'; @@ -85,12 +85,13 @@ const InventoryAdjustmentTable = () => { { id: 'price', header: 'Harga', - accessorFn: (row) => row.price ?? '-', + accessorFn: (row) => (row.price ? formatCurrency(row.price) : '-'), }, { id: 'grand_total', - header: 'Total', - accessorFn: (row) => row.grand_total ?? '-', + header: 'Grand Total', + accessorFn: (row) => + row.grand_total ? formatCurrency(row.grand_total) : '-', }, { id: 'transaction_type',