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 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',