Global context
NumberInWords
Syntax:
NumberIn words(<Число>, <Форматная строка>, <Параметры предмета исчисления>)
Options:
<Число>(required)
Type: Number. The number to be converted to a written string.
<Форматная строка>(optional)
Type: String. A format string is a string value that includes formatting options. Formatting options are listed separated by the ";" symbol. (semicolon). If a parameter is not specified, the parameter's default value is used.
Each parameter is specified by the parameter name, the "=" (equals) symbol, and the value of the parameter. The parameter value can be specified in single or double quotes. This is necessary if the parameter value contains characters used in format string syntax.
L (L) - Localization code. The default localization code is set to operating system. Examples of localization codes: ru_RU - Russian (Russia); en_US - English (USA).
NP (SN) - Include/do not include the name of the subject of calculus (Boolean), by default - True.
ND (FN) - Include/do not include the name of the decimal parts of the subject of calculus (Boolean), by default - True.
DP (FS) - Display the fractional part in words/numbers (Boolean), by default - False.
<Параметры предмета исчисления>(optional)
Type: String. Represents a string value that defines the parameters of the subject of calculus. Calculus subject parameters are listed separated by "," (comma). The string format depends on the localization code.
For Russian and Belarusian languages ​​(ru_RU, be_BY)
"ruble, ruble, ruble, m, kopeck, kopeck, kopeck, w, 2", where:
“ruble, ruble, rubles, m” – subject of calculation:
ruble – singular nominative case,
ruble – singular Genitive,
rubles – plural genitive case,


