Number in words, detailed description. Number Capture, Detailed Description 1C Number Pointing Cope

Global context
Numberinwords (NumberinWords)
Syntax:
Nipperropisus (<Число>, <Форматная строка>, <Параметры предмета исчисления>)
Parameters:
<Число> (mandatory)
Type: number. The number you want to convert to the string in words.
<Форматная строка> (optional)
Type: Row. The format string is a string value that includes formatting parameters. Formatting parameters are listed through the symbol ";" (semicolon). If the parameter is not specified, the default parameter is used.
Each parameter is set by the parameter name, the character "\u003d" (equal) and the parameter value. The parameter value may be indicated in single or double quotes. This is necessary if the value of the parameter contains the characters used in the syntax of the format string.
L (L) - localization code. The default location code installed in the operating system is used. Examples of localization codes: RU_RU - Russian (Russia); EN_US - English (USA).
NP (SN) - include / do not include the name of the calculus (boolean), the default is true.
ND (Fn) - include / do not include the name of the decimal parts of the calculus object (Boolean), the default is truth.
DP (FS) - a fractional part to withdraw in words / Number (Boolean), the default is a lie.
<Параметры предмета исчисления> (optional)
Type: Row. It is a string value that defines the parameters of the calculus. The calculus object parameters are listed through "," (comma). The format of the string depends on the localization code.
For Russian and Belarusian languages \u200b\u200b(RU_RU, BE_BY)
"Ruble, rubles, rubles, m, penny, penny, kopecks, g, 2", where:
"Ruble, rubles, rubles, M" - subject of calculation:
ruble - the only number of identity case,
ruble - the only number of the genitive case,
rubles - a plural of genitive case,


For the Ukrainian language (UK_UA)
"hryvnia, hryvnia, hryvnia, m, penny, penny, kopecks, g, 2", where:
"Hryvnia, Grivna, Grieving, M" - a subject of calculation:
"Hryvnia is the only number of nominal case,
hryvnia - the only number of genitive pelvis,
hryvnia - multiple number of genitive case
m - Male Rod (W - Female Rod, C - Middle Rod);
"Kopeck, a penny, kopecks, g" - a fractional part, similar to the subject of calculus (may be absent);
"2" - the number of discharge parts (may be absent, by default is 2).
For Polish Language (PL_PL)
złoty, Złote, Złotych, M, Grosz, Grosze, Groszy, M, 2
where:
"Złoty, Złote, Złotych, M" - an object of calculus (M - Male genus, ż - female genus, ń - Middle Rod, Mo - Personal Male genus)
złoty - the only number of nominative case
złote - the only number of accusative case
złotych - Multiple Veriable Padge
m - Male Rod (ż - Female Rod, ń - Middle Rod, Mo - Personal Male Rod)
"Grosz, Grosze, Groszy, M" - fractional part (may be absent) (similar to the whole part)
2 - the number of splits of the fractional part (maybe absent, by default is 2)
Example:
We pass \u003d nipperropisus (1832, "l \u003d pl_pl; Sn \u003d true; fn \u003d true; fs \u003d true", "złoty, złote, złotych, m, grosz, grosze, groszy, m, 2");
For English, Finnish and Kazakh languages \u200b\u200b(en_us, fi_fi, kk_kz)
"Dollar, Dollars, Cent, Cents, 2", where:
"Dollar, Dollars" is an object of calculation in the only and multiple number;
"Cent, Cents" - the fractional part in the only and multiple number (may be absent);
"2" - the number of discharge parts (may be absent, by default is 2).
For German (de_de)
"EURO, EURO, M, CENT, CENT, M, 2", where:
"Euro, Euro, M" - subject of calculus:
Euro, EURO is the subject of calculation in the only and multiple number;
M - Male Rod (F - Female Rod, N - Middle Rod);
"CENT, CENT, M" - a fractional part, similar to the subject of calculus (may be absent);
"2" - the number of discharge parts (may be absent, by default is 2).
For Latvian Language (LV_LV)
"Lats, Lati, Latu, V, Santīms, Santīmi, Santīmu, V, 2, J, J, where:
"Lats, Lati, Latu, V" - subject of calculus:
lats - for numbers ending with 1, except 11
lati - for numbers ending in 2-9 and 11
lATU - multiple number (genitive case) is used after numeral 0, 10, 20, ..., 90, 100, 200, ..., 1000, ..., 100000,
v - Male Rod (S - Female Rod);
"Santīms, Santīmi, Santīmu, V" - a fractional part, similar to the subject of calculus (may be absent);
"2" - the number of discharge parts (may be absent, by default is 2);
"J" - the number 100 is displayed as "one hundred" for the foregoing of calculus (n - as "one hundred"),
may be absent, the default is "j";
"J" - the number 100 is displayed as "one hundred" for the fractional part (n - as a "one hundred"),
maybe absent, by default is "J".
For Lithuanian Language (LT_LT)
"Litas, Litai, Litų, M, Centas, Centai, Centų, M, 2", where:
"Litas, Litai, Litų, M" - subject of calculus:
litas is the only number of the whole part
litai - multiple number of the whole part from 2 to 9,
litų - Multiple of the whole part of the whole part,
m - the genus of a whole part (F - female genus),
"CENTAS, CENTAI, CENTų, M" - a fractional part, similar to the subject of calculus (may be absent);
"2" - the number of discharge parts (may be absent, by default is 2).
For Estonian Language (ET_EE)
"Kroon, Krooni, Senti, Senti, 2", where:
"Kroon, Krooni" - - the subject of calculation in the only and multiple number;
"Senti" - the fractional part in the only and multiple number (may be absent);
2 - the number of discharges of the fractional part (maybe absent, by default is 2).
For Bulgarian Language (BG_BG)
"Lev, Lev, m, Stoting, Stottics, F, 2", where:
"Lev, Lev, M" - subject of calculation:
lion is the only number of the whole part
lev - multiple number of integer part,
m - the genus of the whole part
"Stoting, Stottics, F" - fractional part:
stoting - the only number of fractional part,
stottics - multiple part of the fractional part,
w - genus fractional part,

