summaryrefslogtreecommitdiff
path: root/components/common
diff options
context:
space:
mode:
Diffstat (limited to 'components/common')
-rw-r--r--components/common/selectors/currency/currency-service.ts11
-rw-r--r--components/common/selectors/currency/index.ts3
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