For Ukrainian language (uk_UA)
"hryvnia, hryvnia, hryvnia, m, kopeck, kopeck, kopeck, w, 2", where:
“hryvnia, hryvnia, hryvnia, m” – subject of calculation:
"hryvnia – singular nominative case,
hryvnia – singular genitive case,
hryvnia – plural genitive case,
m – masculine (w – feminine, s – neuter);
"kopeck, kopeck, kopeck, w" – fraction, similar to the subject of calculus (may be absent);
"2" – number of digits of the fractional part (may be absent, default is 2).
For Polish (pl_PL)
złoty, złote, złotych, m, grosz, grosze, groszy, m, 2
Where:
"złoty, złote, złotych, m" - subject of calculation (m - masculine, ż - feminine, ń - neuter, mo - personal masculine)
złoty - singular nominative case
złote - singular accusative case
złotych - plural accusative
m - masculine (ż - feminine, ń - neuter, mo - personal masculine)
"grosz, grosze, groszy, m" - fractional part (may be absent) (similar to the integer part)
2 - number of digits of the fractional part (may be absent, default is 2)
Example:
In words = NumberIn words(1832, “L=pl_PL;SN=true;FN=true;FS=true”, “złoty, złote, złotych, m, grosz, grosze, groszy, m, 2”);
For English, Finnish and Kazakh languages ​​(en_US, fi_FI, kk_KZ)
"dollar, dollars, cent, cents, 2", where:
"dollar, dollars" – subject of calculation in singular and plural;
"cent, cents" – fractional part in singular and plural (may be absent);
"2" – number of digits of the fractional part (may be absent, default is 2).
For German (de_DE)
"EURO, EURO, M, Cent, Cent, M, 2", where:
"EURO, EURO, M" – subject of calculation:
EURO, EURO – subject of calculation in singular and plural;
M – masculine (F – feminine, N – neuter);
“Cent, Cent, M” – fractional part, similar to the subject of calculus (may be absent);
"2" – number of digits of the fractional part (may be absent, 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 in 1, except 11
lati – for numbers ending in 2-9 and 11
latu – plural (genitive case) is used after the numerals 0, 10, 20,..., 90, 100, 200, ..., 1000, ..., 100000,
v – masculine (s – feminine);
“santīms, santīmi, santīmu, V” – fractional part, similar to the subject of calculus (may be absent);
"2" – number of digits of the fractional part (may be absent, default is 2);
"J" - the number 100 is displayed as "One hundred" for the subject of calculus (N - as "One hundred"),
may be absent, defaults to "J";
"J" - the number 100 is displayed as "One hundred" for the fractional part (N - as "One hundred"),
may be absent, defaults to "J".
For Lithuanian language (lt_LT)
"litas, litai, litų, M, centas, centai, centų, M, 2", where:
"litas, litai, litų, M" – subject of calculation:
litas - singular number of the integer part,
litai - plural of the integer part from 2 to 9,
litų - plural of the integer part others,
m - gender of the integer part (f - feminine gender),
“centas, centai, centų, M” – fractional part, similar to the subject of calculus (may be absent);
"2" - the number of digits of the fractional part (may be absent, default is 2).
For Estonian language (et_EE)
"kroon, krooni, sent, senti, 2", where:
"kroon, krooni" – – subject of counting in singular and plural;
"sent, senti" – fractional part in singular and plural (may be absent);
2 – number of digits of the fractional part (may be absent, default is 2).
For Bulgarian (bg_BG)
"lev, leva, m, stotinka, stotinki, w, 2", where:
“lev, leva, m” – subject of calculation:
lion is the singular number of the integer part,
leva - plural of an integer part,
m - genus of the whole part,
"stotinka, stotinki, zh" - fractional part:
stotinka is the singular number of the fractional part,
stotinki - plural of the fractional part,
g - genus of the fractional part,

For Romanian language (ro_RO)
"leu, lei, M, ban, bani, W, 2"
"leu, lei, M" – subject of calculus:
leu is the singular number of the integer part,
lei - plural of an integer part,
M is the genus of the integer part,
"ban, bani, W" - fractional part:
ban is the singular number of the fractional part,
bani - plural of the fractional part,
W - genus of the fractional part,
"2" - the number of digits of the fractional part.
For Georgian language (ka_GE)
"ლარი, თეთრი, 2"
ლარი - whole part
თეთრი - fractional part
"2" - the number of digits of the fractional part.
For Vietnamese language (vi_VN)
"dong, xu, 2"
dong, - whole part
xu, - fractional part
2 - the number of digits of the fractional part.
........
Default value: Empty string
Return value:
Type: String. Representation of numbers in words.
Description:
Forms a representation of a number in words in accordance with the specified format string and parameters of the subject calculated

Code 1C v 8.x
// An example of a format string for displaying a number in words in Russian
// language, with the output of the integer and fractional parts in words and output
// subject of calculus.
FormString = "L = ru_RU; DP = True";
ItemPar="dollar,dollar,dollars,m,cent,cent,cents,m,2";
Numbers in Words = Number in Words(2341.56, FormString, ItemPart);
// Calculation result: "Two thousand three hundred forty-one dollars fifty-six cents"

NumberIn words(Number, Format string, Calculus subject parameters)

Number - The number that needs to be converted to a string in words.

A format string is a string value that includes formatting options. Formatting options are listed separated by the ";" symbol. (semicolon). If a parameter is not specified, the parameter's default value is used.
Each parameter is specified by the parameter name, the "=" (equals) symbol, and the value of the parameter. The parameter value can be specified in single or double quotes. This is necessary if the parameter value contains characters used in format string syntax.
L (L) - Localization code. By default, the localization 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 subject of calculus (Boolean), by default - True.
ND (FN) - Include/do not include the name of the decimal parts of the subject of calculus (Boolean), by default - True.
DP (FS) - Display the fractional part in words/numbers (Boolean), by default - False.

Calculus subject parameters - Represents a string value that defines the parameters of the calculus subject. Calculus subject parameters are listed separated by "," (comma). The string format depends on the localization code.
For Russian and Belarusian languages ​​(ru_RU, be_BY)
"ruble, ruble, ruble, m, kopeck, kopeck, kopeck, w, 2", where:
"ruble, ruble, rubles, m" - subject of calculation:
ruble - singular nominative case,
ruble - singular genitive case,
rubles - plural genitive case,



For Ukrainian language (uk_UA)
"hryvnia, hryvnia, hryvnia, m, kopeck, kopeck, kopeck, w, 2", where:
"hryvnia, hryvnia, hryvnia, m" - subject of calculation:
"hryvnia - singular nominative case,
hryvnia - singular genitive case,
hryvnia - plural genitive case,
m - masculine (w - feminine, s - neuter);
“kopeck, kopeck, kopeck, zh” - fractional part, similar to the subject of calculus (may be absent);
"2" - the number of digits of the fractional part (may be absent, default is 2).
For Polish (pl_PL)
z?oty, z?ote, z?otych, m, grosz, grosze, groszy, m, 2
Where:
"z?oty, z?ote, z?otych, m" - subject of calculation (m - masculine, ? - feminine, ? - neuter, mo - personal masculine)
z?oty - singular nominative case
z?ote - singular accusative
z?otych - plural accusative
m - masculine (? - feminine, ? - neuter, mo - personal masculine)
"grosz, grosze, groszy, m" - fractional part (may be absent) (similar to the integer part)
2 - number of digits of the fractional part (may be absent, default is 2)
Code 1C v 8.x
In words = NumberIn words(1832, “L=pl_PL;SN=true;FN=true;FS=true”, “z?oty, z?ote, z?otych, m, grosz, grosze, groszy, m, 2”) ;

For English, Finnish and Kazakh languages ​​(en_US, fi_FI, kk_KZ)
"dollar, dollars, cent, cents, 2", where:
"dollar, dollars" - subject of calculation in singular and plural;
"cent, cents" - fractional part in singular and plural (may be absent);
"2" - the number of digits of the fractional part (may be absent, default is 2).
For German (de_DE)
"EURO, EURO, M, Cent, Cent, M, 2", where:
"EURO, EURO, M" - subject of calculation:
EURO, EURO - subject of calculation in singular and plural;
M - masculine (F - feminine, N - neuter);
"Cent, Cent, M" - fractional part, similar to the subject of calculus (may be absent);
"2" - the number of digits of the fractional part (may be absent, default is 2).

Examples:
Code 1C v 8.x x = Number in words (123456.78,"DP=True","ton, tons, tons, f, kg., kg., kg., m, 3");
//x = "One hundred twenty-three thousand four hundred fifty-six tons seven hundred eighty kg."

X = NumberIn Word(123456.78,",0");
//x = "One hundred twenty-three thousand four hundred fifty-seven"

X = NumberIn Word(123456.78,",2");
//x = "One hundred twenty-three thousand four hundred fifty-six 78 "

X = NumberIn words(123456.78,"L=ru_RU; DP=False","ruble, ruble, rubles, m, kopeck, kopeck, kopeck, w");
//x = "One hundred twenty-three thousand four hundred fifty-six rubles 78 kopecks"

X = NumberIn Words(123456.78, "L = ru_RU; DP = True", "dollar,dollar,dollars,m,cent,cent,cents,m,2");
//x = "One hundred twenty-three thousand four hundred fifty-six dollars seventy-eight cents"

Information taken from the site

Type: Number; Date of; Boolean. The value to be formatted.<ФорматнаяСтрока> (optional) Type: String. A format string is a string value that includes formatting options. Formatting options are listed separated by the “;” symbol. The presence of a parameter means that the formatting differs from the standard one. If the parameter is not specified, then standard formatting is applied, which basically corresponds to converting the value to a string. However, for values ​​of type Number and Date, the default value (0 and 01/01/0001 00:00:00, respectively) will return an empty string. Each parameter is specified by the parameter name, the "=" symbol, and the parameter value. The parameter value can be specified in single or double quotes. This is necessary if the parameter value contains characters used in format string syntax. Arbitrary characters can be specified inside the parameter value, which will be displayed as is when generating the resulting string. This way, for example, you can specify hour, minute, and second separators when formatting time. If these characters match format string values, they must be enclosed in single quotes. Names and values ​​of format string parameters: L (L) - name of the language, country for which standard formatting will be performed. Available language names are located after the format string description. ND - the total number of decimal places displayed for both the integer and fractional parts. The original number is rounded in accordance with the rounding rules Okr15as20. If this parameter is specified, then to display the fractional part of a number, it is necessary to specify the NPV parameter, otherwise the fractional part will not be displayed. NFD - the number of decimal places in the fractional part. The original number is rounded in accordance with the rounding rules Okr15as20. ChS (NS) - shift of digits: positive - division, negative - multiplication. In other words, this means that the original number will be multiplied or divided by 10*C, where C is the absolute value of the parameter. NDS is a symbol that separates the integer and fractional parts. CHRG (NGS) is a group separator symbol for an integer part of a number. If you use an empty string as a delimiter, then the delimiter will be a non-breaking space character. NZ (NZ) is a string representing the zero value of a number. If not specified, then represented as an empty string. If “CHN=” is specified, then in the form “0”. Not used for numeric input fields. CHN (NLZ) - whether leading zeros should be output. The value of this parameter is not specified; the presence of the parameter itself determines the output of leading zeros. CHG (NG) - the order of grouping the digits of a number. The values ​​are numbers, separated by commas, indicating the number of grouped digits from right to left. Only the first two numbers make sense. The first of these indicates the primary grouping, that is, the one that will be used for the least significant digits of the integer part of the number. If the second number is not specified, only the least significant digits will be grouped. If 0 is specified as the second number, then for all digits of the integer part of the number the value specified for the primary grouping will be applied. If a value other than 0 is used as the second number, then this value will be used to group all digits except the least significant ones already grouped. CHO (NN) is a representation of negative numbers. 0 (0) — a string like “(1,1)”; 1 (1) — a string like “-1,1”; 2 (2) — a string of the form “- 1,1”; 3 (3) — a string of the form “1,1-“; 4 (4) — a string of the form “1,1 -“. DF (DF) - date format. d (d) — day of the month (in numbers) without leading zero; dd (dd) — day of the month (in numbers) with a leading zero; ddd (ddd) - short name of the day of the week *); dddd (dddd) - full name of the day of the week *); М (M) — month number (in numbers) without leading zero; MM (MM) - month number (in numbers) with a leading zero; MMM (MMM) - short name of the month *); MMMM (MMMM) - full name of the month *); k (q) - number of the quarter in the year; g (y) — year number without century and leading zero; yy (yy) - number of the year without a century with a leading zero; yyyy (yyyy) - year number with century; h (h) — hour in the 12-hour version without leading zeros; hh (hh) — hour in the 12-hour version with a leading zero; H (H) — hour in 24-hour format without leading zeros; HH (HH) — hour in 24-hour mode with a leading zero; m (m) — minute without leading zero; mm (mm) — minute with leading zero; s (s) — second without a leading zero; ss (ss) — second with a leading zero; bb (tt) - display half of the day AM/PM (valid only for configuration languages ​​that support the 12-hour time display option). Note: *) - is not used for the format string of the date entry field. DLF is a local date format. Specifies the option for displaying date parts. D (D) - date (in numbers); DD (DD) - long date (month in words); B (T) - full time, date can be combined with time; DT - date time. Example: the expression Format('20051120140323',"DLF=DDV") has the value "November 20, 2005 14:03:23". Important! Order of format string options for DLF<дата + время>(DV or DDV) cannot be changed. DP (DE) - a string representing an empty date (for example, Format('00010101000000' ,"DP=""empty date""") will return the string "empty date"). BL (BF) - a string representing boolean value Lie. BI (BT) is a string representing the logical value True. Note. Using parameters for the input field: the DP (DE) parameter is not used; the DLF parameter is used only with the D (D), B (T) and DV (DT) values. Return value: Type: String. The string resulting from formatting the passed value. Description: Generates an easy-to-read representation of values. Useful for use in reports and other visual displays of values. Availability: Thin client, web client, server, thick client, external connection, mobile application (client), mobile application (server). List of languages: af Afrikaans af_NA (af_NA) Afrikaans (Namibia) af_ZA Afrikaans (South Africa) am Amharic am_ET Amharic (Ethiopia) ar Arabic ar_AE Arabic (United Arab Emirates) ar_BH Arabic (Bahrain) ar_DZ Arabic (Algeria) ar_EG Arabic (Egypt) ar_IQ Arabic (Iraq) ar_JO Arabic (Jordan) ar_KW Arabic (Kuwait) ar_LB Arabic (Lebanon) ar_LY Arabic (Libya) ar_MA Arabic (Morocco) ar_OM Arabic (Oman) ar_QA Arabic (Qatar) ar_SA Arabic (Saudi Arabia) ar_SD Arabic (C udan ) ar_SY Arabic (Syria) ar_TN Arabic (Tunisia) ar_YE Arabic (Yemen) as Assamese as_IN Assamese (India) az Azerbaijani az_AZ Azerbaijani (Azerbaijan) az_Cyrl Azerbaijani (Cyrillic) az_Cyrl_AZ Azerbaijani (Cyrillic, Azerbaijan) az_Latn Azerbaijan Chinese (Latin) az_Latn_AZ Azerbaijani ( Latin, Azerbaijan) be Belarusian be_BY Belarusian (Belarus) bg Bulgarian bg_BG Bulgarian (Bulgaria) bn Bengali bn_IN Bengali (India) ca Catalan ca_ES Catalan (Spain) cs Czech cs_CZ Czech (Czech Republic) cy Welsh cy_GB Welsh (United Kingdom) da Danish da_ DK Danish (Denmark) de German de_AT German (Austria) de_BE German (Belgium) de_CH German (Switzerland) de_DE German (Germany) de_LI (de_LI) German (Liechtenstein) de_LU German (Luxembourg) el Greek el_CY (el_CY) Greek (Cyprus) el_GR Greek (Greece) en English en_AU English (Australia) en_BE English (Belgium) en_BW English (Botswana) en_BZ (en_BZ) English (Belize) en_CA English (Canada) en_GB English (UK) en_HK English (Hong Kong, (Special Administrative Region) , China)) en_IE English (Ireland) en_IN English (India) en_JM (en_JM) English (Jamaica) en_MH (en_MH) English (Marshall Islands) en_MT English (Malta) en_NA (en_NA) English (Namibia) en_NZ English (New Zealand) en_PH English (Philippines) en_PK English (Pakistan) en_SG English (Singapore) en_TT (en_TT) English (Trinidad and Tobago) en_US English (United States of America) en_VI English (US Virgin Islands) en_ZA English (South Africa) en_ZW English (Zimbabwe) es Spanish es_AR Spanish (Argentina) es_BO Spanish (Bolivia) es_CL Spanish (Chile) es_CO Spanish (Colombia) es_CR Spanish (Costa Rica) es_DO Spanish (Dominican Republic) es_EC Spanish (Ecuador) es_ES Spanish (Spain) es_GT Spanish (Guatemala) ES_HN Spanish (Honduras) ES_MX Spanish (Mexico) Es_ni Spanish (Nicaragua) ES_PA Spanish (Panama) ES_PE Spanish (Peru) ES_PR Spanish (Puerto-Rica) Es_Py Spanish (Paraguay) Es_SV Spanish (Salvador) Es_S Spanish (United States) Es_Uy Spanish (Uruguay) es_VE Spanish (Venezuela) et Estonian et_EE Estonian (Estonia) eu Basque eu_ES Basque (Spain) fa Persian fa_AF Persian (Afghanistan) fa_IR Persian (Iran) fi Finnish fi_FI Finnish (Finland) fo Faroese fo_FO Faroese (Faroe Islands) fr French fr_BE French (Belgium) fr_CA French (Canada) fr_CH French (Switzerland) fr_FR French (France) fr_LU French (Luxembourg) fr_MC (fr_MC) French (Monaco) fr_SN (fr_SN) French (Senegal) ga Irish ga_IE Irish (Ireland) gl Galician gl_ES, Galician (Spain) gu Guarati gu_IN Guarati (India) he Hebrew he_IL Hebrew (Israel) hi Hindi hi_IN Hindi (India) hr Croatian hr_HR Croatian (Croatia) hu Hungarian hu_HU Hungarian (Hungary) hy Armenian hy_AM Armenian (Armenia) ) hy_AM_REVISED Armenian (Armenia, REVISED) id Indonesian id_ID Indonesian (Indonesia) is Icelandic is_IS Icelandic (Iceland) it Italian it_CH, Italian (Switzerland) it_IT Italian (Italy) ja Japanese ja_JP Japanese (Japan) ka Georgian ka_GE Georgian (Georgia) kk Kaza xsky kk_KZ Kazakh (Kazakhstan) kl Greenlandic kl_GL Greenlandic (Greenland) kn Kannada kn_IN Kannada (India) ko Korean ko_KR Korean (South Korea) kok Konkani kok_IN Konkani (India) ky Kyrgyz ky_KY Kyrgyz (Kyrgyzstan) lt Lithuanian lt_LT Lithuanian (Lithuanian) va) lv Latvian lv_LV Latvian (Latvia) mk Macedonian mk_MK Macedonian (Macedonia) ml Malayalam ml_IN Malayalam (India) mr Marathi mr_IN Marathi (India) ms Malay ms_BN Malay (Brunei) ms_MY Malay (Malaysia) mt Maltese mt_MT Maltese (Malta) nb Norwegian

