refactor(FE): Format prices and totals as currency in

InventoryAdjustmentTable
This commit is contained in:
rstubryan
2026-02-26 14:52:44 +07:00
parent 01c1843fd5
commit 2476b6a4b4
@@ -8,7 +8,7 @@ import Button from '@/components/Button';
import Table from '@/components/Table'; import Table from '@/components/Table';
import RequirePermission from '@/components/helper/RequirePermission'; import RequirePermission from '@/components/helper/RequirePermission';
import { isResponseSuccess } from '@/lib/api-helper'; 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 { InventoryAdjustmentApi } from '@/services/api/inventory';
import { useTableFilter } from '@/services/hooks/useTableFilter'; import { useTableFilter } from '@/services/hooks/useTableFilter';
import { InventoryAdjustment } from '@/types/api/inventory/adjustment'; import { InventoryAdjustment } from '@/types/api/inventory/adjustment';
@@ -85,12 +85,13 @@ const InventoryAdjustmentTable = () => {
{ {
id: 'price', id: 'price',
header: 'Harga', header: 'Harga',
accessorFn: (row) => row.price ?? '-', accessorFn: (row) => (row.price ? formatCurrency(row.price) : '-'),
}, },
{ {
id: 'grand_total', id: 'grand_total',
header: 'Total', header: 'Grand Total',
accessorFn: (row) => row.grand_total ?? '-', accessorFn: (row) =>
row.grand_total ? formatCurrency(row.grand_total) : '-',
}, },
{ {
id: 'transaction_type', id: 'transaction_type',