From fa39c3d962090bd976636eb2f7177c1fccf8e03f Mon Sep 17 00:00:00 2001 From: zzk Date: Mon, 25 Apr 2022 17:59:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E5=89=8D=E9=83=A8=E5=88=86=E7=BB=93?= =?UTF-8?q?=E6=B8=85=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/tenwa/voucher/CreateVoucherProcess/CarRatio.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src_core/com/tenwa/voucher/CreateVoucherProcess/CarRatio.java b/src_core/com/tenwa/voucher/CreateVoucherProcess/CarRatio.java index 6df26eafc..e84961b7d 100644 --- a/src_core/com/tenwa/voucher/CreateVoucherProcess/CarRatio.java +++ b/src_core/com/tenwa/voucher/CreateVoucherProcess/CarRatio.java @@ -1,5 +1,6 @@ package com.tenwa.voucher.CreateVoucherProcess; +import java.math.BigDecimal; import java.util.List; import java.util.Map; import com.amarsoft.are.jbo.BizObject; @@ -23,9 +24,6 @@ public class CarRatio extends CommonHandler { } protected void initDisplayForEdit(BizObject bo) throws Exception { - double por = bo.getAttribute("retainfield2").getDouble(); - por = por*100; - retainfield2 = String.valueOf(por)+"%"; - bo.setAttributeValue("retainfield2", retainfield2); + bo.setAttributeValue("retainfield2", BigDecimal.valueOf(bo.getAttribute("retainfield2").getDouble()).multiply(BigDecimal.valueOf(100)).setScale(2).toString()+"%"); } }