diff options
| author | joonhoekim <26rote@gmail.com> | 2025-11-13 20:18:45 +0900 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-11-13 20:18:45 +0900 |
| commit | c882df5fa1a181d5bfd133d5980993ac43079b72 (patch) | |
| tree | 2ed9a4c8787b52d589681b3a5ece5e940d3a5e74 /components/common/selectors | |
| parent | 7517ec0b016265a6c1d35f22ba6292c498669d43 (diff) | |
(김준회) 벤더 견적 응답: 통화 선택기 적용, 통화 가져오는 쿼리 명시적 JOIN으로 변경
Diffstat (limited to 'components/common/selectors')
| -rw-r--r-- | components/common/selectors/currency/currency-service.ts | 11 | ||||
| -rw-r--r-- | components/common/selectors/currency/index.ts | 3 |
2 files changed, 8 insertions, 6 deletions
diff --git a/components/common/selectors/currency/currency-service.ts b/components/common/selectors/currency/currency-service.ts index c911d6b1..4e73f077 100644 --- a/components/common/selectors/currency/currency-service.ts +++ b/components/common/selectors/currency/currency-service.ts @@ -25,7 +25,7 @@ const FALLBACK_TEST_DATA: Currency[] = [ * - 엔화(JPY): 0 * - 기타: 2 */ -export function getDecimalPlaces(currencyCode: string): number { +function getDecimalPlaces(currencyCode: string): number { const code = currencyCode.toUpperCase() if (code === 'KRW' || code === 'JPY') { return 0 @@ -49,12 +49,15 @@ export async function getCurrencies(): Promise<{ const result = await oracleKnex.raw(` SELECT CD.CD AS CURRENCY_CODE, NM.GRP_DSC AS CURRENCY_NAME - FROM CMCTB_CD CD, CMCTB_CDNM NM - WHERE CD.CD_CLF = NM.CD_CLF + FROM CMCTB_CD CD + INNER JOIN CMCTB_CDNM NM + ON CD.CD_CLF = NM.CD_CLF AND CD.CD = NM.CD AND CD.CD2 = NM.CD2 AND CD.CD3 = NM.CD3 - AND CD.CD_CLF = 'SPB032' + WHERE CD.CD_CLF = 'SPB032' + AND NM.DEL_YN = 'N' + AND CD.DEL_YN = 'N' ORDER BY CD.USR_DF_CHAR_8 ASC, CD.CD ASC `) diff --git a/components/common/selectors/currency/index.ts b/components/common/selectors/currency/index.ts index 1eb0cfbb..59819221 100644 --- a/components/common/selectors/currency/index.ts +++ b/components/common/selectors/currency/index.ts @@ -10,8 +10,7 @@ export { CurrencySelectorMultiDialog } from './currency-selector-multi-dialog' export type { CurrencySelectorMultiDialogProps } from './currency-selector-multi-dialog' export { - getCurrencies, - getDecimalPlaces + getCurrencies } from './currency-service' export type { Currency |
