|
qb = "XX数据"
End If
If vDec = "00" And qb <> "" Then '1.00
ret = ret + "整"
End If
If vDec = "00" And qb = "" Then '0.00
ret = "零"
End If
If Left(vDec, 1) <> "0" And Right(vDec, 1) = 0 And qb <> "" Then '1.20
ret = ret + Num2Char(Left(vDec, 1)) + "角整"
End If
If Left(vDec, 1) = "0" And Right(vDec, 1) <> 0 And qb <> "" Then '1.03
ret = ret + "零" + Num2Char(Right(vDec, 1)) + "分"
End If
If Left(vDec, 1) <> "0" And Right(vDec, 1) <> 0 And qb <> "" Then '1.23
ret = ret + Num2Char(Left(vDec, 1)) + "角" + Num2Char(Right(vDec, 1)) + "分"
End If
If Left(vDec, 1) <> "0" And Right(vDec, 1) = 0 And qb = "" Then '0.20
ret = Num2Char(Left(vDec, 1)) + "角整"
End If
If Left(vDec, 1) = "0" And Right(vDec, 1) <> 0 And qb = "" Then '0.03
ret = Num2Char(Right(vDec, 1)) + "分"
End If
If Left(vDec, 1) <> "0" And Right(vDec, 1) <> 0 And qb = "" Then '0.23
ret = Num2Char(Left(vDec, 1)) + "角" + Num2Char(Right(vDec, 1)) + "分"
End If
'★修正大写中出现重复零的问题.如:"800800"会写作"捌拾万零零捌佰元整".
' 修正大写"元"前出现多余零的问题.如:"800000.1"会写作"捌拾万零元整零壹角整".
' 修正大写结尾"整"前出现多余零的问题.如:"200"会写作"贰佰元零整".
js = 0
Do While js <> Len(ret)
js = Len(ret)
For S = 2 To Len(ret) - 1
If Mid(ret, S, 1) = "零" Then
If Mid(ret, S + 1, 1) = "零" Or Mid(ret, S + 1, 1) = "元" Or Mid(ret, S + 1, 1) = "整" Then
ret = Left(ret, S - 1) + Right(ret, Len(ret) - S)
Exit For
End If
End If
Next
Loop
'★
GetDXJE = ret
End Function |
|