top_en
Main page

Bitrix24Care

Modify symbolic codes in documents templates

Rating:

Documents templates contain symbolic codes that are used instead of different data. For example, {DocumentCreateTime} code is used in a document template and gets replaced by actual document creation time in a document print form.

But there are different date formats or address formats, how can you select a specific date format that you need?

Don't worry, you can modify symbolic codes in documents templates and solve this problem.

How it works

You can add specific symbols after ~ to symbolic code to change the data format. For example, {DocumentCreateTime~d.m.Y h:s}

Read more about editing documents templates in the article - Documents templates.

You can modify symbolic codes for dates, addresses, names and money amounts.

Date and time

By default, the date format in a document template is the same as the country that this document template belongs to. Let's modify the symbolic code that is used for adding document creation time to a document print form.



Possible date and time formats

  • d.m.y - 30.08.18
  • d.m.Y - 30.08.2018
  • j, n, Y - 30, 8, 2018
  • H:i:s - 15:07:06
  • Y-m-d g:i:s a - 2018-08-30 3:07:06 pm
  • F j, Y, G:i - August 30, 2018 15:07

You can read more about possible date and time formats in the article.

Here's how the print form looks now:

Name

You can modify the name format by adding specific words to symbolic codes. For example, the symbolic code {FormattedName~Format=#TITLE# #NAME# #SECOND_NAME_SHORT# #LAST_NAME#} will be replaced by salutation, first name, the first letter of the second name and last name in the print form.



Name format parameters

  • #TITLE# - salutation
  • #NAME# - first name
  • #LAST_NAME# - last name
  • #SECOND_NAME# - second name
  • #NAME_SHORT# - the first letter of the first name
  • #LAST_NAME_SHORT# - the first letter of the last name
  • #SECOND_NAME_SHORT# - the first letter of the second name

Address

By default, the address format in a document template is the same as the address format used in the country that this document template belongs to. But we can modify the address symbolic code and use, for example, North American address format although the document template is bound to the UK.



Address formats and separators

The Format part of symbolic code defines the address format type:
  • 1 - Europe
  • 2 - UK
  • 3 - North America
  • 4 - Russia (Street-->Country)
  • 5 - Russia (Country-->Street)
The Separator part of symbolic code defines the type of separator used in the address in the print form:
  • 1 - comma
  • 2 - no separator
  • 3 - line break

Here's how the document print form will look like after address symbolic code modification:

{Address} symbolic code is getting replaced by the address specified in Street Address field of company details.

Money amounts

For money amounts, you can modify symbolic code so that zeros after dot and currency will be shown in a print form of a document.



Money amounts parameters

  • WZ (With zeros) - if you select Y value, zeros after dot are shown. For example, 12.00 instead of 12.
  • NS (No sign) - if you select N value, currency sign is added. If you select Y value, currency sign is not shown.

For example, let's modify the {TotalSum} symbolic code so that zeros after dot will be shown and currency sign will be added:

Here's how the document print form will look like:



Recommended articles
This helped Thanks :) This didn't help Sorry :(
Could you please tell us why:
It's not what I'm looking for
It's too complicated

Did not find an answer to your question?

Send your question to the Bitrix24Care team
Access to technical support specialists requires commercial plan subscription and is not available to free account users. Free accounts are limited to self-support resources such as product manuals, helpdesk articles, video tutorials, and free webinars. Technical assistance, training, setup, customization and other value added services can also be purchased directly from local Bitrix24 partners