Variable substitution system: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
Tag: 2017 source edit
mNo edit summary
Tag: 2017 source edit
Line 10: Line 10:
Substitution variables are keywords that can be used in many places in Dolibarr to be replaced later.
Substitution variables are keywords that can be used in many places in Dolibarr to be replaced later.
It is used for example in the templates of emails or configuration text for a text to be personalized when it is displayed or sent for emails.
It is used for example in the templates of emails or configuration text for a text to be personalized when it is displayed or sent for emails.
This variables will be replaced only if the corresponding data exist on the object (for exemple for a third party mail, the online payement URL doesn't exist and will not be replaced)




Line 20: Line 21:
!Variable
!Variable
!Displayed Value
!Displayed Value
!Note
!Dolibarr Mini
!Dolibarr Mini
!Note
|-
|-
|__USER_SIGNATURE__
|__USER_SIGNATURE__
|My beautiful signature
|My beautiful signature
|User signature
|
|
|User signature
|-
|-
|__USER_ID__
|__USER_ID__
|1
|1
|User ID
|
|
|User ID
|-
|-
|__USER_LOGIN__
|__USER_LOGIN__
|doli9
|doli9
|User Login
|
|
|User Login
|-
|-
|__USER_LASTNAME__
|__USER_LASTNAME__
|Admin
|Admin
|User last name
|
|
|User last name
|-
|-
|__USER_FIRSTNAME__
|__USER_FIRSTNAME__
|Super
|Super
|User first name
|
|
|User first name
|-
|-
|__USER_FULLNAME__
|__USER_FULLNAME__
|SuperAdmin
|SuperAdmin
|User full name
|
|
|User full name
|-
|-
|__USER_SUPERVISOR_ID__
|__USER_SUPERVISOR_ID__
|1
|1
|User supervisor ID
|
|
|User supervisor ID
|-
|-
|__USER_REMOTE_IP__
|__USER_REMOTE_IP__
|xxx.xxx.xxx.xxx
|xxx.xxx.xxx.xxx
|User remote IP
|
|
|User remote IP
|-
|-
|__MYCOMPANY_NAME__
|__MYCOMPANY_NAME__
|My little company
|My little company
|Name of the company
|
|
|Name of the company
|-
|-
|__MYCOMPANY_EMAIL__
|__MYCOMPANY_EMAIL__
|contact@mycompany.com
|contact@mycompany.com
|My company contact email
|
|
|My company contact email
|-
|-
|__MYCOMPANY_PROFID1__
|__MYCOMPANY_PROFID1__
|12345678
|12345678
|Prof Id 1 (TIN)
|
|
|Prof Id 1 (TIN)
|-
|-
|__MYCOMPANY_PROFID2__
|__MYCOMPANY_PROFID2__
|12345678
|12345678
|Prof Id 2 (PAN)
|
|
|Prof Id 2 (PAN)
|-
|-
|__MYCOMPANY_PROFID3__
|__MYCOMPANY_PROFID3__
|12345678
|12345678
|Prof Id 3 (SRVC TAX)
|
|
|Prof Id 3 (SRVC TAX)
|-
|-
|__MYCOMPANY_PROFID4__
|__MYCOMPANY_PROFID4__
|12345678
|12345678
|Prof Id 4
|
|
|Prof Id 4
|-
|-
|__MYCOMPANY_PROFID5__
|__MYCOMPANY_PROFID5__
|12345678
|12345678
|Prof Id 5
|
|
|Prof Id 5
|-
|-
|__MYCOMPANY_PROFID6__
|__MYCOMPANY_PROFID6__
|12345678
|12345678
|VAT ID
|
|
|VAT ID
|-
|-
|__MYCOMPANY_CAPITAL__
|__MYCOMPANY_CAPITAL__
|10000
|10000
|Capital of the company
|
|
|Capital of the company
|-
|-
|__MYCOMPANY_FULLADDRESS__
|__MYCOMPANY_FULLADDRESS__
|21 Jump street 75500 MyTown India
|21 Jump street 75500 MyTown India
|Full address of the company
|
|
|Full address of the company
|-
|-
|__MYCOMPANY_ADDRESS__
|__MYCOMPANY_ADDRESS__
|21 Jump street
|21 Jump street
|address of the company
|
|
|address of the company
|-
|-
|__MYCOMPANY_ZIP__  
|__MYCOMPANY_ZIP__
|75500  
|75500
|ZIP code of the company address
|
|
|ZIP code of the company address
|-
|-
|__MYCOMPANY_TOWN__
|__MYCOMPANY_TOWN__
|MyTown  
|MyTown
|Town of the company address
|
|
|Town of the company address
|-
|-
|__MYCOMPANY_COUNTRY__
|__MYCOMPANY_COUNTRY__
|India
|India
|Country of the company address
|
|
|Country of the company address
|-
|-
|__MYCOMPANY_COUNTRY_ID__
|__MYCOMPANY_COUNTRY_ID__
|1
|1
|Country ID of the company address
|
|
|Country ID of the company address
|-
|-
|__MYCOMPANY_CURRENCY_CODE__
|__MYCOMPANY_CURRENCY_CODE__
|EUR
|EUR
|Main currency
|
|
|Main currency
|-
|-
|__ID__
|__ID__
|1
|1
|ID of the object
|
|
|ID of the object
|-
|-
|__REF__
|__REF__
|1234
|1234
|Reference of the object
|
|
|Reference of the object
|-
|-
|__REF_CLIENT__
|__REF_CLIENT__
|1234
|1234
|Customer reference of the object
|
|
|Customer reference of the object
|-
|-
|__REF_SUPPLIER__
|__REF_SUPPLIER__
|1234
|1234
|Supplier reference of the object
|
|
|Supplier reference of the object
|-
|-
|__EXTRAFIELD_XXX__
|__EXTRAFIELD_XXX__
|
|
|Object Extrafield (XXX need to be replace by the Extrafield Attribute code)
|
|
|Object Extrafield (XXX need to be replace by the Extrafield Attribute code)
|-
|-
|__THIRDPARTY_ID__
|__THIRDPARTY_ID__
|__THIRDPARTY_ID__
|1
|
|Third party ID of the object
|
|
|-
|-
|__THIRDPARTY_NAME__
|__THIRDPARTY_NAME__
|__THIRDPARTY_NAME__
|MyCustomer
|
|Third party name of the object
|
|
|-
|-
|__THIRDPARTY_NAME_ALIAS__
|__THIRDPARTY_NAME_ALIAS__
|__THIRDPARTY_NAME_ALIAS__
|MyC
|
|Third party name alias of the object
|
|
|-
|-
|__THIRDPARTY_EMAIL__
|__THIRDPARTY_EMAIL__
|__THIRDPARTY_EMAIL__
|contact@mycustomer.com
|
|Third party email of the object
|
|
|-
|-
|__PROJECT_ID__
|__PROJECT_ID__
|__PROJECT_ID__
|1
|
|Project ID of the object
|
|
|-
|-
|__PROJECT_REF__
|__PROJECT_REF__
|__PROJECT_REF__
|1
|
|Project reference of the object
|
|
|-
|-
|__PROJECT_NAME__
|__PROJECT_NAME__
|__PROJECT_NAME__
|1
|
|Project name of the object
|
|
|-
|-
|__CONTRACT_HIGHEST_PLANNED_START_DATE__
|__CONTRACT_HIGHEST_PLANNED_START_DATE__
|1/1/2020
|Highest date planned for a service start
|Highest date planned for a service start
|
|
|
|-
|-
|__CONTRACT_HIGHEST_PLANNED_START_DATETIME__
|__CONTRACT_HIGHEST_PLANNED_START_DATETIME__
|1/1/2020 1PM
|Highest date and hour planned for service start
|Highest date and hour planned for service start
|
|
|
|-
|-
|__CONTRACT_LOWEST_EXPIRATION_DATE__
|__CONTRACT_LOWEST_EXPIRATION_DATE__
|Lowest data for planned expiration of service
|1/1/2020
|
|Lowest date for planned expiration of service
|
|
|-
|-
|__CONTRACT_LOWEST_EXPIRATION_DATETIME__  
|__CONTRACT_LOWEST_EXPIRATION_DATETIME__
|1/1/2020 1PM
|Lowest date and hour for planned expiration of service
|Lowest date and hour for planned expiration of service
|
|
|
|-
|-
|__ONLINE_PAYMENT_URL__
|__ONLINE_PAYMENT_URL__
|UrlToPayOnlineIfApplicable
|http://mydoli.com/payment
|
|Address of the Online payement if applicable
|
|
|-
|-
|__ONLINE_PAYMENT_TEXT_AND_URL__
|__ONLINE_PAYMENT_TEXT_AND_URL__
|TextAndUrlToPayOnlineIfApplicable
|Click to pay
|
|Text and Url to pay online if applicable
|
|
|-
|-
|__SECUREKEYPAYMENT__
|__SECUREKEYPAYMENT__
|
|Security key (if key is not unique per record)
|Security key (if key is not unique per record)
|
|
|
|-
|-
|__SECUREKEYPAYMENT_MEMBER__
|__SECUREKEYPAYMENT_MEMBER__
|
|Security key for payment on a member subscription (one key per member)
|Security key for payment on a member subscription (one key per member)
|
|
|
|-
|-
|__SECUREKEYPAYMENT_ORDER__
|__SECUREKEYPAYMENT_ORDER__
|
|Security key for payment on an order
|Security key for payment on an order
|
|
|
|-
|-
|__SECUREKEYPAYMENT_INVOICE__
|__SECUREKEYPAYMENT_INVOICE__
|
|Security key for payment on an invoice
|Security key for payment on an invoice
|
|
|
|-
|-
|__SECUREKEYPAYMENT_CONTRACTLINE__
|__SECUREKEYPAYMENT_CONTRACTLINE__
|
|Security key for payment on a a service
|Security key for payment on a a service
|
|
|
|-
|-
|__DIRECTDOWNLOAD_URL_PROPOSAL__  
|__DIRECTDOWNLOAD_URL_PROPOSAL__
|http://mydoli.com/proposal.pdf
|Direct download url of a proposal
|Direct download url of a proposal
|
|
|
|-
|-
|__DIRECTDOWNLOAD_URL_ORDER__
|__DIRECTDOWNLOAD_URL_ORDER__
|http://mydoli.com/order.pdf
|Direct download url of an order
|Direct download url of an order
|
|
|
|-
|-
|__DIRECTDOWNLOAD_URL_INVOICE__
|__DIRECTDOWNLOAD_URL_INVOICE__
|http://mydoli.com/invoice.pdf
|Direct download url of an invoice. This needs that the setup INVOICE_ALLOW_EXTERNAL_DOWNLOAD is set to allow to generate the link.
|Direct download url of an invoice. This needs that the setup INVOICE_ALLOW_EXTERNAL_DOWNLOAD is set to allow to generate the link.
|
|
|
|-
|-
|__SHIPPINGTRACKNUM__
|__SHIPPINGTRACKNUM__
|XXXXX
|Shipping tacking number
|Shipping tacking number
|
|
|
|-
|-
|__SHIPPINGTRACKNUMURL__
|__SHIPPINGTRACKNUMURL__
|http://trackingcompagny.com/XXXXX
|Shipping tracking url
|Shipping tracking url
|
|
|
|-
|-
|__DATE_YMD__
|__DATE_YMD__
|__DATE_YMD__
|1/1/2020
|
|Actual date
|
|
|-
|-
|__DATE_DUE_YMD__
|__DATE_DUE_YMD__
|__DATE_DUE_YMD__
|1/1/2020
|
|Due date
|
|
|-
|-
|__AMOUNT__
|__AMOUNT__
|__AMOUNT__
|1243.34
|
|Amount
|
|
|-
|-
|__AMOUNT_EXCL_TAX__
|__AMOUNT_EXCL_TAX__
|__AMOUNT_EXCL_TAX__
|1234.45
|
|Amount without taxes
|
|
|-
|-
|__AMOUNT_VAT__
|__AMOUNT_VAT__
|__AMOUNT_VAT__
|123.4
|
|VAT amount
|
|
|-
|-
|__AMOUNT_FORMATED__
|__AMOUNT_FORMATED__
|__AMOUNT_FORMATED__
|1243.34 €
|
|Amount formated
|
|
|-
|-
|__AMOUNT_EXCL_TAX_FORMATED__
|__AMOUNT_EXCL_TAX_FORMATED__
|__AMOUNT_EXCL_TAX_FORMATED__
|1234.45 €
|
|Amount without taxes formated
|
|
|-
|-
|__AMOUNT_VAT_FORMATED__
|__AMOUNT_VAT_FORMATED__
|__AMOUNT_VAT_FORMATED__
|123.4 €
|
|VAT amount formated
|
|
|-
|-
|__DAY__
|__DAY__
|12
|12
|
|actual day
|
|
|-
|-
|__DAY_TEXT__
|__DAY_TEXT__
|Monday
|Monday
|
|Actual day in text
|
|
|-
|-
|__DAY_TEXT_SHORT__
|__DAY_TEXT_SHORT__
|Mo
|Mo
|
|Actual day in short text
|
|
|-
|-
|__DAY_TEXT_MIN__
|__DAY_TEXT_MIN__
|M
|M
|
|Actual day in minimum text
|
|
|-
|-
|__MONTH__
|__MONTH__
|3
|3
|
|Actual month
|
|
|-
|-
|__MONTH_TEXT__
|__MONTH_TEXT__
|March
|March
|
|Actual month in text
|
|
|-
|-
|__MONTH_TEXT_SHORT__
|__MONTH_TEXT_SHORT__
|March
|March
|
|Actual month in short text
|
|
|-
|-
|__MONTH_TEXT_MIN__
|__MONTH_TEXT_MIN__
|M
|M
|
|Actual month in minimum text
|
|
|-
|-
|__YEAR__
|__YEAR__
|2020
|2020
|
|Actual year
|
|
|-
|-
|__PREVIOUS_DAY__
|__PREVIOUS_DAY__
|11
|11
|
|Previous day
|
|
|-
|-
|__PREVIOUS_MONTH__  
|__PREVIOUS_MONTH__
|2
|2
|
|Previous month
|
|
|-
|-
|__PREVIOUS_YEAR__
|__PREVIOUS_YEAR__
|2018
|2019
|
|Previous Year
|
|
|-
|-
|__NEXT_DAY__
|__NEXT_DAY__
|13
|13
|
|Next day
|
|
|-
|-
|__NEXT_MONTH__
|__NEXT_MONTH__
|4
|4
|
|Next month
|
|
|-
|-
|__NEXT_YEAR__
|__NEXT_YEAR__
|2021
|2021
|
|next year
|
|
|-
|-
|
|__DOL_MAIN_URL_ROOT__
*
*__DOL_MAIN_URL_ROOT__
|http://mondolibarr/htdocs
|http://mondolibarr/htdocs
|
|Root URL of Dolibarr
|
|
|-
|-
|__(AnyTranslationKey)__
|__(AnyTranslationKey)__
|Translation
|Translation
|
|Any translation Key
|
|
|-
|-
|__[AnyConstantKey]__
|__[AnyConstantKey]__
|Valeur de constante
|1
|
|Value of a constant key
|
|
|-
|-
|__CONTACT_NAME_XXX__
|__CONTACT_NAME_XXX__
|XXX est le type de contact défini dans Accueil>configuration>dictionnaires>Types de contacts/adresses (par exemple : __CONTACT_NAME_BILING__ pour le contact client désigné comme responsable de la facturation sur une facture) Contient Titre+Nom+Prénom
|Mr T
|
|XXX is the contact type defined on Setup->Dictionaries->Contact/Address types (exemple : __CONTACT_NAME_BILING__ for the billing contact). The output will be Title + LastName + First Name
|
|
|-
|-
676

edits

Navigation menu