For Romanian Language (Ro_ro)
"LEU, LEI, M, BAN, BANI, W, 2"
"LEU, LEI, M" - subject of calculus:
lEU is the only number of the whole part
lEI - multiple number of integer part
M - the genus of the whole part
"Ban, Bani, W" - fractional part:
bAN is the only number of fractional part,
bANI is a plural of fractional part,
W - born of fractional part,
"2" - the number of discharges of the fractional part.
For Georgian Language (KA_GE)
"ლარი, თეთრი, 2"
ლარი - Whole part
თეთრი - fractional part
"2" - the number of discharges of the fractional part.
For Vietnamese Language (VI_VN)
"DONG, XU, 2"
dONG, - Whole part
xU, - fractional part
2 - the number of splits of the fractional part.
........
Default value: empty string
Return value:
Type: Row. Presentation of a number in words.
Description:
Generates the representation of the number in words in accordance with the specified format string and the object parameters is calculated

When displaying various reports, it is often necessary to convert a numeric value into a string in words. In 1C, it is solved very simply: for this, the function of nigalopropisus () is provided.

When forming a number in words, there is an opportunity number to withdraw another and subject to calculate this number in the required childbirth and case. Object calculus - This is what measures the transformed number, for example, money, drawers, wagons, TVs, etc.

  • Without an object of calculation:
    • Twenty two;
    • Three hundred eighty four.
  • With the subject of calculation:
    • Thirty-eight dangles;
    • Twelve ships;
    • Two houses.

Examples

To begin with, we give examples of the transformation to find out the features of 1C:

