Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.003 == 零元整 0.5 == 五角整 #34

Closed
fallenaAngel opened this issue Jul 10, 2023 · 2 comments
Closed

0.003 == 零元整 0.5 == 五角整 #34

fallenaAngel opened this issue Jul 10, 2023 · 2 comments

Comments

@fallenaAngel
Copy link

const nzh = new Nzh({
ch: '零壹贰叁肆伍陆柒捌玖', // 数字字符
ch_u: '个拾佰仟万亿兆京', // 数位单位字符,万以下十进制,万以上万进制,个位不能省略
ch_f: '(负数)', // 负字符
ch_d: '点', // 小数点字符
m_u: '元角分', // 金额单位
m_t: '', // 金额前缀
m_z: '整' // 金额无小数后缀
})

// value如下
// 0.003 == 预期 零元整 目前 零元,望修复
// 0.5 == 预期 五角整 目前 五角,希望角位能支持带整

nzh.toMoney(value, { unOmitYuan: false, outSymbol: false })

@wanghan519
Copy link

wanghan519 commented Dec 9, 2023

支持,希望能参考http://jdjc.mof.gov.cn/fgzd/202204/t20220419_3803834.htm
《会计基础工作规范》第五十二条的规定,角后面需要有个整,多谢

cnwhy added a commit that referenced this issue Dec 11, 2023
@cnwhy
Copy link
Owner

cnwhy commented Dec 11, 2023

v1.0.12 增加了 forceZheng 配置项

@cnwhy cnwhy closed this as completed Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants