/// <summary>    /// 本类实现阿拉伯数字到大写中文的转换    /// 该类没有对非法数字进行判别,请事先自己判断数字是否合法    /// </summary>    public class ChineseNum    { //小写转大写        public static string GetChineseNum(string p_num)        {            ChineseNum cn = new ChineseNum(); r…
#region 小写金额转换为大写 public static string CurrToChnNum(double Currnum) { string sResult = ""; if (Math.Abs(Currnum) < 1e-20) return "零圆整"; if (Currnum < 1e-20) sResult = "负"; sResult = sResult + StringToChnNum(Math.Abs(Mat…
我们日常开发业务系统中,作为统计报表中,特别是财务报表,显示中文金额经常遇到. 转换大小写的方法有很多,以下是从数据库函数方面解决这一问题. 效果如图: 调用:SELECT dbo.[Fn_ConvertRMB](192.4) 具体函数如下: -- ============================================= -- 调用:SELECT dbo.[Fn_ConvertRMB](192.4) -- Create date: 2015-01-06 -- Descripti…
<script> function chineseNumber(num){ if (isNaN(num) || num > Math.pow(10, 12)) return "" var cn = "零壹贰叁肆伍陆柒捌玖" var unit = new Array("拾百千", "分角") var unit1 = new Array("万亿", "") var numA…
public static function amountInWords($num) {         if (!is_numeric($num) || empty($num))             return "";                  $return = "";         $unit = array("分", "角", "圆", "整");        …
function smalltoBIG(n) { var fraction = ['角', '分']; var digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']; var unit = [ ['元', '万', '亿'], ['', '拾', '佰', '仟'] ]; var head = n < 0 ? '欠' : ''; n = Math.abs(n); var s = ''; for (var i = 0; i < fr…
function smalltoBIG(n) { var fraction = ['角', '分']; var digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']; var unit = [ ['元', '万', '亿'], ['', '拾', '佰', '仟'] ]; var head = n < 0 ? '欠' : ''; n = Math.abs(n); var s = ''; for (var i = 0; i < fr…
/** 数字金额大写转换(可以处理整数,小数,负数) */ function smalltoBIG(n) { var fraction = ['角', '分']; var digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']; var unit = [ ['元', '万', '亿'], ['', '拾', '佰', '仟'] ]; var head = n ? '欠': ''; n = Math.abs(n); var s = ''…
public class Tool {             private static final String UNIT = "万千佰拾亿千佰拾万千佰拾元角分";         private static final String DIGIT = "零壹贰叁肆伍陆柒捌玖";         private static final double MAX_VALUE = 9999999999999.99D;         public static St…
unit TU2.Helper.Currency; interface ): string; ): string; implementation uses System.SysUtils, System.Math; function CurrencyRound(var U: UInt64; const ADecimals: Cardinal): Integer; inline; var W: UInt64; begin//Bankers-rounding Result := -ADecimals…