// ***** Output numbers: ***** Nigalopropisus (9876.54); // nine thousand eight hundred seventy six 54 Nipperropisus (1234.56, "l \u003d ru_en; dp \u003d truth", "A whole, whole, whole, f, soy, hundredth, hundredths, w, 2"); // One thousand two hundred thirty four whole fifty six hundredths Nipperropisus (7432, "l \u003d ru_en; np \u003d lies", ", 0"); // seven thousand four hundred thirty two // ***** The output of money: ***** Nipperropisus (9845.11, "l \u003d ru_en",); // nine thousand eight hundred forty five rubles 11 kopecks Nipperropisus (2845.11, "l \u003d ru_en; dp \u003d truth", "Ruble, rubles, rubles, m, kopeck, penny, kopecks, g, 2"); // two thousand eight hundred forty five rubles eleven kopecks Nipperropisus (555.16, "l \u003d ru_en; dp \u003d truth", "Dollar, dollar, dollars, m, cent, cents, cents, m, 2"); // five hundred fifty five dollars sixteen cents Nipperropisus (453.23, "l \u003d ru_en; dp \u003d truth", "Euro, euro, euro, m, cent, cents, cents, m, 2"); // four hundred fifty-three euros twenty three cents Nipperropisus (812.44, "l \u003d en_us; dp \u003d truth", "Dollar, Dollars, Cent, Cents, 2"); // EIGHT HUNDRED TWELVE DOLLARS FORTY FOUR CENTS Nipperropisus (3945.76, "l \u003d en_us; dp \u003d truth", "euro, euros, cent, cents, 2"); Three Thouusand Nine Hundred Forty Five Euros Seventy Six Cents // ***** You can convert not only cash units: ***** Nipperropisus (535, "l \u003d ru_en", "Box, boxes, boxes, w, g, 0"); // five hundred thirty five boxes Nipperropisus (342, "l \u003d ru_en", "TV, TV, TV, m, m, 0"); // three hundred forty two TVs

Description of working with function

As we found out, a function is used to obtain a number of registration.

Nipperropisus (< Число >, < Formatrock>, < Parametentations>)

The function returns a string value. As input parameters are transmitted:

  • The number is the transformed value;
  • Formatting - formatting parameters:
    • L - localization code (for example, u_ru - Russian; en_US - English, de_de - German). The default operating system settings are used.
    • NP - display the name of the calculus, by default - truth.
    • ND - withdraw the name of decimal parts of the calculus, default - truth.
    • DP - fractional part with in words / Number, default - lie.
    • AI - Display Union and. Analyzed only for English-speaking localization. Possible values: "Understand", "Use".
  • Parametentation options - transfer through the comma of the calculus object parameters. The format depends on localization.

For the Russian language, calculus object parameters have the form "Ruble, Ruble, rubles, m, a penny, a penny, kopecks, F, 2", where:

  • ruble - the only number of nominal case;
  • ruble - the only number of genitive case;
    rubles - a plural of genitive case;
    M - Male Rod (W - Female Rod, C - Middle Rod);
    "Kopeck, a penny, kopecks, w" - a fractional part, similar to the subject of calculus (may be absent);
    "2" - the number of discharge parts (may be absent, by default is 2).

Use in typical solutions

In configurations built on, in the general module WorkerCursamivatut There is a function

FORMUMUMUPROPISE(Summary, currency, Displays ammubesqueek \u003d False)

The function is used to convert currency sums in the string in words.

Code 1c v 8.x
// Example of a format string for the output of the number in words in Russian
// Language, with the conclusion of the whole and fractional part in words and conclusion
// Object calculus.
FORMSTROK \u003d "L \u003d RU_RU; DP \u003d truth";
Parpredmet \u003d "Dollar, dollar, dollars, m, cent, cents, cents, m, 2";
Risked \u003d nipperropisid (2341.56, formstere, parpredmet);
// Calculation result: "Two thousand three hundred forty-one dollar fifty six cents"

Nullopropisus (number, format string, calculus object parameters)

The number is the number you want to convert to the line in words.

