CnPack Forum


 
Subject: RMBFloatToChinese转换部分金额时有误,在个位数为0时大写不正确
wfymqj
灌水科科长
Rank: 3Rank: 3



UID 1023
Digest Posts 0
Credits 178
Posts 70
点点分 178
Reading Access 10
Registered 2005-9-6
Location 湖北
Status Offline
Post at 2019-10-8 10:21  Profile | Blog | P.M. 
RMBFloatToChinese转换部分金额时有误,在个位数为0时大写不正确

RMBFloatToChinese转换部分金额时有误,在个位数为0时大写不正确<br />
<br />
procedure TForm1.btn1Click(Sender: TObject);<br />
var<br />
??c:Currency;<br />
begin<br />
??//c := StrToCurr(edt1.Text);<br />
??c := 20;<br />
??edt2.Text := RMBFloatToChinese(c);??//得到结果为 【贰拾元零】<br />
??c := 200;<br />
??edt2.Text := RMBFloatToChinese(c);??//得到结果为 【贰佰元零】<br />
??c := 20000;<br />
??edt2.Text := RMBFloatToChinese(c);??//得到结果为 【贰万元零】<br />
end;


在网上查找了下,下面链接写的转换函数不错。
https://blog.csdn.net/tht2009/article/details/73287225

[ 本帖最后由 wfymqj 于 2019-10-10 11:48 编辑 ]
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2020-5-21 11:15  Profile | Blog | P.M. 
感谢报告,才看到。
我们修复一下。
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2020-5-21 11:17  Profile | Blog | P.M. 
刚查下来该问题之前已修正了。
Top
 




All times are GMT++8, the time now is 2024-11-22 01:48

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.009577 second(s), 9 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP