Convert the RMB numeric amount to the capital amount, and the RMB numeric amount to the capital amount

Source: Internet
Author: User

Convert the RMB numeric amount to the capital amount, and the RMB numeric amount to the capital amount

Public class t {public static String Trans2RMB (String money) {int index = money. indexOf (". "); if (index <0) {// No cent money = money + ". 00 "; index = money. indexOf (". ");} if (money. substring (index, money. length ()). length () <3) {// No score: money = money + "0"; index = money. indexOf (". ");} money = money. replaceAll ("\ D", ""); // remove ". "int length = money. length (); // String bigLetter [] = {"0", "one", "two", "three", "Si", "Wu ", "land", "Province"}; // currency unit String unit [] = {"Province", "Province", "Pick ", "Ten Thousand", "Ten", "hundreds of millions", "Ten", "Ten ", "dimensions", "pick up", "Yuan", "angle", "points"}; StringBuffer buf = new StringBuffer (""); for (int I = 0; I <length; I ++) {int num = Integer. parseInt (String. valueOf (money. charAt (I); buf. append (bigLetter [num]); buf. append (unit [unit. length-money. length () + I]);} String moneyTmp = buf. toString (); buf = null; for (int I = 0; I <4; I ++) {// 1234 RMB is the last of the four units, for example, 4567 (7891 million) (yuan) moneyTmp = moneyTmp. replaceAll ("0 billion", ""); moneyTmp = moneyTmp. replaceAll ("0 thousand", "Ten Thousand"); moneyTmp = moneyTmp. replaceAll ("Zero errors", "zero"); moneyTmp = moneyTmp. replaceAll ("Zero errors", "zero"); moneyTmp = moneyTmp. replaceAll ("Zero pickup", "zero"); moneyTmp = moneyTmp. replaceAll ("0 RMB", "RMB"); moneyTmp = moneyTmp. replaceAll ("zero angle", "zero"); moneyTmp = moneyTmp. replaceAll ("Zero Point", "whole");} moneyTmp = moneyTmp. replaceAll ("hundreds of millions", "hundreds of millions"); moneyTmp = moneyTmp. replaceAll ("", ""); moneyTmp = moneyTmp. replaceAll ("[zero] {1,}", "zero"); // replace multiple consecutive zeros with one zero moneyTmp = moneyTmp. replaceAll ("zero integer", "whole"); return moneyTmp;} public static void main (String [] args) {String money; money = "230067890080.01"; System. out. println (Trans2RMB (money); money = "230067890080.11"; System. out. println (Trans2RMB (money); money = "230067890080.10"; System. out. println (Trans2RMB (money); money = "230067890081.01"; System. out. println (Trans2RMB (money); money = "230067890081.11"; System. out. println (Trans2RMB (money); money = "230067890081.10"; System. out. println (Trans2RMB (money); money = "230067890080.01"; System. out. println (Trans2RMB (money); money = "230667890080.01"; System. out. println (Trans2RMB (money); money = "230007890080.01"; System. out. println (Trans2RMB (money); money = "230607890080.01"; System. out. println (Trans2RMB (money); money = "200067890080.01"; System. out. println (Trans2RMB (money); money = "200067890080.11"; System. out. println (Trans2RMB (money); money = "200067890080.10"; System. out. println (Trans2RMB (money); money = "200007890080.01"; System. out. println (Trans2RMB (money); money = "200000890080.11"; System. out. println (Trans2RMB (money); money = "200000090080.10"; System. out. println (Trans2RMB (money); money = "200000000080.10"; System. out. println (Trans2RMB (money); money = "200007890080"; System. out. println (Trans2RMB (money); money = "200000890080.1"; System. out. println (Trans2RMB (money); money = "200607890080.01"; System. out. println (Trans2RMB (money); money = "200600890080.11"; System. out. println (Trans2RMB (money); money = "200600090080.10"; System. out. println (Trans2RMB (money); money = "200600000080.10"; System. out. println (Trans2RMB (money); money = "20007800080.01"; System. out. println (Trans2RMB (money); money = "10001.01"; System. out. println (Trans2RMB (money); // System. out. println (new // StringBuffer (Arrays. toString (unit )). reverse (); // String small [] = {"points", ""}; // String [] ss = new String [] {"", "Yuan"}; // System. out. println (MoneyUtil. trans2RMB (". "); // System. out. println (MoneyUtil. trans2RMB (". 0 "); // System. out. println (MoneyUtil. trans2RMB ("0.0"); // System. out. println (MoneyUtil. trans2RMB ("0.00"); // System. out. println (MoneyUtil. trans2RMB ("0.000"); // System. out. println (MoneyUtil. trans2RMB ("123456789.0"); // System. out. println (MoneyUtil. trans2RMB ("1234"); // System. out. println (MoneyUtil. trans2RMB ("1111. "); // System. out. println (MoneyUtil. trans2RMB ("1011.011"); // System. out. println (MoneyUtil. trans2RMB ("00012340000000000.011 ")); /// hundreds of millions of records are collected from each other and tens of thousands of records are collected from each other. // hundreds of millions of records are collected from each other and tens of thousands of records are collected from each other. // hundreds of millions of records are collected from each other. I want to collect tens of thousands of yuan and collect RMB at zero point. // I want to collect hundreds of millions of yuan from each other. I want to collect tens of thousands of yuan at zero point. // I want to collect hundreds of millions of yuan from each other. one minute // hundreds of millions of users are being picked up. Tens of thousands of users are being picked up. One hour is worth a whole. // hundreds of millions of users are being picked up. Tens of thousands of workers are collected. I just picked up tens of thousands of workers and collected tens of thousands of yuan and a fraction of each other. // I just picked up tens of thousands of workers and collected hundreds of millions of yuan and a fraction of each other/ /million RMB 0-9 points/0-9 points/0-9 points/0-9 points/0-9 points/0-9 points/0-9 points/0-9 points/0-9 points/ /yuan and Yuan/yuan RMB and RMB all // hundreds of millions of workers are collected, and tens of thousands of workers are collected }}


What should I do if the numeric amount is 306000 yuan converted into a large write and the rationale should be stated?

RMB yuan (or RMB yuan), according to the rules for writing financial capital numbers, three words should be added before the capital numbers, and there cannot be spaces in the middle of the RMB.
If an upper-case number reaches the value of Yuan or angular, the word "Yuan" or "Angular" should be followed by the word "whole" or "positive"; if the upper-case number has points, the word is not followed by an integer.
When there is "0" in the Arabic numerals, the capital amount of Chinese characters should be "0", for example, $101.50, and the capital amount of Chinese characters should be written as RMB. When there are several consecutive "0" numbers in the Arabic amount, only one "0" word can be written in the capital amount of Chinese characters, for example, ¥1,004.56, the capital amount of Chinese characters should be written as RMB 1, 0, and 5 points. The Arabic dollar number is "0", or the number has several consecutive "0", the dollar is also "0", but the angle is not "0, the capital amount of Chinese characters can be set to only one "zero" word, or "zero" word, for example, $1,320.56. The capital amount of Chinese characters should be set to RMB, or the RMB is worth RMB. For example, for $1,000.56, the capital amount of Chinese characters should be written into the Yuan.
 
Should I use "positive" or "whole" after the RMB amount is capitalized "?

Yes !!!

Basic provisions on correct ticket and settlement credential

Various bills and settlement creden。 filled by banks, organizations, and individuals are an important basis for handling payment and settlement and cash receipts and payments. They are directly related to the accuracy, timeliness, and security of payment and settlement. Bills and settlement creden。 are the accounting creden。 recorded by banks, organizations, and individuals. They are a written proof of recording economic business and clarifying economic responsibilities. Therefore, to fill in the bill and settlement creden。, you must be standardized and standardized. You must have a complete set of elements, correct numbers, clear handwriting, good leakage, and no scrubbling to prevent alteration.

1. Fill in the numbers in uppercase letters and text, such as Yi (yi), Er (II), San, Si (SI), Wu (Wu), and Lu (Lu). Do not fill in one, two (two), three, four, five, six, seven, eight, nine, ten, Nian, Mao, or another (or 0. If traditional Chinese characters, such as ERU, Lu, Yi, Wan, and Yuan, are used in the amount of numbers, they shall also be accepted.

2. If the number of Chinese capital amounts reaches the Yuan, you should write an integral (or positive) word after the yuan, and do not write an integral (or positive) word after the corner. If the upper-case number has a score, it is not followed by an integral (or positive) word.

3. The Chinese capital amount should be marked with RMB, and the capital amount should be filled in immediately after the renminbi, without any blank space. If the words "RMB" are not printed before the capital amount, the words "RMB" should be added. The fixed words "renewal, renewal, pickup, ten thousand", "primary", "secondary", "primary", "secondary", "Yuan", "Corner", and "secondary" shall not be preprinted in the capital amount column of the bill and settlement credential.

4. If there are 0 digits in Arabic lower case, the Chinese capital should be written in accordance with the Chinese language rules, the amount of digits and the requirements to prevent alteration. Example:

(1) When there is O in the middle of an Arabic number, the Chinese capital amount should be written in zero words. For example, ¥1,409.50 should be written as RMB yuan.

(2) When there are several consecutive 0 digits in the middle of an Arabic number, only one zero word can be written in the middle of the capital amount in Chinese. For example, ¥6,007.14 should be written as RMB, which is less than RMB.

(3) When the Arabic numerals (tens of thousands or digits) are 0, or there are several consecutive 0 digits in the middle, the tens of thousands and the decimal places are also 0, you can write only one or no Chinese character in an upper case. For example, ¥1,680.32 should be written as RMB 107,000.53 million yuan, or as RMB million yuan worth of RMB million yuan, it should be written as RMB yuan, or RMB yuan.

(4) When the Arabic value is 0 and the score is not 0, the Chinese value is large. The dollar should be followed by zero words. For example, ¥16,409.02 should be written as RMB 325.04 million yuan, and RMB should be written as RMB million yuan.

5. Before the Arabic lowercase amount number, enter the RMB symbol $ (or sketch :). Numbers in Arabic lower case must be carefully entered and cannot be separated.

6. the invoice date must be capitalized in Chinese. In order to prevent the issuance date of the altered ticket, if the month and the day are filled in, the month is one, two and one, and the day is one to two, one to pick up, one to pick up and three to carry, add zero in front of it; if the day is lifted to pick up, add one in front of it. for example, on July 15, January 15, it should be written as "one month. For example, on April 9, October 20, it should be written.

7. If the bill issuance date is entered in lower case, the bank will not accept the ticket. If the capital date is not entered in accordance with the required specifications, the bank may accept the information, but any loss arising therefrom shall be borne by the bank by the issuing of the ticket.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.