Address system: различия между версиями

Материал из WiKi - UserSide
Нет описания правки
Нет описания правки
Строка 60: Строка 60:
  template: {{ city }}, {% if area %} {{ area }}, {% endif %} {{ street }}, {{ house }}
  template: {{ city }}, {% if area %} {{ area }}, {% endif %} {{ street }}, {{ house }}
  return: Kyiv, Moskovsky district, Petrova 17
  return: Kyiv, Moskovsky district, Petrova 17
  if the address unit does not have a higher district, the address will be: Kiev, Gagarina Street, 25 (thus the district name and comma will be omitted)
  if the address unit does not have a higher district, the address will be: Kyiv, Gagarina Street, 25 (thus the district name and comma will be omitted)
  </nowiki>
  </nowiki>


In the "Prefix" or "Postfix" field, you can specify abbreviated names for object types - e.g. "c.", "st.", "v.", etc.
In the "Prefix" or "Postfix" field, you can specify abbreviated names for object types - e.g. "c.", "st.", "v.", etc.

Версия от 15:06, 22 мая 2023

en | ru

ATTENTION: This section is relevant for ERP "UserSide" versions 3.13 and later. For versions earlier than 3.13 - use separate pages Regions and Settings - Addresses.

In ERP "UserSide" most of the objects (users, communication nodes, FOCL etc.] have different addresses or may be without address.

The concept of Address/address unit and 'Building/house' must be clearly differentiated. An address is simply a name. A sign on a building, if you prefer. A building is a complete, unified structure. One large building can have many addresses at the same time (e.g. a house which is standing on 4 streets at once). In the same way - one address may hide many buildings (for example - a property complex, polygon or an area with many buildings).

In ERP "UserSide" we have tried to make all address hierarchies of different countries flexible. Cities can include other cities, streets can include districts and so on.

The scope of objects in the system depends on the availability of a particular address object to the current employee. This makes it possible, for example, to forbid employees of some localities to see users of other localities.

If the objects are not linked to an address, they are available to all employees who have the option "Objects without address" selected.


Starting from version 3.18:

In the form for editing an address unit, the address type selector displays its token in addition to the type name.

Address unit tokens

"Address unit tokens" are used for interaction with external systems, for use in APIs, for operation of billing interaction modules.

For example, in the ERP "UserSide" you can add the types of address units "City" and " Village" and specify the token "city" for both of them. In this case, when interacting with billing, the address objects from these address units will be equal and all will be considered as settlements. For interaction with billing, the following tokens are used: "province", "district", "city", "area", "street", and "house".

Types of address units

" Settings => "Addresses" => "Types of address units"

This section is used to create types of address units - they can be completely optional - countries, continents, streets, avenues, water areas, etc.

Despite the fact that the configuration of the address hierarchy is very flexible, there are still basic categories that can be assigned to these address units (e.g. street, locality) for compatibility with external systems.

In the "Object name template" field, you can specify how the name of an address unit of this type will look in the system. This is usually mainly required for buildings. TWIG markup is used. For example:

Address of the building: Kyiv Petrovsky district, Gagarina street 25 

 template:
 {{ city }}, {{ street }}, {{ house }} 
 return: Gagarina Street 25, Kyiv
 
 template: {{ street }}, {{ house }} 
 return: Gagarina Street 25
 
 template: {{ city }}, {% if area %} {{ area }}, {% endif %} {{ street }}, {{ house }}
 return: Kyiv, Moskovsky district, Petrova 17
 if the address unit does not have a higher district, the address will be: Kyiv, Gagarina Street, 25 (thus the district name and comma will be omitted)
 

In the "Prefix" or "Postfix" field, you can specify abbreviated names for object types - e.g. "c.", "st.", "v.", etc.