diff --git a/src/components/pages/master-data/product/ProductTable.tsx b/src/components/pages/master-data/product/ProductTable.tsx index 9d0dee22..c265be55 100644 --- a/src/components/pages/master-data/product/ProductTable.tsx +++ b/src/components/pages/master-data/product/ProductTable.tsx @@ -24,7 +24,7 @@ import RequirePermission from '@/components/helper/RequirePermission'; import { Product } from '@/types/api/master-data/product'; import { ProductApi } from '@/services/api/master-data'; -import { cn } from '@/lib/helper'; +import { cn, formatCurrency } from '@/lib/helper'; import { isResponseError, isResponseSuccess } from '@/lib/api-helper'; import { useTableFilter } from '@/services/hooks/useTableFilter'; import { ROWS_OPTIONS } from '@/config/constant'; @@ -155,13 +155,17 @@ const ProductsTable = () => { accessorKey: 'product_price', header: 'Harga Produk', cell: (props) => - props.row.original.product_price?.toLocaleString() ?? '-', + props.row.original.product_price + ? formatCurrency(props.row.original.product_price) + : '-', }, { accessorKey: 'selling_price', header: 'Harga Jual', cell: (props) => - props.row.original.selling_price?.toLocaleString() ?? '-', + props.row.original.selling_price + ? formatCurrency(props.row.original.selling_price) + : '-', }, { accessorKey: 'tax',