mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE): Format prices and totals as currency in
InventoryAdjustmentTable
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user