diff options
| author | joonhoekim <26rote@gmail.com> | 2025-11-20 11:53:08 +0900 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-11-20 11:53:08 +0900 |
| commit | 01b7b192acc316b4f8969893d1d9bb6369425776 (patch) | |
| tree | c885effdc80380ddabd4c52e9b24d98e8c9565e3 /lib/po/vendor-table/vendor-po-columns.tsx | |
| parent | 77cbcaf27c9de8b361a6c5a13f0eefb37fd0d0e5 (diff) | |
(김준회) PO 및 RFQ 관련 구매 피드백 반영
- PO매핑 오류 수정, 스키마 컬럼추가, 숫자포매팅 등
- rfq 담당자 문제 수정 등
Diffstat (limited to 'lib/po/vendor-table/vendor-po-columns.tsx')
| -rw-r--r-- | lib/po/vendor-table/vendor-po-columns.tsx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/po/vendor-table/vendor-po-columns.tsx b/lib/po/vendor-table/vendor-po-columns.tsx index c954b872..de44adce 100644 --- a/lib/po/vendor-table/vendor-po-columns.tsx +++ b/lib/po/vendor-table/vendor-po-columns.tsx @@ -9,6 +9,7 @@ import { Checkbox } from "@/components/ui/checkbox" import { DataTableColumnHeaderSimple } from "@/components/data-table/data-table-column-simple-header" import { VendorPO, VendorPOActionType } from "./types" import { VendorPOActions } from "./vendor-po-actions" +import { formatNumber } from "@/lib/utils" interface GetVendorColumnsProps { setRowAction: React.Dispatch<React.SetStateAction<{ row: { original: VendorPO }; type: VendorPOActionType } | null>> @@ -193,7 +194,13 @@ export function getVendorColumns({ setRowAction, selectedRows = [], onRowSelect ), cell: ({ row }) => { const amount = row.getValue("totalAmount") as string | number - return <div className="text-sm text-right font-mono">{amount || '-'}</div> + const currency = row.getValue("currency") as string + + // 통화별 소수점 자리수 결정 (KRW, JPY: 0자리, 나머지: 2자리) + const decimals = (currency === 'KRW' || currency === 'JPY') ? 0 : 2 + const formattedAmount = formatNumber(amount, decimals) + + return <div className="text-sm text-right font-mono">{formattedAmount}</div> }, size: 120, }, |
