From 30f04bf805da6a8379701fedcac565d30fa2cd89 Mon Sep 17 00:00:00 2001 From: kuhan Date: Mon, 13 Mar 2023 14:28:17 +0900 Subject: [PATCH] =?UTF-8?q?=EC=84=B8=EA=B8=88=EA=B3=84=EC=82=B0=EC=8B=9C?= =?UTF-8?q?=20999=EC=9D=B4=ED=95=98=EC=9D=BC=20=EB=96=84=20moneyText=20?= =?UTF-8?q?=EA=B0=92=20=EC=88=98=EC=A0=95=20=EB=B0=A9=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/static/res/front/js/biz/sell/info.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/resources/static/res/front/js/biz/sell/info.js b/src/main/resources/static/res/front/js/biz/sell/info.js index 2981b7d..20229f7 100644 --- a/src/main/resources/static/res/front/js/biz/sell/info.js +++ b/src/main/resources/static/res/front/js/biz/sell/info.js @@ -83,10 +83,18 @@ let appVue = new Vue({ }, getTex: function(x){ //정산금액 * 0.1 = 세금 - let $this = this; + let $this = this; var settlementAmount = Number($this.getSettlementAmount(x).replaceAll(',','')); var tex = settlementAmount*0.1; - + + if((0 < Number(tex) && Number(tex) < 999)){ + if(isNaN(Number(tex))) { //NaN인지 판별 + return 0; + }else { //NaN이 아닌 경우 + const numberTex = Number(tex).toLocaleString('ko-KR'); + return numberTex; + } + } return moneyText(tex,'Y'); }, getMiddleMargin: function(x){