The format string is a string value that includes formatting parameters. Formatting parameters are listed through the symbol ";" (semicolon). If the parameter is not specified, the default parameter is used.
Each parameter is set by the parameter name, the character "\u003d" (equal) and the parameter value. The parameter value may be indicated in single or double quotes. This is necessary if the value of the parameter contains the characters used in the syntax of the format string.
L (L) - localization code. The default location code installed in the operating system is used. Examples of localization codes: RU_RU - Russian (Russia); EN_US - English (USA).
NP (SN) - include / do not include the name of the calculus (boolean), the default is true.
ND (Fn) - include / do not include the name of the decimal parts of the calculus object (Boolean), the default is truth.
DP (FS) - a fractional part to withdraw in words / Number (Boolean), the default is a lie.

Object parameters - is a string value that defines the parameters of the calculus object. The calculus object parameters are listed through "," (comma). The format of the string depends on the localization code.
For Russian and Belarusian languages \u200b\u200b(RU_RU, BE_BY)
"Ruble, rubles, rubles, m, penny, penny, kopecks, g, 2", where:
"Ruble, rubles, rubles, M" - subject of calculation:
Ruble - the only number of identity case,
Ruble - the only number of the genitive case,
rubles - a plural of genitive case,


For the Ukrainian language (UK_UA)
"hryvnia, hryvnia, hryvnia, m, penny, penny, kopecks, g, 2", where:
"Hryvnia, Grivna, Grieving, M" - a subject of calculation:
"Hryvnia is the only number of nominal case,
hryvnia - the only number of genitive pelvis,
hryvnia - multiple number of genitive case
M - Male Rod (W - Female Rod, C - Middle Rod);
"Kopeck, a penny, kopecks, g" - a fractional part, similar to the subject of calculus (may be absent);
"2" - the number of discharge parts (may be absent, by default is 2).
For Polish Language (PL_PL)
z? oty, z? ote, z? Otych, M, Grosz, Grosze, Groszy, M, 2
Where:
"z? Oty, z? Oote, z? Otych, M" - a matter of calculation (M - Male genus,? - Women's race ,? - Middle Rod, Mo - Personal Male Rod)
z? oty - the only number of nominative case
z? ote - the only number of accusative case
z? otych - plural accusative case
M - Male Rod (? - Female Rod,? - Middle Rod, Mo - Personal Male Rod)
"Grosz, Grosze, Groszy, M" - fractional part (may be absent) (similar to the whole part)
2 - the number of splits of the fractional part (maybe absent, by default is 2)
Code 1c v 8.x
Passaging \u003d nullopropic (1832, "l \u003d pl_pl; Sn \u003d true; fn \u003d true; fs \u003d true", "z? Oty, z? Ote, z? Otych, M, Grosz, Grosze, Groszy, M, 2") ;

For English, Finnish and Kazakh languages \u200b\u200b(en_us, fi_fi, kk_kz)
"Dollar, Dollars, Cent, Cents, 2", where:
"Dollar, Dollars" is an object of calculation in the only and multiple number;
"Cent, Cents" - the fractional part in the only and multiple number (may be absent);
"2" - the number of discharge parts (may be absent, by default is 2).
For German (de_de)
"EURO, EURO, M, CENT, CENT, M, 2", where:
"Euro, Euro, M" - subject of calculus:
Euro, EURO is the subject of calculation in the only and multiple number;
M - Male Rod (F - Female Rod, N - Middle Rod);
"CENT, CENT, M" - a fractional part, similar to the subject of calculus (may be absent);
"2" - the number of discharge parts (may be absent, by default is 2).

Examples:
Code 1c v 8.x x \u003d numbrope (123456.78, "DP \u003d truth", "ton, tons, tons, f, kg., Kg., Kg., M, 3");
// X \u003d "One hundred twenty three thousand four hundred fifty six tons seven hundred eighty kg."

X \u003d namillopropisid (123456.78, ", 0");
// x \u003d "one hundred twenty three thousand four hundred fifty seven"

X \u003d numbrope (123456.78, ", 2");
// X \u003d "One hundred twenty three thousand four hundred fifty six 78"

X \u003d numbrope (123456.78, "L \u003d ru_en; dp \u003d lies", "ruble, rubles, rubles, m, penny, penny, kopecks, g");
// X \u003d "One hundred twenty three thousand four hundred fifty six rubles 78 kopecks"

X \u003d nipperropisid (123456.78, "l \u003d ru_en; dp \u003d truth", "dollar, dollar, dollars, m, cent, cents, cents, m, 2");
// X \u003d "One hundred twenty three thousand four hundred fifty six dollars seventy eight cents"

Nipperropisus (1457.25, "l \u003d en_us", "Dollar, Dollars, Cent, Cents, 2");
// One Thousand Four Hundreds Fifty Seven Dollars 25 Cents.

According to current legislation, payment documents and financial reports must contain the final sums prescribed by the words. In the accounting program 1C number in words Can be obtained using a special function in a global context. The specialist sets the necessary parameters in the format string and at the output in the document receives a number in words. Action algorithm is the same for all configurations 1C enterprise.

The main components of the algorithm

In order to properly arrange the number with capital letters, it is necessary to understand the meaning of all components of the scheme. Main factors:

  1. The number is a set of numbers to be converted to words;
  1. The format string is a place in the program to set the necessary language parameters. There are also prescribed the requirements of the fractional part. Composite elements are indicated through a semicolon;

Format lines:

  • Localization code is denoted by the letter L (L). It can be changed independently by specifying the necessary language;
  • Reproduce / do not reproduce the name of the units of measurement (ND \u003d false or truth);
  • Reproduce / do not reproduce fractional parts of the amount (dp \u003d lies or truth);
  1. Object parameters are an exact description of the amount of measurement units that need to be written in words. For example, ruble, dollar, penny.

Important. All elements of the scheme should be prescribed as accurately as possible. Redescribe the correctness of the input data can be in the assistant syntax.

How to register the output scheme of numbers in words

Record 1C number in the words can be in such a scheme: null strength (number, "format string", "Object parameters"), where

The number is a set of numbers, for example, 2358,879.

The format string is the name of the language and the method of displaying the number. In Russian it will look like this: l \u003d ru_ru. If the fractional part should be spelled out by words, indicate DP \u003d truth. By default, this indicator is switched to a lie.

Object parameters - Name of the unit of measurement in all cases indicating the genus. For example, the ruble of a male race, a penny - female. Denotee "M" and "F".

The parameters are indicated in quotes and are written through a comma. For the Russian language, the scheme will look like this: numbroind (2358.879, "L \u003d ru_en; dp \u003d truth", "ruble, rubles, rubles, m, penny, penny, kopecks, g, 3") In this case, the number 3 means decimal places.

This method is not suitable if the exact number of decimal characters is not known. In order to simplify the task, the suma and currency representation use. As a rule, in such situations it is customary to leave two digits after the comma.

How to register the scheme

In order to properly give a task program for execution, you need to do the following steps:

  1. At the first stage, determine the desired language encoding. Most popular in Russia:
  • English - EN_US;
  • Russian - L \u003d RU_RU.
  1. Next, the type of units of measurement and fractional part is given (ND, DP);
  1. When preparing documents, it may be necessary to bring the amount in rubles in English or by turnover, write the words of the dollar, the euro in Russian. For this, the currency name is prescribed in detail in all cases indicating the genus.

Object parameters in different languages.

Next, 1C amount will be collected in different languages \u200b\u200baccording to the standard scheme. At the exit, it turns out a document with the final amount prescribed by the words. For example, you need to create a financial document in the program 1C for foreign partners, which speak English. Currency - euro. The scheme will look like this: nullopropic (10 125.67, "l \u003d en_us; dp \u003d truth", "Euro, Euros, EuroCent, EuroCents, 2")

Council. Storing the design data is not necessary. They are all standard, only the parameters of the subject are changing. Therefore, it is better to prepare templates in advance and use them as a crib.

Parameters:

<Значение>

Formatable value.

<ФорматнаяСтрока>

The format string is a string value that includes formatting parameters.

Formatting parameters are listed through the ";" symbol. The presence of a parameter means the difference between the formatting from the standard one.

If the parameter is not specified, the standard formatting is applied, which basically corresponds to the conversion of the value to the string. However, for the values \u200b\u200bof the type and the default date (0 and 01.0001, 00:00:00, respectively) an empty string will be issued.

Each parameter is set by the parameter name, the "\u003d" symbol and the value of the parameter. The parameter value may be indicated in single or double quotes. This is necessary if the value of the parameter contains the characters used in the syntax of the format string.

Inside the value of the parameter, arbitrary characters may be indicated, which when generating the resulting string will be displayed as it is. Thus, for example, you can specify clock separators, minutes and seconds when formatting time. If these characters are coincided with the values \u200b\u200bof the format lines, they must be concluded in single quotes.

Names and values \u200b\u200bof the parameters of the format string:

  • L - the name of the language, countries for which standard formatting will be performed.
  • CHC is the total number of decimal discharges of the whole and fractional parts. The initial number is rounded in accordance with the rounding rules. If this parameter is specified, then to display the fractional part of the number, it is necessary to specify the CDC parameter, otherwise the fractional part will not be displayed.
  • CDC is the number of decimal discharges in the fractional part. The initial number is rounded in accordance with the rounding rules.
  • Emergencies - Discharge shift: Positive - division, negative - multiplication. In other words, this means that the initial number will be multiplied or divided by 10 * C, where C is the value of the module parameter.
  • PSD - a symbol-separator of a whole and fractional part.
  • ЧHG - symbol-separator of groups of the whole number. If you use an empty string as a separator, then in this case the separator will be a symbol of an inseparable space.
  • CN - a string representing the zero value of the number. If not specified, the representation in the form of an empty string. If "CN \u003d" is specified, then in the form "0". Not used for numeric input fields.
  • CHVN - whether to remove the leading zeros. The value of this parameter is not specified, the result of the parameter determines the output of the leading zeros.
  • CHG - order of grouping of the digits of the number. As a value, numbers are indicated, through the comma, denoting the number of grouped discharges to the right left. It makes sense only the first two numbers. The first of them indicates the primary grouping, that is, the one that will be used for the least significant discharges of the whole part of the number. If the second number is not specified, only the least significant discharges will be grouped. If 0 is set as a second number, then the value specified for the primary group will be applied for all categories of the number. If a value other than 0 is used as a second number, this value will be used to group all discharges, except for the already grouped least significant.
  • Cho - representation of negative numbers.
    • 0 (0) - string of the form "(1,1)";
    • 1 (1) - a string of the type "-1.1";
    • 2 (2) - a string of the type "- 1.1";
    • 3 (3) - a string of the type "1,1";
    • 4 (4) - a string of the type "1.1 -".
  • DF - date format.
    • d - day of the month (numbers) without a leading zero;
    • dD - day of the month (numbers) with a leading zero;
    • dDD - brief name of the day of the week;
    • duddd-full name of the day of the week;
    • M - number of the month (numbers) without a leading zero;
    • Mm - number of the month (numbers) with a leading zero;
    • Mmm - brief name of the month;
    • Mmmm - the full name of the month;
    • to - the quarter number in the year;
    • m - number of the year without a century and leading zero;
    • gG - number of the year without a century with a leading zero;
    • yyyg - number of the year with a century;
    • h - an hour at 12 o'clock without leading zeros;
    • cC - hour at 12 o'clock with a leading zero;
    • H - an hour in 24 hour variant without leading zeros;
    • CC (HH) - an hour in 24 hour variant with the leading zero;
    • m - minute without a leading zero;
    • mm - minute with a leading zero;
    • c - second without leading zero;
    • sS - second with a leading zero;
    • bB - Display half of the day AM / PM (valid only for configuration languages \u200b\u200bthat support the 12-hour version of the time representation).
  • DLF - local date format. This indicates the display of the dates parts.
    • D - date (numbers);
    • DD - a long date (in words);
    • In - full time, the date can be combined with time;
    • DV - date time.
  • DP - a string representing an empty date (for example, the format ("00010101000000", "dp \u003d" "empty date" "") will return the string "empty date").
  • Bl - string representing a logical value False.
  • Bi - a string representing a logical value True.