Options:

<Значение>

The value to be formatted.

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

A format string is a string value that includes formatting options.

Formatting options are listed separated by the ";" symbol. The presence of a parameter means that the formatting differs from the standard one.

If the parameter is not specified, then standard formatting is applied, which basically corresponds to converting the value to a string. However, for values ​​of type Number and Date, the default value (0 and 01/01/0001 00:00:00, respectively) will return an empty string.

Each parameter is specified by the parameter name, the "=" character, and the parameter value. The parameter value can be specified in single or double quotes. This is necessary if the parameter value contains characters used in format string syntax.

Arbitrary characters can be specified inside the parameter value, which will be displayed as is when generating the resulting string. This way, for example, you can specify hour, minute, and second separators when formatting time. If these characters match format string values, they must be enclosed in single quotes.

Names and values ​​of format string parameters:

  • L - name of the language, country for which standard formatting will be performed.
  • CC - the total number of displayed decimal places of the integer and fractional parts. The original number is rounded in accordance with the rounding rules. If this parameter is specified, then to display the fractional part of a number, it is necessary to specify the NPV parameter, otherwise the fractional part will not be displayed.
  • NDT - the number of decimal places in the fractional part. The original number is rounded in accordance with the rounding rules.
  • ES - shift of digits: positive - division, negative - multiplication. In other words, this means that the original number will be multiplied or divided by 10*C, where C is the modulo value of the parameter.
  • CRD is a symbol separating the integer and fractional parts.
  • CHRG is a group separator symbol for an integer part of a number. If you use an empty string as a delimiter, then the delimiter will be a non-breaking space character.
  • CN is a string representing the zero value of a number. If not specified, then represented as an empty string. If "CHN=" is specified, then in the form of "0". Not used for numeric input fields.
  • CHN - whether leading zeros should be output. The value of this parameter is not specified; the presence of the parameter itself determines the output of leading zeros.
  • CHG - the order of grouping the digits of a number. The values ​​are numbers, separated by commas, indicating the number of grouped digits from right to left. Only the first two numbers make sense. The first of these indicates the primary grouping, that is, the one that will be used for the least significant digits of the integer part of the number. If the second number is not specified, only the least significant digits will be grouped. If 0 is specified as the second number, then for all digits of the integer part of the number the value specified for the primary grouping will be applied. If a value other than 0 is used as the second number, then this value will be used to group all digits except the least significant ones already grouped.
  • СО - representation of negative numbers.
    • 0 (0) - a string like "(1,1)";
    • 1 (1) - a string like "-1,1";
    • 2 (2) - a string like "- 1,1";
    • 3 (3) - a string like "1,1-";
    • 4 (4) - a string like "1,1 -".
  • DF - date format.
    • d - day of the month (in numbers) without leading zero;
    • dd - day of the month (in numbers) with a leading zero;
    • ddd - short name of the day of the week;
    • dddd - full name of the day of the week;
    • M - month number (in numbers) without leading zero;
    • MM - month number (in digits) with leading zero;
    • MMM - short name of the month;
    • MMMM - full name of the month;
    • k - number of the quarter in the year;
    • r - number of the year without a century and a leading zero;
    • yy - number of the year without a century with a leading zero;
    • yyyy - year number with century;
    • h - hour in the 12-hour version without leading zeros;
    • hh - hour in 12-hour clock with leading zero;
    • H - hour in 24-hour format without leading zeros;
    • HH (HH) - hour in 24-hour mode with a leading zero;
    • m - minute without leading zero;
    • mm - minute with leading zero;
    • s - second without a leading zero;
    • ss - second with leading zero;
    • bb - display half of the day AM/PM (valid only for configuration languages ​​that support the 12-hour time display option).
  • DLF - local date format. Specifies the option for displaying date parts.
    • D - date (in numbers);
    • DD - long date (month in words);
    • B - full time, date can be combined with time;
    • DV - date time.
  • DP is a string representing an empty date (for example, Format("00010101000000" ,"DP=""empty date""") will return the string "empty date".
  • BL - a string representing a Boolean value Lie.
  • BI - a string representing a logical value True.

According to current legislation, payment documents and financial reports must contain total amounts written in words. In an accounting program 1s number in words can be obtained using a special function in the global context. The specialist sets the necessary parameters in the format string and receives the number in words as output in the document. The algorithm of actions is the same for all 1c Enterprise configurations.

Main components of the algorithm

In order to correctly format a number in capital letters, you need to understand the meaning of all components of the diagram. Basic indicators:

  1. A number is a set of numbers that should be converted into words;
  1. Format string - a place in the program for specifying required parameters language. The requirements for the type of fractional part are also specified there. Compound elements are indicated separated by semicolons;

Format string elements:

  • The localization code is indicated by the letter L (L). You can change it yourself by specifying the required language;
  • Reproduce/do not reproduce the name of the units of measurement (ND = false or true);
  • Reproduce/do not reproduce fractional parts of the sum (DP = false or true);
  1. Calculus subject parameters are a precise description of the units of measurement of the amount that must be written in words. For example, ruble, dollar, kopeck.

Important. All elements of the diagram should be specified as accurately as possible. You can double-check the correctness of the entered data in the syntax assistant.

How to write a number output scheme in words

You can write the 1st number in words using the following scheme: NumberIn Words (Number, “Format Line”, “Calculus Subject Parameters”), where

A number is a set of numbers, for example 2358.879.

Format String - the name of the language and method of displaying the number. In Russian it will look like this: L = ru_RU. If the fractional part must be written in words, indicate DP = True. By default, this indicator is switched to False.

Parameters of the Subject of Calculus - the name of the unit of measurement in all cases, indicating the gender. For example, the ruble is masculine, the kopeck is feminine. They are designated by the letters “m” and “f”.

Parameters are indicated in quotes and separated by commas. For the Russian language, the scheme will look like this: NumberIn words (2358.879, “L = ru_RU; DP = True”, “ruble, ruble, rubles, m, kopeck, kopecks, kopecks, w, 3”) In this case, the number 3 means the quantity decimal places.

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

How to write a diagram correctly

In order to correctly give the program a task to complete, you need to do next steps:

  1. At the first stage, determine the desired language encoding. The most popular in Russia:
  • English - en_US;
  • Russian - L = ru_RU.
  1. Next, set the type of units of measurement and fractional part (ND, DP);
  1. When preparing documents, it may be necessary to withdraw the amount in rubles to English language or vice versa, write the words dollar, euro in Russian. To do this, the name of the currency is written down in detail in all cases, indicating the gender.

Parameters of the subject of calculus on different languages.

Next, 1c the amount in words in different languages ​​is collected according to the standard scheme. The output will be a document with the total amount written in words. For example, you need to create a financial document in the 1c program for foreign partners who speak English. Currency – euro. The scheme will look like this: NumberIn Words (10 125.67, “L=en_US; DP=True”, “euro,euros,eurocent,eurocents,2”)

Advice. There is no need to memorize these designs. They are all standard, only the parameters of the item change. Therefore, it is better to prepare templates in advance and use them as a cheat sheet.