|
@@ -678,7 +678,7 @@ function logistics(){
|
|
|
* @param $type int 补整类型,0:到角补整;1:到元补整
|
|
|
* @return mixed 中文大写金额
|
|
|
*/
|
|
|
-function convertAmountToCn($amount, $type = 1) {
|
|
|
+function convertAmountToCn($amount, $type = 0) {
|
|
|
// 判断输出的金额是否为数字或数字字符串
|
|
|
if(!is_numeric($amount)){
|
|
|
return "要转换的金额只能为数字!";
|
|
@@ -691,7 +691,7 @@ function convertAmountToCn($amount, $type = 1) {
|
|
|
|
|
|
// 金额不能为负数
|
|
|
if($amount < 0) {
|
|
|
- return "要转换的金额不能为负数!";
|
|
|
+ return "人民币零元整";
|
|
|
}
|
|
|
|
|
|
// 金额不能超过万亿,即12位
|