<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dolibarr.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sonikf</id>
	<title>Dolibarr ERP CRM Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dolibarr.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sonikf"/>
	<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php/Special:Contributions/Sonikf"/>
	<updated>2026-11-11T22:28:36Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Setup_Other&amp;diff=65981</id>
		<title>Setup Other</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Setup_Other&amp;diff=65981"/>
		<updated>2026-04-22T13:04:18Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Paramétrage_Divers]]&lt;br /&gt;
[[es:Configuración_Varios]]&lt;br /&gt;
[[de:Erweiterte_Einstellungen]]&lt;br /&gt;
[[zh:其他设置]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Admin]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Help About Screen&#039;&#039;&#039;: Other setup&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Menu Path&#039;&#039;&#039;: Home ► Setup ► Other&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Introduction&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Some options are not visible in the interface (often because they are deprecated or are beta features). In most cases you do not need these functions and their use may make the application unstable or may not work as expected.&lt;br /&gt;
&lt;br /&gt;
 {{warning|32px}} This page contains the list of some advanced development parameters. In most cases, they are parameters for internal usage, development, external modules, features in development not stable or that may lead to security risk. For standard usage of Dolibarr, such parameters &#039;&#039;&#039;SHOULD NOT&#039;&#039;&#039; be used. All experimental options are NOT supported. They may be removed in a future, modified at any version and break stability of your application.&lt;br /&gt;
&lt;br /&gt;
To enable/override a parameter you have to define the constant name and set it to 1 (unless otherwise stated) in &amp;lt;code&amp;gt;Home ► Setup ► Other Setup&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The options here may not be documented since they are not stable and are unsupported (remember they are experimental or development options). The basic format of how the list is written is broken down in the example below:&lt;br /&gt;
&lt;br /&gt;
UNSTABLE_OR_DEV_OPTION ► &#039;&#039;Description of config and goal&#039;&#039; ► &#039;&#039;(specific version information) or values&#039;&#039;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
=Global Options=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;ADD_UNSPLASH_LOGIN_BACKGROUND&#039;&#039;&#039; ► The background image will be refreshed on every login page refresh. Background image is pulled from the popular open source image website Unsplash. If an already saved static background image exists, then this code will override it (but not delete the saved image). Warning: Using this may allow this external website to steel your login credentials (the value to be put is the URL of the service, exemple&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: https://source.unsplash.com/random) ► (v10.0)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_HIDE_POWERED_BY&#039;&#039;&#039; ► Hide the &amp;quot;Powered by Dolibarr&amp;quot; picto on public pages&lt;br /&gt;
*&#039;&#039;&#039;MAIN_APPLICATION_TITLE&#039;&#039;&#039; ► This will change the title of software (that appears on the login page by default). Warning: changing this may make Dolibarr version detection to fail by smartphone applications like [[Application Android - DoliDroid]], breaking some features when using Dolibarr from such application. If the text start with a &amp;quot;+&amp;quot;, the text will be added to the standard &amp;quot;Dolibarr&amp;quot; label instead of replacing it.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_AUTOFILL_DATE&#039;&#039;&#039; ► If this constant is defined (to something other than &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;), the date of invoice, proposal, order or payment are auto-filled with the current date. It is highly recommended to NOT ENABLE this feature. This can create a lot of input errors with data not validated by users. This leads to incorrect values saved in the database causing confusion when you have to do your accountancy reports!&lt;br /&gt;
*&#039;&#039;&#039;MAIN_AUTOFILL_DATE_PROPOSAL►&#039;&#039;&#039;If this constant is defined (to something other than 0), the date of  proposal is auto-filled with the current date.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_AUTO_TIMESTAMP_IN_PUBLIC_NOTES&#039;&#039;&#039; ► Add a timestamp and user automatically when editing the &#039;&#039;public&#039;&#039; note.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_AUTO_TIMESTAMP_IN_PRIVATE_NOTES&#039;&#039;&#039; ► Add a timestamp and user automatically when editing the &#039;&#039;private&#039;&#039; note.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DEFAULT_PAYMENT_TERM_ID&#039;&#039;&#039; ► With ID of a payment term, will use this as default payment term each time you create a new proposal, order, invoice (customer and supplier). Deprecated. Replaced with the default setup feature instead (see French page of wiki for some exemple&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: [[Paramétrage Valeurs par défaut]])&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DEFAULT_PAYMENT_TYPE_ID&#039;&#039;&#039; ► With ID of a payment type, will use this as default payment type each time you create a new proposal, order, invoice (customer and supplier). Deprecated. Replaced with the default setup feature instead (see French page of wiki for some exemple&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: [[Paramétrage Valeurs par défaut]])&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DEFAULT_LANGUAGE_FILTER&#039;&#039;&#039; ► Useful if you do not want to show &amp;lt;code&amp;gt;en_US&amp;lt;/code&amp;gt; language option in combo boxes (other languages can easily be removed in &amp;lt;code&amp;gt;langs&amp;lt;/code&amp;gt; directory but not &amp;lt;code&amp;gt;en_US&amp;lt;/code&amp;gt;) ► (v10.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_LANGUAGES_ALLOWED&#039;&#039;&#039; ► Is a list of languages without spaces, example&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: &amp;lt;code&amp;gt;fr_FR,en_US,de_DE,it_IT&amp;lt;/code&amp;gt; If defined, only those languages will appear in combos. ► (v11.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_NOTES_TAB&#039;&#039;&#039; ► Show or hide notes tab in the card page&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_CONTACTS_TAB&#039;&#039;&#039; ► Show or hide contacts tab in the card page&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_FULL_SCANLIST&#039;&#039;&#039; ► Disables the complete scan of tables to allow the pagination to show total number of pages. May be useful to activate on systems with a very high quantity of data (tables with more than 2 000 000 records).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_JQUERY_JNOTIFY&#039;&#039;&#039; ► Disable usage of &amp;lt;code&amp;gt;JNotify&amp;lt;/code&amp;gt; to show confirm or error messages&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_AJAX_COMBOX&#039;&#039;&#039; ► If you have a large number of third parties or products, you can disable the autocomplete feature on the third parties list by setting this constant to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; ► (v3.6.0+)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_MULTIPLE_FILEUPLOAD&#039;&#039;&#039; ► Disable users to upload multiple files at once.&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_TRUNC&#039;&#039;&#039; ► Disable all truncings in select list. ► (v7.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLEDRAFTSTATUS&#039;&#039;&#039; ► Disable the status &amp;quot;Draft&amp;quot; for some objects (project, donation, ...) so the object is directly created with status &amp;quot;Validated&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DOC_USE_OBJECT_THIRDPARTY_NAME&#039;&#039;&#039; ► Add name of thirdparty at begin of generated document.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DOC_USE_TIMING&#039;&#039;&#039; ► Add a timestamp at end of generated document. Value must be format of timestamp. For example: &amp;lt;code&amp;gt;%Y%m%d%H%M&amp;lt;/code&amp;gt; (only for ODT files)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DOC_UPLOAD_NOT_RENAME_BY_DEFAULT&#039;&#039;&#039; ► Disable the auto renaming on upload file ► (v10.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DOL_SCRIPTS_ROOT&#039;&#039;&#039; ► Define directory who contains &#039;scripts&#039; directory (e.g. &amp;lt;code&amp;gt;/var/www/dolibarr&amp;lt;/code&amp;gt;). Value of this variable may be requested by some external script or tools.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ENABLE_LOG_TO_HTML&#039;&#039;&#039; ► If this constant is defined, it is possible to have logs inside pages by adding the parameter &amp;lt;code&amp;gt;&amp;amp;logtohtml=1&amp;lt;/code&amp;gt; into URL.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES&#039;&#039;&#039; ► Allow to import lines into current document from &amp;quot;linked&amp;quot; compatible documents ► (v8.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_FIRST_TO_UPPER&#039;&#039;&#039; ► Dolibarr add uppercase to Third Parties, contacts or members names if not done. Warning: with some languages (whose words with uppercase are not same words, or pagecode does not always have an uppercase, like Cyrillic languages), this feature may alter your data.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ALL_TO_UPPER&#039;&#039;&#039; ► Dolibarr puts uppercase for Third Parties, contacts or members names if not done. Warning, with some languages (whose words with uppercase are not same words, or pagecode does not always have an uppercase, like Cyrillic languages), this feature may alter your data. ► (v11.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ALL_TOWN_TO_UPPER&#039;&#039;&#039; ► Dolibarr puts uppercase for town names if not done. ► (v13.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_FILESYSTEM_ENCODING&#039;&#039;&#039; ► With some PHP versions, PHP is not able to detect the page code for filesystem of the server OS. To solve this, Dolibarr assumes your OS filesystem is &amp;lt;code&amp;gt;UTF-8&amp;lt;/code&amp;gt; if on Linux or OSX system, and &amp;lt;code&amp;gt;ISO-8859-1&amp;lt;/code&amp;gt; if on Windows. If not, for example on a Windows server with a NTFS &amp;lt;code&amp;gt;UTF-8&amp;lt;/code&amp;gt; pagecode, you can set the variable &amp;lt;code&amp;gt;MAIN_FILESYSTEM_ENCODING&amp;lt;/code&amp;gt; to &amp;quot;&amp;lt;code&amp;gt;utf-8&amp;lt;/code&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_FORCELANGDIR&#039;&#039;&#039; ► Relative path of the directory holding your custom &amp;lt;code&amp;gt;langs&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
*&#039;&#039;&#039;MAIN_HTML_TITLE&#039;&#039;&#039; ► Can be used to control how the html page title is formatted. If value contains key &#039;&amp;lt;code&amp;gt;noapp&amp;lt;/code&amp;gt;&#039;, application name will not be output. If value contains &#039;&amp;lt;code&amp;gt;thirdpartynameonly&amp;lt;/code&amp;gt;&#039;, on tab for thirdparties, only name of thirdparties are output. Value can be list of tags: &#039;&amp;lt;code&amp;gt;noapp;thirdpartynameonly&amp;lt;/code&amp;gt;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_HELPCENTER_LINKTOUSE&#039;&#039;&#039; ► Define the URL link to use as the target page for link &amp;quot;I need help&amp;quot; onto logon page&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_LOGOUT_GOTO_URL&#039;&#039;&#039; ► URL to which the user will be redirected after LOGOUT&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAXTABS_IN_CARD&#039;&#039;&#039; ► Maximum number of tabs visible. Others are grouped into a combo list.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAXLIST_OVERLOAD&#039;&#039;&#039; ► Maximum number of line in space&#039;s domain.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING&#039;&#039;&#039; ► A warning saying setup of modules is not complete is shown if the number of enabled modules is lower or equal than this value (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; if not defined)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_NO_CONCAT_DESCRIPTION&#039;&#039;&#039; ► Allow to use only input custom description in lines (proposal, order, invoice) ► (v10.0)   &amp;lt; v20.0. [ OSBOLETE since 20.0 | SEE Product module admin configuration to set the description behavior of products and services ]. This value is overwritten by PRODUCT_AUTOFILL_DESC, controled by the option in the product module admin configuration, and is no longer used. Kept in code to allow compatibility if custom modules are using it. Removed completely from v22.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_OPTIMIZE_SPEED&#039;&#039;&#039; ► Use some speed enhancements. See page [[FAQ Increase Performance]] for more information.&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PASSWORD_FORGOTLINK  ►&#039;&#039;&#039; Change forgotten password link on login page. ► (v9.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN&#039;&#039;&#039; ► When creating an order, contract, invoice from another object, specific contacts of objects are set as specific contact of the new object when possible. ► (v4.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PUBLIC_NOTE_IN_ADDRESS&#039;&#039;&#039; ► Show public note in address block ► (v4.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_REMOVE_INSTALL_WARNING&#039;&#039;&#039; ► Remove all security warnings that appear to administrator users if URL &amp;lt;code&amp;gt;/install&amp;lt;/code&amp;gt; is public. You should solve the problem if warning occurs, instead of removing the warning! For this, create a file called &amp;lt;code&amp;gt;install.lock&amp;lt;/code&amp;gt; into Dolibarr root directory. This will stop the warning but also make the page &amp;lt;code&amp;gt;/install&amp;lt;/code&amp;gt; not possible to use, to protect your installation.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_REPEATCONTACTONEACHTAB&#039;&#039;&#039; ► If added and set to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, this adds contacts on all tabs, not only main tab.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_REPLACE_TRANS_xx_XX&#039;&#039;&#039; ► Where &amp;lt;code&amp;gt;xx_XX&amp;lt;/code&amp;gt; is language code. If value is &amp;lt;code&amp;gt;string1:newstring1;string2:newstring2&amp;lt;/code&amp;gt; then replace &amp;lt;code&amp;gt;string1&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;newstring1&amp;lt;/code&amp;gt; in all translation done for language &amp;lt;code&amp;gt;xx_XX&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND&#039;&#039;&#039; ► Change way of rounding total including tax of lines, rounding first of after.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND_SUPPLIER&#039;&#039;&#039;► Change way of rounding total including tax of lines, rounding first of after.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SERVER_TZ&#039;&#039;&#039; ► If you can&#039;t set the time zone of your PHP installation, set this constant. Better is to set it to UTC. In future, this constant will be forced to &#039;&amp;lt;code&amp;gt;UTC&amp;lt;/code&amp;gt;&#039; so PHP server time zone will not have effect any more. Examples: &amp;lt;code&amp;gt;Europe/Paris&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;auto&amp;lt;/code&amp;gt;. Dolibarr will apply the timezone before saving dates in the database. Meaning that if you remove the parameter the dates saved will not change back to UTC.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SEARCH_FORM_ON_HOME_AREAS&#039;&#039;&#039; ► Show the search form on home page areas for core modules (Removed after v5 due to global search combo) ► (v6.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED&#039;&#039;&#039; ► Disable the supplier invoice on the search form&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE&#039;&#039;&#039; ► If only one result is found, then setting this value to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; will take you direct to the item (default method).  Setting the value to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; will show the result in the list as a single result ► (v5.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SERVICES_ARE_ECOMMERCE_200238EC&#039;&#039;&#039;  ► If seller and buyer are in Europe and buyer is not a company, use the VAT of buying country. It can have value &#039;1&#039; or &#039;2&#039;. If value 2, the VATs available to select only the ones of buying country. If &#039;1&#039;, the VATs available to select mix the ones of selling country and the ones of buying country. ► (v18.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SHOW_TUNING_INFO&#039;&#039;&#039; ► Add tuning information into JavaScript console. Better when xdebug is enabled.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SHOW_TECHNICAL_ID&#039;&#039;&#039; ► Show also technical IDs on elements cards or some lists (not supported everywhere).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SHOWDATABASENAMEINHELPPAGESLINK&#039;&#039;&#039; ► Show database name in upper help menu ► (v8.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_ALTERNATE_TRANSLATION_FOR&#039;&#039;&#039; ► List of fields per object that need an alternate translation. Example: &amp;lt;code&amp;gt;MAIN_USE_ALTERNATE_TRANSLATION_FOR=societe:name,town;contact:firstname,lastname&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_HOURMIN_IN_DATE_RANGE&#039;&#039;&#039; ► On all entities lines (invoice, order, contract...), it is possible to add hour and minutes with date on fields &amp;quot;date start&amp;quot; and &amp;quot;date end&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_JQUERY_JEDITABLE&#039;&#039;&#039; ► Allow to update from screen, directly into database, some properties of elements (invoices, proposals, ...) using Ajax. This make response time faster, but avoid using this feature, because it bypasses some business actions (updates on other data that should be done consistently) and ignores business controls on data you saved. Consequently this feature breaks consistency of data and possibly the stability of the software.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_JQUERY_MULTISELECT&#039;&#039;&#039; ► Allow to use Ajax when a choice that require multiselect is used (for the moment only external modules uses select box with multiselect values). Set the value to the jQuery plugin name to use (multiselect, multiple-select, select2…). Setting it to any other value will result in unwanted side-effects and/or bugs.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_OLD_SEARCH_FORM&#039;&#039;&#039; ► Display the old search form in left menu.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS&#039;&#039;&#039; ► Allow to force the VAT rate to a given value (instead of higher VAT rate of country) if the VAT rate of product was not defined.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_UNKNOWN_CUSTOMERS_ARE_COMPANIES&#039;&#039;&#039; ► If we can&#039;t guess if a thirdparty is a company or individual (not VAT ID fill, no Prof ID fill, no type of thirdparty fill), then we suppose it is a company (B2B business) if 1, we suppose it is an individual (B2C business) if 0.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_VAT_COMPANIES_IN_EEC_WITH_INVALID_VAT_ID_ARE_INDIVIDUAL&#039;&#039;&#039; ► For intra CEE sales, we use by default, on proposal, order or invoice creation, a 0 VAT for customers that are companies (see MAIN_UNKNOWN_CUSTOMERS_ARE_COMPANIES to change behaviour to know if a thirdparty is a company or an individual). But if the option MAIN_USE_VAT_COMPANIES_IN_EEC_WITH_INVALID_VAT_ID_ARE_INDIVIDUAL is set, we will use the 0 VAT only if a VAT ID is defined for the customer.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_VAT_OF_PRODUCT_FOR_INDIVIDUAL_CUSTOMER_OUT_OF_EEC&#039;&#039;&#039; ► For to use the default VAT of product for individual customers that are out E.E.C. (European Economic Community) ► (v7.0+). &#039;&#039;There is no reason to use this.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_VIEW_LINE_NUMBER&#039;&#039;&#039; ► Shows a line number for each line of products/services at documents like proposal / order / invoice. Only on screen, not on PDF.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_VIEW_LINE_NUMBER_IN_LIST&#039;&#039;&#039; ► Shows a line number in lists ► (v12.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_VOLUME_DEFAULT_ROUND&#039;&#039;&#039; ► Accuracy of volume (number of decimals)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_VOLUME_DEFAULT_UNIT&#039;&#039;&#039; ► Default unit for weight (&amp;lt;code&amp;gt;0=kg&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-3=g&amp;lt;/code&amp;gt;, ...)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_WEIGHT_DEFAULT_ROUND&#039;&#039;&#039; ► Accuracy of weight (number of decimals)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_WEIGHT_DEFAULT_UNIT&#039;&#039;&#039; ► Default unit for weight (&amp;lt;code&amp;gt;0=kg&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-3=g&amp;lt;/code&amp;gt;, ...)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;USER_HIDE_INACTIVE_IN_COMBOBOX&#039;&#039;&#039; ► Disable display inactive users in combobox.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_PDF_THUMBS&#039;&#039;&#039; ► Disable thumbs PDF in case of imagick bug&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_KEEP_REF_CUSTOMER_ON_CLONING&#039;&#039;&#039; ► Keep the Customer Reference on cloned object (Propal/Invoice)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DONT_KEEP_NOTE_ON_CLONING&#039;&#039;&#039; ► Remove the object notes during cloning ► (v11.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DOC_SORT_FIELD&#039;&#039;&#039; ► Set the default sorting field on document page (name by default) ► (v11.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DOC_SORT_ORDER&#039;&#039;&#039; ► Set the default sorting order (ASC or DESC) on document page (ASC by default) ► (v11.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_ZIPTOWN_DICTIONNARY&#039;&#039;&#039; ► Use dictionary ZIP for create card.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_TOP_MENU_SEARCH_DROPDOWN&#039;&#039;&#039; ► Show search in top menu with theme eldy ► (v11.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PHONE_SEPAR&#039;&#039;&#039; ► Separ phone number other space ► (v12.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;GRAPH_USE_FISCAL_YEAR&#039;&#039;&#039; ► Widgets uses fiscal year&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SHOW_SOCINFO_ON_PRINT&#039;&#039;&#039; ► Permit to add user company information on each printed document (when click on Dolibarr print button) ► (v12.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_FEATURES_LEVEL&#039;&#039;&#039; ► Level of features to show: &amp;lt;code&amp;gt;-1=stable+deprecated&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0=stable only (default)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;1=stable+experimental&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;2=stable+experimental+development&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SHOW_TECHNICAL_ID&#039;&#039;&#039; ► Show technical id for object.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_HTTP_CONTENT_SECURITY_POLICY&#039;&#039;&#039; ► Allows you to fill in the content security rules ► (v6.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD&#039;&#039;&#039; ► Allow to change the link of the third party to customer/supplier card instead of contact card on List.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MODULE_SETUP_ON_LIST_BY_DEFAULT&#039;&#039;&#039; ► If set to &amp;quot;common&amp;quot; the setup module becomes list by defaut&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PAGESIZE_CHOICES&#039;&#039;&#039;  ► Configure select field to choose number of lines displayed on listing (&amp;lt;code&amp;gt;10:10,15:15,20:20,30:30,40:40,50:50,100:100,250:250,500:500,1000:1000,5000:5000&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_TOP_MENU_QUICKADD_DROPDOWN&#039;&#039;&#039; ► Add a dropdown menu with shortcuts to create new objects ► (v13.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER&#039;&#039;&#039; ► Remove the header stored by email collector ► (v13.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_VAT_OF_PRODUCT_FOR_COMPANIES_IN_EEC_WITH_INVALID_VAT_ID&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_OPTIMIZEFORTEXTBROWSER&#039;&#039;&#039; ► Optimise interface for a text only browser. This variable is set to 1 automatically if your browser is lynx or links&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_NB_OF_YEAR_IN_WIDGET_GRAPH&#039;&#039;&#039; ► Set the number of years visible on some graph of some widgets (2 is default value)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;API_DISABLE_LOGIN_API&#039;&#039;&#039; ►(v14.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_LOGIN_BADCHARUNAUTHORIZED&#039;&#039;&#039; ► Add possibility to define bad character unauthorized into login name REGEX expression (Default value is @&amp;lt;&amp;gt;&amp;quot;\&#039;)  ► (v16.0)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SHOW_ALL_FILES_ON_DOCUMENT_TOOLTIP&#039;&#039;&#039;  ► Add all files visible from the object to be visible from the list of object.&lt;br /&gt;
*&#039;&#039;&#039;MAIN_LIST_ALLOW_PUBLIC_NOTES&#039;&#039;&#039;  ► Display public notes on list&lt;br /&gt;
*&#039;&#039;&#039;MAIN_LIST_ALLOW_PRIVATE_NOTES&#039;&#039;&#039;  ► Display private notes on list&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_CHECKBOX_LEFT_COLUMN&#039;&#039;&#039; ► Display private check boxes on the left ► (v17.0)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_STATS_GRAPHS_SHOW_N_YEARS&#039;&#039;&#039; ► Nb of years to shows in widget and graph ► (v14.0)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_HOOK_DEBUG&#039;&#039;&#039; ► if &amp;gt;=2 the hook in the logs are more verbose ► (v18.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ENABLE_AJAX_TOOLTIP&#039;&#039;&#039; ► if 1 the tooltips are updated with AJAX request ► (v18.0)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_NO_INPUT_PRICE_WITH_TAX&#039;&#039;&#039; ► if 1 the TTC input field is removed from propal/invoices/... ► (v17.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_SELECT2_FOCUS_PROTECTION&#039;&#039;&#039; ► if 1 disable the focus protection ► (v17.0)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_ADVANCED_PERMS ►&#039;&#039;&#039; Add advanced user permission&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_FREE_PRODUCT_CHECKED_BY_DEFAULT ►&#039;&#039;&#039; Check &amp;quot;product&amp;quot; or &amp;quot;service&amp;quot; by default on order/invoices/propal cards (set value &amp;quot;product&amp;quot; or &amp;quot;service&amp;quot;)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_LINK_BY_REF ►&#039;&#039;&#039; Allow to link documents by choosing the type and ref from the object linked option&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Official supported option&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The following options are not hidden option. They are available by default from the interface.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ONLY_LOGIN_ALLOWED ►&#039;&#039;&#039; Activate maintenance mode and set user that is allowed to login. Value must be user login. Available into menu Home - Admin tools - User session, it is filled with admin user when clicking on button &amp;quot;Block other session&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Security Options=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SECURITY_ANTI_SSRF_SERVER_IP&#039;&#039;&#039; ► Can set a complete list of IPs of server.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SECURITY_CSRF_WITH_TOKEN&#039;&#039;&#039; ► Activate a second anti-CSRF protection on POST (so a POST from another web site can&#039;t be done). Note there is also a default protection using test on referrer that is not reliable. This second protection uses TOKEN on forms and is more powerful. Value can be: 0=CSRF protection disabled; 1=CSRF protection is on POST URLs only (default from version Dolibarr 15.0+); 2=CSRF protection is required on POST + some GET URL that contains some white listed parameters like the parameter &amp;quot;action&amp;quot; used to request database change (default from version Dolibarr 16+), 3=CSRF protection is enabled on any POST and GET URLs (a valid CSRF token is expected whatever are the parameters, warning: can be enabled on Dolibarr but some external modules developped by thirdparty may not be ready yet with this option)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MODULES_FOR_EXTERNAL&#039;&#039;&#039; ► Limit available modules for external users. By default value is &#039;&amp;lt;code&amp;gt;facture,commande,contact,propal,projet,contrat,societe,ficheinter,expedition,agenda&amp;lt;/code&amp;gt;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ALLOW_SVG_FILES_AS_IMAGES&#039;&#039;&#039; ► Allow to use SVG file as image files. Warning: This may introduce security vulnerability (javascript can be embedded into SVG file).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_RESTRICTHTML_ONLY_VALID_HTML&#039;&#039;&#039; ► Refused parameter if value is not a valid HTML content. The content is also sanitized with Tidy.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY&#039;&#039;&#039; ► Refused parameter if value is not a HTML content validated by Tidy PHP library. The content is also sanitized with Tidy.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES&#039;&#039;&#039; ► Sanitize also non standard attributes on HTML content.&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SECURITY_SALT&#039;&#039;&#039; ► A salt string to base the hashing on. 8 strings length recommended.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT&#039;&#039;&#039; ► Maximum number of Images on the HTML content&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SECURITY_ALLOW_UNSECURED_LABELS_WITH_HTML&#039;&#039;&#039; ► Allow HTML tags into products label&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SECURITY_FORCERP&#039;&#039;&#039; = &amp;quot;strict-origin-when-cross-origin&amp;quot; (default) so browser doesn&#039;t send any referrer when going into another web site domain / &amp;quot;same-origin&amp;quot; / &amp;quot;strict-origin&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Members Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MEMBER_NEWFORM_FORCEMORPHY&#039;&#039;&#039; ► Force nature of member set to &amp;quot;phy&amp;quot; for physical or to &amp;quot;mor&amp;quot; for moral ► (v12.0)&lt;br /&gt;
*&#039;&#039;&#039;MEMBER_ALLOW_CHANGE_OF_TYPE&#039;&#039;&#039; ► Member can edit their type on public subscription page ► (v13.0)&lt;br /&gt;
*&#039;&#039;&#039;ADHERENT_DEFAULT_CREATE_THIRDPARTY&#039;&#039;&#039; ► Thirdparty is created when creating a new member ► (v13.0)&lt;br /&gt;
*&#039;&#039;&#039;MEMBER_SUBSCRIPTION_SUGGEST_END_OF_MONTH&#039;&#039;&#039; ► If set to 1, the member subscription end date will be suggested for the end of the month ► (v18.0)&lt;br /&gt;
*&#039;&#039;&#039;MEMBER_SUBSCRIPTION_SUGGEST_END_OF_YEAR&#039;&#039;&#039; ► If set to 1, the member subscription end date will be suggested for the end of the year ► (v18.0)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_NB_OF_YEAR_IN_MEMBERSHIP_WIDGET_GRAPH&#039;&#039;&#039; ► If set, it limits the number of years visible on graph and widgets of membership (empty is default value to show all) ► (v18.0)&lt;br /&gt;
*&#039;&#039;&#039;MEMBER_NO_SYNC_LINKED_THIRDPARTY ►&#039;&#039;&#039; If set, changes to a member will not be synchronized to a linked third party. ► (v23.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Accounting Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;ACCOUNTANCY_COMBO_FOR_AUX&#039;&#039;&#039; ► Add graphic option for ACCOUNTANCY_COMBO_FOR_AUX. Having this option on may slow down and even freeze the accounting features if you have a very large number of thirdparties ► (v10.0)&lt;br /&gt;
*&#039;&#039;&#039;ACCOUNTING_DEFAULT_NOT_NOTIFIED_VALIDATION_DATE&#039;&#039;&#039; ► Avoid validating the lines with the accountancy export.(1= box unchecked by default / 0 = box checked by default) ► (v14.0)&lt;br /&gt;
*&#039;&#039;&#039;ACCOUNTING_DEFAULT_NOT_NOTIFIED_EXPORT_DATE&#039;&#039;&#039; ► Avoid flagging the lines as exported with the accountancy export.(1= box unchecked by default / 0 = box checked by default) ► (v14.0)&lt;br /&gt;
*&#039;&#039;&#039;ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY ►&#039;&#039;&#039; Add 2 fields on thirdparty card which allow you to set an account for all sells products and an other for all buying products for this customer ► (v14.0)&lt;br /&gt;
*&#039;&#039;&#039;ACCOUNTING_MANAGE_ZERO&#039;&#039;&#039; &#039;&#039;&#039;►&#039;&#039;&#039; Allow to manage char 0 in accounting account (if enabled 1 ≠ 10) ► (v14.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Agenda Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;AGENDA_ALL_CALENDARS&#039;&#039;&#039; ► Change the default view of calendar pages to see all the Agenda&#039;s (instead or yours only be default)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS&#039;&#039;&#039; ► To automatically set end date of event to start date + delta on event creation page.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;AGENDA_DISABLE_LOCATION&#039;&#039;&#039; ► Disable location field in action card  ► (&amp;gt;=v5.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;AGENDA_MAX_EVENTS_DAY_VIEW&#039;&#039;&#039; ► Define the maximum number of visible entries for each day in agenda. Default value is 3. Value 0 means no limit.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;AGENDA_USE_EVENT_TYPE&#039;&#039;&#039; ► Add a mandatory field &amp;quot;Type&amp;quot; when creating an event (&#039;&#039;&#039;&#039;&#039;deprecated&#039;&#039;&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ADD_EVENT_ON_ELEMENT_CARD&#039;&#039;&#039; ► Allow to create an event from a document (proposal, order, invoice)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;AGENDA_SUPPORT_PRIORITY_IN_EVENTS&#039;&#039;&#039; ► Allow to have priorities in events ► (&amp;gt;=v13.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;AGENDA_ADDACTIONFORPHONE&#039;&#039;&#039; ► Allow you to create a event from phone number ► (=&amp;lt;v12.0) - Need to be fix for (=&amp;gt;v12.0) https://github.com/Dolibarr/dolibarr/issues/22720&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;AGENDA_ADDACTIONFOREMAIL&#039;&#039;&#039; ► Allow you to create a event from Email ► (=&amp;lt;v12.0) - Need to be fix for (=&amp;gt;v12.0) https://github.com/Dolibarr/dolibarr/issues/22720&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT&#039;&#039;&#039; ► Allow you to add any contact on events if set at 1a https://github.com/Dolibarr/dolibarr/releases/tag/18.0.0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
=Bank Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;BANK_CAN_RECONCILIATE_CASHACCOUNT&#039;&#039;&#039; ► Can reconciliate cash accounts ► (v3.8)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;BANK_DISABLE_CHECK_DEPOSIT&#039;&#039;&#039; ► Disable check deposit feature&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;BANK_ASK_PAYMENT_BANK_DURING_ORDER&#039;&#039;&#039; ► Ask bank account during creation of an order&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL&#039;&#039;&#039; ► Ask bank account during creation of a proposal&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;BANK_USE_OLD_VARIOUS_PAYMENT&#039;&#039;&#039; ► To allow to enter miscellaneous payments (not covered by other modules) using old method. &#039;&#039;&#039;&#039;&#039;Deprecated&#039;&#039;&#039;&#039;&#039;. Entering various payment is preferred ► (&amp;lt;=v12.0).&lt;br /&gt;
*&#039;&#039;&#039;MAIN_IBAN_IS_NEVER_MANDATORY&#039;&#039;&#039; ► IBAN and BIC informations not mandatory. (V15)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=BOM and MO Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;ALLOW_USE_KITS_INTO_BOM_AND_MO&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;BOM_SUB_BOM&#039;&#039;&#039; ►Allow to add a BOM in another BOM►(v16.0)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Bookmarks Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;BOOKMARKS_SHOW_IN_MENU&#039;&#039;&#039; ► Numbers of bookmark entries to be displayed (10 by default)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Inalterable Log Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;BLOCKEDLOG_ADD_ACTIONS_SUPPORTED&#039;&#039;&#039; ► Can complete list of triggered action that are logged&lt;br /&gt;
*&#039;&#039;&#039;BLOCKEDLOG_USE_REMOTE_AUTHORITY&#039;&#039;&#039; ► URL of the remote authority for the blockchain&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Category-Tags Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;CATEGORY_SHOW_COUNTS&#039;&#039;&#039; ► Shows nb of object by tags in tag tree&lt;br /&gt;
*&#039;&#039;&#039;CATEGORY_EDIT_IN_MENU_NOT_IN_POPUP ►&#039;&#039;&#039; Display categories menu instead of managing it only from &amp;quot;Tools&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Contracts=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;CONTRACT_SUPPORT_PRODUCTS&#039;&#039;&#039; ► Products are also suggested into module contract.&lt;br /&gt;
*&#039;&#039;&#039;CONTRACT_ALLOW_EXTERNAL_DOWNLOAD&#039;&#039;&#039; ► When a PDF is generated, a share key is automatically set so the file can be downloaded using the share key. ► (v7.0+)&lt;br /&gt;
*&#039;&#039;&#039;CONTRACT_HIDE_PLANNED_DATE_ON_PDF&#039;&#039;&#039; ► allows you to not display dates on pdf files.&lt;br /&gt;
*&#039;&#039;&#039;CONTRACT_HIDE_REAL_DATE_ON_PDF&#039;&#039;&#039; ► allows you to not display dates on pdf files.&lt;br /&gt;
*&#039;&#039;&#039;CONTRACT_HIDE_PRICE_ON_PDF&#039;&#039;&#039; ► allows you to not display price on pdf files.&lt;br /&gt;
*&#039;&#039;&#039;CONTRACT_HIDE_QTY_ON_PDF&#039;&#039;&#039; ► allows you to not quantity dates on pdf files.&lt;br /&gt;
*&#039;&#039;&#039;CONTRACT_SHOW_SIGNATURE_STATUS_WITH_SERVICE_STATUS&#039;&#039;&#039; ► Show signature status in contract card (Sign by all parties).► (v21.0+)&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Cron module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;CRON_DISABLE_KEY_CHANGE&#039;&#039;&#039; ► When you provide an instance to a customer, you probably also add an entry in the cron of this user so Dolibarr batch and scheduler can work correctly. For security purpose, it may have a security key that is inside the command line into the cron entry and this entry must match the value defined into Dolibarr setup (setup of module &#039;Scheduled Jobs&#039;). Because, a customer of a Saas platform will probably have no access to edit the cron file, it is also import that he has no way to edit the key into the Dolibarr setup, so the key in the cron command line will always match the key in Dolibarr setup, and the Dolibarr batches will executed without security errors. To be sure, the customer does not change the value, you can set this constant to 1 into the table [[Table_llx_const]].&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;CRON_DISABLE_TUTORIAL_CRON&#039;&#039;&#039; ► Disable the tutorial about how to install the cron script (on a SaaS hosting, this should be done by the web hosting provider)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;CRON_WARNING_DELAY_HOURS&#039;&#039;&#039; ► Set this value to the frequency set for the cron script (so a warning will be shown to user to warn it about max frequency of its scheduled jobs)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Direct Debit Orders=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS&#039;&#039;&#039; ► If this option is set, all invoices status (even already paid) may appear on the list of invoices qualified for a direct debit payment. This is the list of invoices with a payment request done, and not linked to a direct debit payment. By default, only &amp;quot;unpayed&amp;quot; invoices are used to avoid to pay twice the same invoice.&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Donation Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;DONATION_USE_THIRDPARTIES&#039;&#039;&#039; ► If this option is set, a thirdparty field appear on donation forms.&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
=Email=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_COPY_FILE_IN_EVENT_AUTO&#039;&#039;&#039; ► Add attachment document on event auto generated by sending email from dolibarr. ► (v6.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_EMAIL_USE_LAYOUT&#039;&#039;&#039;► Enable the use of predefined layout when writing an email.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAILFORM_DISABLE_ENTERKEY&#039;&#039;&#039; ► Activate JavaScript code to disable the enter key in the MAIL form. ► (&amp;gt;= 8.0.1)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_DEBUG&#039;&#039;&#039; ► Write content with header of last mail into file &amp;lt;code&amp;gt;dolibarr_mail.log&amp;lt;/code&amp;gt; into directory &amp;lt;code&amp;gt;dolibarr_main_data_root&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_DEBUG_ERR_WITH_DATE&#039;&#039;&#039; ► Use a different filename (by adding a prefix of date) for each email sent with error when MAIN_MAIL_DEBUG.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_DEBUG_LOG_WITH_DATE&#039;&#039;&#039; ► Use a different filename (by adding a prefix of date) to log each email sent (whatever is result) when MAIN_MAIL_DEBUG.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_FORCE_FROM&#039;&#039;&#039; ► (v19+) Can force the value into the From field of the SMTP header. Note that email sender is always saved into the &amp;quot;Reply-To&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_ALLOW_SENDMAIL_F&#039;&#039;&#039; ► On Linux or BSD system, PHP email function use the command sendmail local to server. In some cases, the sender email must be provided on command line of sendmail with option &amp;lt;code&amp;gt;-f&amp;lt;/code&amp;gt;. This option is here to ask Dolibarr to call the function mail of PHP by adding value for the option &amp;lt;code&amp;gt;-f&amp;lt;/code&amp;gt;. Note that in most cases, even with sendmail, sender email is correctly managed as it is added in the email technical header. This option is here only for setup or version of sendmail that ask the -f option to be mandatory or for sendmail setup that does not use by default the From of the header email to define the sender (with this option, the from can be forced on command line to avoid to have the from lost by sendmail).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_SENDMAIL_FORCE_BA&#039;&#039;&#039; ► On Linux or BSD system, PHP email function use the command sendmail local to server. In some case, we want to recipient to be provided to sendmail into the email content instead of its command line parameter. For this we must add the -ba parameter to sendmail. This option asks PHP to provide this parameter when sending a mail. Note that another solution is to edit the mail.force_extra_parameters=-ba into &amp;lt;code&amp;gt;php.ini&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_NO_FULL_EMAIL&#039;&#039;&#039; ► Recipient email and sender are cleaned to be on form &amp;quot;&amp;lt;email&amp;gt;&amp;quot; instead of &amp;quot;Name &amp;lt;email&amp;gt;&amp;quot;. This might solve problem of compatibility with very old mailers.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_FIX_FOR_BUGGED_MTA&#039;&#039;&#039; ► Some MTA agent are bugged and add some CR chars each time they saw a LF. Because Dolibarr emails are forged to be already cleaned, if MTA agent do that, you will send an email with two CR chars. This may result in having recipient not able to read your email. To fix this, add this constant to 1. Dolibarr will then create an email that is not RFC compliant, but because the MTA agent is bugged, the email will be modified and become correct during sending, solving the problem of bad email received. Add this constant to 1 if your recipient experience problems when opening email for example users using webmail of &amp;lt;code&amp;gt;orange.fr&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;hotmail.com&amp;lt;/code&amp;gt;. Note that some users have reported that when using Exim (Exim 4), you must set this parameter to 0. Default value is 1 but may be changed to 0 in future.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_DO_NOT_USE_SIGN&#039;&#039;&#039; ► Do not add user signature at end of suggested pre-defined email&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_FORCE_NOT_SENDING_TO&#039;&#039;&#039; ► If en email is defined into this variable, emails will never be sent to this email.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIL_FORCE_DELIVERY_RECEIPT_INVOICE&#039;&#039;&#039; ► Set default as &amp;quot;Yes&amp;quot; on requesting delivery receipt when sending email through the &#039;&#039;Customer Invoice&#039;&#039; module.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIL_FORCE_DELIVERY_RECEIPT_ORDER&#039;&#039;&#039; ► Set default as &amp;quot;Yes&amp;quot; on requesting delivery receipt when sending email through the &#039;&#039;Customer Order&#039;&#039; module.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIL_FORCE_DELIVERY_RECEIPT_PROPAL&#039;&#039;&#039; ► Set default as &amp;quot;Yes&amp;quot; on requesting delivery receipt when sending email through the &#039;&#039;Customer Proposal&#039;&#039; module.&lt;br /&gt;
*&#039;&#039;&#039;MAIL_FORCE_DELIVERY_RECEIPT_SUPPLIER_PROPOSAL&#039;&#039;&#039; ► Set default as &amp;quot;Yes&amp;quot; on requesting delivery receipt when sending email through the &#039;&#039;Supplier Proposal&#039;&#039; module.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_EMAIL_SUPPORT_ACK ►&#039;&#039;&#039; Restore email acknowledgment checkbox on sending emails. This feature is commonly abandoned by mailers. Active from Dolibarr V17 - see [https://github.com/Dolibarr/dolibarr/blob/33744f74da1a5c20f8aa9950018ab4e549e00205/ChangeLog#L53 changelog]&lt;br /&gt;
*&#039;&#039;&#039;MAIN_EMAIL_USECCC&#039;&#039;&#039; ► 1 = Shows field BCC into email forms, If value is an email = Shows the BCC pre filled with the email value.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_AUTOCOPY_PROPOSAL_TO&#039;&#039;&#039;, &#039;&#039;&#039;MAIN_MAIL_AUTOCOPY_ORDER_TO&#039;&#039;&#039;, &#039;&#039;&#039;MAIN_MAIL_AUTOCOPY_INVOICE_TO&#039;&#039;&#039;, &#039;&#039;&#039;MAIN_MAIL_AUTOCOPY_SHIPMENT_TO&#039;&#039;&#039;, &#039;&#039;&#039;MAIN_MAIL_AUTOCOPY_..._TO&#039;&#039;&#039; ► Email to use as a BCC recipient when sending email for proposal, order or invoice. You can make this value visible by setting MAIN_EMAIL_USECCC (to 1 or to another email, see previous point)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_EMAIL_ADD_TRACK_ID&#039;&#039;&#039; ► When value is 1 (this is also default value if option is not set): The record &amp;quot;Message-id&amp;quot; added into smtp header includes a tracking id to define where the email was sent from. When value is 2: you send an email from third party card, the sender email is completed with the email source tracking string  &amp;quot;+thiXXX&amp;quot; on email (your email will be sent with the &amp;quot;From&amp;quot; that is myname+thi123@mycompany.com). So when user receiving email will make &amp;quot;Answer&amp;quot;, email will be sent to myname@mycompany.com but with the tracking id included (into header or into target email), allowing you to know to which third party or object, the email exchange is related to.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL&#039;&#039;&#039; ► Restrict sending of 1 email message to &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; recipients for same email message (x for To: + CC: + BCC:). If not defined, value is &amp;lt;code&amp;gt;10&amp;lt;/code&amp;gt;. Required to fight against spamming that include 1000 recipients in 1 message. Note that &#039;&#039;&#039;MAIL_MAX_NB_OF_RECIPIENTS_TO_IN_SAME_EMAIL&#039;&#039;&#039;, &#039;&#039;&#039;MAIL_MAX_NB_OF_RECIPIENTS_CC_IN_SAME_EMAIL&#039;&#039;&#039; and &#039;&#039;&#039;MAIL_MAX_NB_OF_RECIPIENTS_BCC_IN_SAME_EMAIL&#039;&#039;&#039; are also available.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_FORCE_CONTENT_TYPE_TO_HTML&#039;&#039;&#039; ► Force to send all email (event with text only content) as HTML formatted email.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_USE_MULTI_PART&#039;&#039;&#039; ► Forge email content using an alternate text part ► (for 5.0.2+). By default with 6.0+&lt;br /&gt;
*&#039;&#039;&#039;MAIN_INFO_SOCIETE_MAIL_ALIASES&#039;&#039;&#039; ► add address aliases for the from field on mail. Set his value with &amp;quot;Firstname Name &amp;lt;firstname.lastname@mydomain.tld, Otherfirstname OtherlastName &amp;lt;othermail@mydomain.tld&amp;gt;,...&amp;quot; ► (v5.0.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_ADD_INLINE_IMAGES_IF_IN_MEDIAS&#039;&#039;&#039; ► If images were stored into the medias directory from CKEditor, then images into emails are replaced with &amp;quot;inline content&amp;quot;. This may increase seriously risk of being detected as SPAM.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS&#039;&#039;&#039; ► (A better name of this option should be MAIN_EXTERNAL_MAIL_CLIENT_IP_ADDRESS). Set here the list of IPs where your Dolibarr instances are hosted. You can also set the URLs where to get the IP addresses, for exemple: &amp;quot;https://ipv4.urltoshowip.com/_service_showmyip.php,https://ipv6.urltoshowup.com/_service_showmyip.php. So when your customer go into the setup area of email:&lt;br /&gt;
**If he chose mail method, a message will explain him how to setup its SPF record for its email domain (showing the list of IP). This is to avoid to have its emails, sent from its Dolibarr instance, fails due to strict antispam rule of some emailing servers.&lt;br /&gt;
**If he chose smtp method, a message will explain him the list of IP he can use if there is restriction on IP by the SMTP agent. If you also need to add a message to help SPF setup, see option &#039;&#039;&#039;MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_IMAP_USE_PHPIMAP&#039;&#039;&#039; ► Use embedded PHP-imap library (not using the native php imap) instead of native php imap extension ► (v17.0+, available as official option in setup of emailcollector by default from v19)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_ENABLED_USER_DEST_SELECT&#039;&#039;&#039; ► Show also internal users into list of recipients of email in email sending form ► (v8.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIL_PREFIX_FOR_EMAIL_ID&#039;&#039;&#039; ► Prefix for the mails ID. Default value is &amp;lt;code&amp;gt;$_SERVER[&amp;quot;SERVER_NAME&amp;quot;]&amp;lt;/code&amp;gt; ► (&amp;gt;= 8.0.1)&lt;br /&gt;
*&#039;&#039;&#039;MAIL_MASS_ACTION_SEARCH_MOST_RECENT_FILE_IF_NOT_FOUND&#039;&#039;&#039; ► When sending an email from a mass action. If the path saved in DB does not point to an existing file, then search for the most recent file and use it as an attahcment.► (&amp;gt;= 24.0.0)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=SMS= &lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SMS_DEBUG&#039;&#039;&#039; ► Write content of SMS sent into file &amp;lt;code&amp;gt;dolibarr_sms.log&amp;lt;/code&amp;gt; into directory &amp;lt;code&amp;gt;dolibarr_main_data_root&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Emailing Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAILING_PREFIX_FOR_EMAIL_ID&#039;&#039;&#039; ► Set the value that will be used to compose the &amp;quot;Email ID&amp;quot; into email headers. If you set this value to &#039;&amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt;&#039;, the virtual host of web server will be used. By default, this is not defined, so a hash key, unique to each instance, is used.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAILING_NO_USING_PHPMAIL&#039;&#039;&#039; ► If set, the module emailing can&#039;t be used with mail setup of &amp;quot;phpmail&amp;quot;. Using a thirdparty SMTP server is required. You can complete warning message by adding an email to contact for setup help with constant &amp;lt;code&amp;gt;&#039;&#039;&#039;MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS&#039;&#039;&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS&#039;&#039;&#039; ► Contains the email of contact to show into the message visible to a user when he try to use emailing module without SMTP server and if option &#039;&#039;&#039;MAILING_NO_USING_PHPMAIL&#039;&#039;&#039; is set to on.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAILING_LIMIT_WARNING_PHPMAIL&#039;&#039;&#039; ► Show a warning message (var contains the &#039;&#039;&#039;message to show&#039;&#039;&#039;, or &#039;&#039;&#039;translation key&#039;&#039;&#039;) on emailing send form if setup is on &amp;quot;phpmail&amp;quot;. Note: The application always try to translate the message considering the message is a translation key, before showing the translation or message if translation was not found.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAILING_LIMIT_WARNING_NOPHPMAIL&#039;&#039;&#039; ► Show a warning message (var contains the &#039;&#039;&#039;message to show&#039;&#039;&#039;, or &#039;&#039;&#039;translation key&#039;&#039;&#039;) on emailing send form if setup is something else than &amp;quot;phpmail&amp;quot;. Note: The application always try to translation the message considering the message is a translation key, before showing the translation or message if translation was not found.&lt;br /&gt;
*&#039;&#039;&#039;EMAILING_USE_ADVANCED_SELECTOR&#039;&#039;&#039; ► Enable the advanced selector for recipients.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAILING_LIMIT_SENDBYWEB&#039;&#039;&#039; ► Restrict number of emails you can send in same sending session with emailing module from GUI. The value &amp;quot;&amp;lt;code&amp;gt;dolibarr_mailing_limit_sendbyweb&amp;lt;/code&amp;gt;&amp;quot; if defined into config file is used in priority for this limit. A negative value means, sending by web is forbidden.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAILING_LIMIT_SENDBYCLI&#039;&#039;&#039; ► Restrict number of emails you can send in same sending session with emailing module from CLI script. The value &amp;quot;&amp;lt;code&amp;gt;dolibarr_mailing_limit_sendbycli&amp;lt;/code&amp;gt;&amp;quot; if defined into config file is used in priority for this limit.&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Expense Report=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;EXPENSEREPORT_ALLOW_OVERLAPPING_PERIODS&#039;&#039;&#039; ► Can enter several expense reports on same or overlapping date periods. ► (v7.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;EXPENSEREPORT_OVERRIDE_VAT&#039;&#039;&#039; ► Setting this constant to 1 will allow expense reports to show VAT even if the global VAT setting is off ► (v10.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;EXPENSEREPORT_USE_OLD_NUMBERING_RULE&#039;&#039;&#039; ► The module Expense Report use numbering rules that you can setup (like other modules do). If you need to keep the hard-coded numbering rule of expenses report used in v6.0 set this constant to 1 ► (&amp;gt;=v7.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_EXPENSE_IK&#039;&#039;&#039; ► This feature allows you to set index kilometres against a mileage index for different types of vehicles. ► (v7.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_EXPENSE_RULE&#039;&#039;&#039; ► This feature allows you to set a variety of rules per user/group/all so they can only create reports within their limits. ► (v7.0+)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Export Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;EXPORT_CSV_SEPARATOR_TO_USE&#039;&#039;&#039; ► String value to use as default separator to delimit fields of exported files (by default Dolibarr uses &amp;quot;&amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;&amp;quot;). Example: EXPORT_CSV_SEPARATOR_TO_USE=&amp;lt;code&amp;gt;;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;EXPORT_CSV_FORCE_CHARSET&#039;&#039;&#039; ► Choose the charset used in the output file built by the CSV exporter. By default it is ISO-8859-1. Example: EXPORT_CSV_FORCE_CHARSET= &amp;lt;code&amp;gt;utf-8&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;EXPORTTOOL_CATEGORIES&#039;&#039;&#039; ► Can export categories (several lines) into one column with the &amp;quot;product export profile&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;USE_STRICT_CSV_RULES&#039;&#039;&#039; ► Use strict/real CSV format for export. Do not clean/replace CR+LF with &#039;\n&#039; but quote them using the escaping CSV char (&amp;lt;code&amp;gt;&amp;quot;&amp;lt;/code&amp;gt;).&lt;br /&gt;
*&#039;&#039;&#039;EXPORTS_SHARE_MODELS&#039;&#039;&#039;  ► Share export models between users.&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Foundation Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MEMBER_URL_REDIRECT_SUBSCRIPTION&#039;&#039;&#039; ► Link called and shown when a member account is autocreated in member module by a guest user.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MEMBER_EXT_URL_SUBSCRIPTION_INFO&#039;&#039;&#039; ► Link of external page pointed by the &amp;quot;Show here&amp;quot; link added in front of payment cell, into the page to make online subscription.&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=Holiday Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;HOLIDAY_HIDE_BALANCE&#039;&#039;&#039; ► Hide the user&#039;s vacation balance on the vacation request page&lt;br /&gt;
&lt;br /&gt;
[https://wiki.dolibarr.org/Setup_Other#Top (back to top)]&lt;br /&gt;
=Interventions Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;FICHINTER_CLASSIFY_BILLED&#039;&#039;&#039;► Allow to classify an intervention card as &amp;quot;Billed&amp;quot;. This add also trigger &amp;lt;code&amp;gt;FICHINTER_CLASSIFY_BILLED&amp;lt;/code&amp;gt; into list of possible automatic event into agenda.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;FICHINTER_DISABLE_DETAILS&#039;&#039;&#039;► Disable entry of detail lines on intervention. Can validate with no line. Only one line will be shown per intervention on list.&lt;br /&gt;
**If set to &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; details are disabled only on intervention list ► (v21.0+)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Invoice Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DEPOSIT_MULTI_TVA&#039;&#039;&#039; ► In deposits invoice, creates one line per VAT rate from the origin document ► (6.0)&lt;br /&gt;
*&#039;&#039;&#039;PDF_INVOICE_SHOW_PRICE_INCL_TAX&#039;&#039;&#039; ► In customer&#039;s invoice, add a column with the total including all taxes  ►&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_ALLOW_REUSE_OF_CREDIT_WHEN_PARTIALLY_REFUNDED&#039;&#039;&#039; ► If a credit note was partially refunded (a refund was sent to the customer), with common situation, we wait to have the remain refunded too. With this option, it is possible to convert the remain of invoice into a discount to reuse it into another invoice.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_INVOICE_ALLOW_REUSE_OF_CREDIT_WHEN_PARTIALLY_REFUNDED&#039;&#039;&#039; ► See INVOICE_ALLOW_REUSE_OF_CREDIT_WHEN_PARTIALLY_REFUNDED, but for supplier credit notes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_CAN_BE_EDITED_EVEN_IF_PAYMENT_DONE&#039;&#039;&#039; ► Allow to edit invoices even if payment was started. Note: If the module &amp;quot;BlockedLog&amp;quot; is active (required in some countries for legal reasons), this will not change content of archived logs tracked by this module. By definition there is no way to change or remove archived records. It will just update data in your application and a new record to track your change  will be recorded into the archive log.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_CAN_ALWAYS_BE_REMOVED&#039;&#039;&#039; ► Allow to always delete invoices (even if invoice is not last one). Note: If the module &amp;quot;BlockedLog&amp;quot; is active (required by some countries for legal reason), this will not change content of archived logs tracked by this module. By definition there is no way to change or remove archived records. It will just update data in your application and a new record to track your change into the read-only archive log.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_CAN_NEVER_BE_EDITED&#039;&#039;&#039; ► Never allow to edit invoices (except draft invoices with ref like (PROV%)). See also INVOICE_CAN_NEVER_BE_REMOVED.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_CAN_NEVER_BE_REMOVED&#039;&#039;&#039; ► Never allow to delete invoices (except draft invoices with ref like (PROV%)). See also INVOICE_CAN_NEVER_BE_EDITED&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_POSITIVE_CREDIT_NOTE&#039;&#039;&#039; ► All amounts on PDF credit notes are positive.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;FACTURE_DEPOSITS_ARE_JUST_PAYMENTS&#039;&#039;&#039; ► An old way to create initial payment. This treats deposit invoices as a special case and not as legal deposit invoice. Deposit invoices don&#039;t get counted on turnover. They are then applied as a payment, like a discount, on the final invoice. By default, when you include the deposit into draft of final invoice, the amount of final invoice is reduced. With this option, final amount is not reduced but a payment is registered. WARNING: In a lot of european countries, using this option is not allowed.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;FACTURE_SENDBYEMAIL_FOR_ALL_STATUS&#039;&#039;&#039; ► Can send invoice by email to customer even if invoice has status &amp;quot;draft&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_CREDIT_NOTE_STANDALONE&#039;&#039;&#039; ► Start implementation to allow a credit note even without invoice (dangerous) ► (v3.9)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_USE_SITUATION&#039;&#039;&#039; ► 1=Enable the &amp;quot;situation invoice&amp;quot; feature. Warning, this feature is bugged and may not be compatible with the final version of the feature once the bug will be solved. Also, using the double-entry accountancy module is not possible when this option is on (due to the same design problem). 2=Enable the &amp;quot;situation invoice&amp;quot; feature with a rewrite. This mode should be better to become a future stable feature.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_USE_SITUATION_CREDIT_NOTE&#039;&#039;&#039; ► Enable the &amp;quot;situation credit note&amp;quot; feature (need &amp;lt;code&amp;gt;INVOICE_USE_SITUATION&amp;lt;/code&amp;gt;) ► (v8.0)&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_USE_RETAINED_WARRANTY&#039;&#039;&#039; ► Enable the retained warranty on invoice ► (v14.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_DISABLE_DEPOSIT&#039;&#039;&#039; ► Disable deposit invoices&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_DISABLE_REPLACEMENT&#039;&#039;&#039; ► Disable replacement invoices&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_DISABLE_CREDIT_NOTE&#039;&#039;&#039; ► Disable credit notes&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;bdi&amp;gt;&#039;&#039;&#039;INVOICE_ADD_EXTRAFIELD_IN_NOTE&#039;&#039;&#039; ► Add extrafields in note for canelle template ► (v17.0+)&amp;lt;/bdi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_DEFAULT_NOTE_PUBLIC&#039;&#039;&#039; &amp;lt;bdi&amp;gt;► Default text in public note&amp;lt;/bdi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: To decode a QR image of a ZATCA code: https://www.onlinebarcodereader.com/. You can also use the mobile application https://play.google.com/store/apps/details?id=com.posbankbh.einvoiceqrreader&amp;amp;gl=FR&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT&#039;&#039;&#039; ► See PDF option&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN&#039;&#039;&#039; ► See PDF options&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;WORKFLOW_BILL_ON_SHIPMENT&#039;&#039;&#039; ► Change label of button with suitable label when you need to create invoice on shipments&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_ALLOW_EXTERNAL_DOWNLOAD&#039;&#039;&#039; ► When a PDF is generated, a share key is automatically set so the file can be downloaded using the share key. Use the tag __DIRECTDOWNLOAD_URL_INVOICE__ in email template to insert it. ► (v7.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_POINTOFTAX_DATE&#039;&#039;&#039; ► Add Point of Tax Date on invoices for country-specific legality reasons ► (v4.0+)&lt;br /&gt;
*&#039;&#039;&#039;FACTURE_ENABLE_NEGATIVE&#039;&#039;&#039; ► Can validate an invoice when amount is negative&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;FACTURE_ENABLE_NEGATIVE_LINES&#039;&#039;&#039; ► Allows to add negative lines to an invoice ► (v8.0.2+)&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_INVOICE_ENABLE_NEGATIVE&#039;&#039;&#039; ► Can validate an supplier invoice when amount is negative ► (V21 ?)&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_INVOICE_ENABLE_NEGATIVE_LINES&#039;&#039;&#039; ► Allows to add negative lines to an supplier invoice ► (V21 ?)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_USE_DEFAULT_DOCUMENT&#039;&#039;&#039; ► Allow user to select a default invoice documents models according to invoice type. On invoice create page, the model is dynamically changed on invoice type selection. ► (v9.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;FACTURE_REUSE_NOTES_ON_CREATE_FROM&#039;&#039;&#039; ► Reuse the Public Note and Private note of the previous object (Proposal,...) when creating the bill.&lt;br /&gt;
*&#039;&#039;&#039;FACTUREFOURN_REUSE_NOTES_ON_CREATE_FROM&#039;&#039;&#039; ► Reuse the Public Note and Private note of the previous object when creating the supplier bill ► (V13.0)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SHOW_FACNUMBER_IN_DISCOUNT_LIST&#039;&#039;&#039; ► Display the reference of credit notes in discount list when creating the bill.&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_ALLOW_FREE_REF&#039;&#039;&#039; ► Capability to change reference of an invoice. This will be possible as long as the invoice has the status “Draft” and only if your country is not in Europe(V11)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_DISALLOW_REOPEN&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_MAX_FUTURE_DELAY&#039;&#039;&#039; ► Numbers of seconds allowed for billing in the future ► (V14.0)&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_AUTO_NEXT_MONTH_ON_LINES&#039;&#039;&#039; ► Increase start date and end date by one month, if an invoice line is a clone of a time based service AND if this services started on the first day of month and ended on the last day of month ► (V13.0.1)&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_KEEP_DISCOUNT_LINES_AS_IN_ORIGIN&#039;&#039;&#039; ► Does not change a line with a negative price into an absolute discount when creating an invoice ► (V16 ?)&lt;br /&gt;
*&#039;&#039;&#039;INVOICEREC_SET_AUTOFILL_DATE_START&#039;&#039;&#039; and &#039;&#039;&#039;INVOICEREC_SET_AUTOFILL_DATE_END ►&#039;&#039;&#039; Set start and end date to yes for lines of template invoice when created from a draft invoice ► (V16)&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_REC_DATE_TO_YES&#039;&#039;&#039; &#039;&#039;&#039;►&#039;&#039;&#039; Set start and end date to yes by default in add line form for template invoice ► (V16)&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_SUBTYPE_ENABLED&#039;&#039;&#039; ► Extends Dolibarr standard invoice with more invoice types used in some countries. A combo box in the new invoice creation card allows the selection of &amp;quot;subtypes&amp;quot; with values from dictionary &amp;quot;Invoice Subtypes&amp;quot; ► (v19.0+)&lt;br /&gt;
*&#039;&#039;&#039;LIST_OF_QUALIFIED_INVOICES_LIMIT_DEFINED&#039;&#039;&#039; &#039;&#039;&#039;►&#039;&#039;&#039; Perf options to limit list of invoices for &amp;quot;credit note&amp;quot; source (on form &amp;quot;create a credit note&amp;quot;), usable for big quantities of invoices for one customer like you can have with TakePos ► (V22+)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Leave=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY&#039;&#039;&#039; ► Set this value to 0 if you want to have the Saturday as a working day&lt;br /&gt;
*&#039;&#039;&#039;MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY&#039;&#039;&#039; ► Set this value to 0 if you want to have the Sunday as a working day&lt;br /&gt;
&lt;br /&gt;
=Look or Theme=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_FAVICON_URL&#039;&#039;&#039; ► favicon url&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_EASTER_EGG_COMMITSTRIP&#039;&#039;&#039; ► Show a comic image from the CommitStrip website. Images are refreshed daily. ► (v6.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_INCLUDE_GLOBAL_STATS_IN_OPENED_DASHBOARD&#039;&#039;&#039; ► This conf will auto remove global stats box item if there are already in the new dashboard of opened elements and keep displayed stats on the opened item box (not only on mouse over) ► (v11.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_TOP_MENU_SEARCH_DROPDOWN&#039;&#039;&#039; ► Actually only for eldy theme, this conf move search input  to top menu and use new design too ► (v11.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;THEME_AGRESSIVENESS_RATIO&#039;&#039;&#039; ► This conf can be used to increase/decrease aggressiveness of colors. Value 0 is medium, value is between -100 (light grey colors) to +100 (very flashy colors) ► (v11.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;THEME_SHOW_BORDER_ON_INPUT&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_GLOBAL_WORKBOARD&#039;&#039;&#039; ► Hide the work board of the main page ► (v13.0+)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_GLOBAL_BOXSTATS&#039;&#039;&#039; ► Hide the Statistic Box of the main page&lt;br /&gt;
*&#039;&#039;&#039;ALLOW_THEME_JS ►&#039;&#039;&#039; Allow JS file in theme folder (same name as theme folder)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Manifest (Progressive Web App)=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MANIFEST_APPLI_THEME_COLOR ►&#039;&#039;&#039; Theme color for manifest&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MANIFEST_APPLI_BG_COLOR ►&#039;&#039;&#039; Background color  for manifest&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MANIFEST_APPLI_LOGO_URL  ►&#039;&#039;&#039; Logo for manifest&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MANIFEST_APPLI_LOGO_URL_SIZE  ►&#039;&#039;&#039; Logo url size for app (150, 192, 512px) missing 3 configurations&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Order Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MASSACTION_CREATEBILLS_REDIRECT_IF_ONE&#039;&#039;&#039; ► If set 1, redirects to the one bill created from massaction create bills from order list ► (v20.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MASSACTION_CREATEBILLS_REDIRECT_IF_MANY&#039;&#039;&#039; ► If set to 1, redirects to the invoice list after plural invoices where generated from tho massaction create bills from order list  ► (v20.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ORDERLIST_CREATEBILLS_ONEBYTHIRD&#039;&#039;&#039; ► Allow defining value for option &amp;quot;one by thirdparty&amp;quot; in massaction create bills from orders list page (no by default, yes if set to &#039;yes&#039; or 1) ► (v20.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_PROPAL_REFCLIENT_FOR_ORDER&#039;&#039;&#039; =&amp;gt; Copy customer reference from proposal to order. ► (v7.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;ORDER_REQUIRE_SOURCE&#039;&#039;&#039; =&amp;gt; Make the input field &amp;quot;Source of order&amp;quot; mandatory.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;ORDER_VALID_AFTER_CLOSE_PROPAL&#039;&#039;&#039; =&amp;gt; When an order is created on a proposal close, the order is directly defined with status &amp;quot;Validated&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;ORDER_ALLOW_EXTERNAL_DOWNLOAD&#039;&#039;&#039; =&amp;gt; When a PDF is generated, a share key is automatically set so the file can be downloaded using the share key. ► (v7.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;ORDER_ENABLE_NEGATIVE&#039;&#039;&#039; =&amp;gt; Can validate an order when amount is negative&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_PROPAGATE_EXTRAFIELDS_TO_ORDER&#039;&#039;&#039; =&amp;gt; Copy also extrafields from thirdparty to order (if name match). ► (v11.0+)&lt;br /&gt;
*&#039;&#039;&#039;ORDER_DEFAULT_NOTE_PUBLIC&#039;&#039;&#039; ► Default text in public note&lt;br /&gt;
*&#039;&#039;&#039;MAIN_REMOVE_DROPDOWN_CREATE_BUTTONS_ON_ORDER&#039;&#039;&#039; =&amp;gt; Remove the create dropdown button on order card (introduce on v19) to come back with old buttons.  &#039;&#039;&#039;►&#039;&#039;&#039; (v20.0+)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=PDF Options=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ADD_PDF_BACKGROUND&#039;&#039;&#039; ► Define this constant with short name of a PDF file (example &amp;quot;&amp;lt;code&amp;gt;mypdf.pdf&amp;lt;/code&amp;gt;&amp;quot;) that must be saved into directory &amp;quot;&amp;lt;code&amp;gt;documents/mycompany&amp;lt;/code&amp;gt;&amp;quot;. This will add PDF as a background of some of your generated PDF files (proposals,invoices,orders). If you need to concat PDF, see instead [[Module Concat PDF]].&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_FORCE_SAVEAS&#039;&#039;&#039; ► If your browser always asks to save downloaded files on disk (like PDF), try this this option. File may be displayed directly in your browser. Values&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: 0= Default (file is auto downloaded), 1= For to output the file into the browser tab, 2= For to output the file into a browser tab open with target_blank&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_PDF_AUTOUPDATE&#039;&#039;&#039; ► Disable automatic generation of PDF each time we add/update/delete a product line (we can still build document by clicking on &amp;quot;Generate&amp;quot;). This option may increase interface speed on servers with low CPU.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_PDF_COMPRESSION&#039;&#039;&#039; ► Disable PDF compression.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DOCUMENTS_WITH_PICTURE_WIDTH&#039;&#039;&#039; ► Can change size of picture when hidden option &amp;lt;code&amp;gt;MAIN_GENERATE_PROPOSALS_WITH_PICTURE&amp;lt;/code&amp;gt; is used. By default value is &amp;lt;code&amp;gt;20&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS&#039;&#039;&#039; ► Adding the company address at the bottom of the page. Disabled by default&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_GENERATE_PROPOSALS_WITH_PICTURE&#039;&#039;&#039; ► Include the first image of the product into the line of the generated PDF for customer proposals.&lt;br /&gt;
*&#039;&#039;&#039;MAIN_GENERATE_ORDERS_WITH_PICTURE&#039;&#039;&#039; ► Include the first image of the product into the line of the generated PDF for customer orders.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_GENERATE_INVOICES_WITH_PICTURE&#039;&#039;&#039; ► Include the first image of the product into the line of the generated PDF for customer invoices.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_GENERATE_SUPPLIER_PROPOSAL_WITH_PICTURE&#039;&#039;&#039; ► Include the first image of the product into the line of the generated PDF for supplier proposals ► (v5.0.3+)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_GENERATE_SUPPLIER_ORDER_WITH_PICTURE&#039;&#039;&#039; ► Include the first image of the product into the line of the generated PDF for supplier orders&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT&#039;&#039;&#039; ► Disable VAT on generated documents. like for an association. (Works with crabe template)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN&#039;&#039;&#039; ► Hide column with VAT information but only column not total.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_INVERT_SENDER_RECIPIENT&#039;&#039;&#039; ► Invert sender and recipient in some PDF. Note: This option is set automatically if country if Germany.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ODT_AS_PDF&#039;&#039;&#039; ► Activate ODT to PDF conversion. Value can be &amp;quot;libreoffice&amp;quot; or &amp;quot;unoconv&amp;quot;. Do not use value &#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;jodconverter&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039; any more, as it is declared deprecated and partly not functional, use value &#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;libreoffice&#039;&#039;&#039;&#039; instead, it requires only &#039;&#039;&#039;soffice&#039;&#039;&#039; (OpenOffice or LibreOffice) installed on server (use &#039;&#039;&#039;apt install soffice libreoffice-common libreoffice-writer&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
If you got this error: javaldx failed! Warning: failed to read path from javaldx with no return to prompt when running soffice --headless -env:UserInstallation=file:&amp;quot;/tmp&amp;quot; --convert-to pdf --outdir xxx ./yyy.odt, check that directory defined into env:UserInstallation parameters exists and is writeable.&lt;br /&gt;
&lt;br /&gt;
You may also have a look at this page if your server is on Windows: [[Générer automatiquement des documents PDF à partir de fichier ODT avec Doliwamp]]&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ODT_AS_PDF_DEL_SOURCE&#039;&#039;&#039; ► For ODT generation. If set, then initial behaviour is conserved but ODT file is removed when option to convert it as PDF (see previous) is on. Disabled by default&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_FORCE_FONT&#039;&#039;&#039; ► To ignore font defined into language file and force usage of a particular font. For example &amp;quot;&amp;lt;code&amp;gt;DejaVuSans&amp;lt;/code&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_FORCE_FONT_SIZE&#039;&#039;&#039; ► To force size of font (by default 10). For example &amp;quot;&amp;lt;code&amp;gt;12&amp;lt;/code&amp;gt;&amp;quot; ► (v11.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_FREETEXT_HEIGHT&#039;&#039;&#039; ► Change height of space reserved to output the free text.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_TITLE_BACKGROUND_COLOR&#039;&#039;&#039; ► Can define a background color onto title line. Example: &amp;lt;code&amp;gt;220,220,200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_USE_LARGE_LOGO&#039;&#039;&#039; ► Use the original logo with its higher resolution into the PDF instead of the small thumb. This may lead to very very large PDF !&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_BACKGROUND_ON_PDF&#039;&#039;&#039; ► Define this constant with short name of an image (example &amp;quot;&amp;lt;code&amp;gt;myimage.jpg&amp;lt;/code&amp;gt;&amp;quot;) that must be saved into directory &amp;quot;&amp;lt;code&amp;gt;documents/mycompany/logos&amp;lt;/code&amp;gt;&amp;quot;. This will add this background image into your generated PDF files.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_COMPANY_NAME_OF_CONTACT&#039;&#039;&#039; ► Use contact name and information rather than company&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_ADDALSOTARGETDETAILS&#039;&#039;&#039; ► If 1, add details of recipient on generated PDFs (email, fax, url and phone). Can be useful in cases where a printed order/invoice etc is given to a delivery driver/courier etc.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_TVAINTRA_IN_SOURCE_ADDRESS&#039;&#039;&#039; ► Show VAT N° in source address of PDF to comply with legalities in certain countries. Note that VAT number should be already visible in footer of page ► (v8.0.1+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING&#039;&#039;&#039; ► Add optional esign field in pdf propal ► (v8.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PROFID1_IN_SOURCE_ADDRESS&#039;&#039;&#039; ► Show Professional ID 1 in source address of PDF to comply with legalities in certain countries ► (v8.0.1+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PROFID2_IN_SOURCE_ADDRESS&#039;&#039;&#039; ► Show Professional ID 2 in source address of PDF to comply with legalities in certain countries ► (v8.0.1+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PROFID3_IN_SOURCE_ADDRESS&#039;&#039;&#039; ► Show Professional ID 3 in source address of PDF to comply with legalities in certain countries ► (v8.0.1+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PROFID4_IN_SOURCE_ADDRESS&#039;&#039;&#039; ► Show Professional ID 4 in source address of PDF to comply with legalities in certain countries ► (v8.0.1+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PROFID5_IN_SOURCE_ADDRESS&#039;&#039;&#039; ► Show Professional ID 5 in source address of PDF to comply with legalities in certain countries ► (v8.0.1+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PROFID6_IN_SOURCE_ADDRESS&#039;&#039;&#039; ► Show Professional ID 6 in source address of PDF to comply with legalities in certain countries ► (v8.0.1+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PDF_BANK_HIDE_NUMBER_SHOW_ONLY_BICIBAN&#039;&#039;&#039; ► Hide bank number (&amp;quot;code banque/guichet/compte&amp;quot; for France, &amp;quot;sort code/account number&amp;quot; for GB, ...) and keep only BIC/IBAN on PDF.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PDF_BOLD_PRODUCT_REF_AND_PERIOD&#039;&#039;&#039; ► Add more visibility (bold) on product ref and period of service in desc. ► (v12.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PDF_HIDE_PRODUCT_REF_IN_SUPPLIER_LINES&#039;&#039;&#039; ► Modify the use/position of Supplier Ref/Internal Ref with the item Label (name) on PDF documents.&lt;br /&gt;
&lt;br /&gt;
Default (constant not set or Value &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;): Internal ref followed by supplier ref in brackets.&amp;quot;COMPANY-REF-001 (Vendor SKU SUPPLIER-REF-001) - LABEL...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Value &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;: Supplier ref only eg.&amp;quot;SUPPLIER-REF-001 - LABEL...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Value &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;: Supplier ref followed by internal ref in brackets. eg.&amp;quot;SUPPLIER-REF-001 (InternalRef COMPANY-REF-001) - LABEL...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME&#039;&#039;&#039; ► Include alternative/alias name into name on PDF.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PDF_SECURITY_ENCRYPTION&#039;&#039;&#039; ► Encrypt PDF produced by dolibarr. See additional parameters&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:PDF_SECURITY_ENCRYPTION_RIGHTS (block &#039;modify&#039; or &#039;copy&#039;) - &#039;&#039;&#039;PDF_SECURITY_ENCRYPTION_USERPASS&#039;&#039;&#039; - &#039;&#039;&#039;PDF_SECURITY_ENCRYPTION_OWNERPASS&#039;&#039;&#039; (random if not specified) - &#039;&#039;&#039;PDF_SECURITY_ENCRYPTION_STRENGTH&#039;&#039;&#039; (0 = RC4 40 bit; 1 = RC4 128 bit; 2 = AES 128 bit; 3 = AES 256 bit) - &#039;&#039;&#039;PDF_SECURITY_ENCRYPTION_PUBKEYS&#039;&#039;&#039; Array of recipients containing public-key certificates (&#039;c&#039;) and permissions (&#039;p&#039;) - For example: array(array(&#039;c&#039; =&amp;gt; &#039;file://../examples/data/cert/tcpdf.crt&#039;, &#039;p&#039; =&amp;gt; array(&#039;print&#039;))). WARNING: if an &#039;encrypted PDF&#039; provides a protection against manual change done by mistake, it does NOT provide any protection against modification of your PDF in a security point of view: A protected PDF can still be modified by any advanced PDF editors. Don&#039;t forget this: If a software can read the PDF, this software can also rebuild it differently !&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PDF_SHOW_PROJECT&#039;&#039;&#039; ► Show project onto PDF (supported on supplier order only for the moment)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PDF_USE_ALSO_LANGUAGE_CODE&#039;&#039;&#039; ► The value of this constant must be a language code (&#039;fr_FR&#039;, &#039;en_US&#039;, &#039;sa_SA&#039;, ...). If set, the PDF document will contains both language (default and the one defined by the constant).&lt;br /&gt;
*&#039;&#039;&#039;DOC_SHOW_FIRST_SALES_REP&#039;&#039;&#039; ► Show the sales representant on header (at least on propal azur and rubis template)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_DASH_BETWEEN_LINES&#039;&#039;&#039;&lt;br /&gt;
*&lt;br /&gt;
*&#039;&#039;&#039;SHOW_SUBPRODUCT_REF_IN_PDF&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;PDF_HIDE_PRODUCT_LABEL_IN_SUPPLIER_LINES&#039;&#039;&#039; ► hide product label in supplier order lines (V15+)&lt;br /&gt;
*&#039;&#039;&#039;SHIPPING_PDF_DISPLAY_AMOUNT_HT&#039;&#039;&#039; ► Show HT unit price and HT total price for lines of PDF shipment&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DOCUMENTS_HIDE_DESCRIPTION_FOR_FACTURE&#039;&#039;&#039; ► To Hide product description in Customer Invoice&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DOCUMENTS_HIDE_DESCRIPTION_FOR_COMMANDE&#039;&#039;&#039; ► To Hide product description in Sales Order&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DOCUMENTS_HIDE_DESCRIPTION_FOR_ORDER_SUPPLIER&#039;&#039;&#039; ► To Hide product description in Purchase Order&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DOCUMENTS_HIDE_DESCRIPTION_FOR_INVOICE_SUPPLIER&#039;&#039;&#039; ► To Hide product description in Vendor Invoice&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PDF_PROPAL_SHOW_PRICE_INCL_TAX&#039;&#039;&#039; ► Display price with tax on Proposal(cyan template) (V17+)&lt;br /&gt;
*&#039;&#039;&#039;PDF_ORDER_SHOW_PRICE_INCL_TAX&#039;&#039;&#039; ► Display price with tax on Order(eratosthene template) (V17+)&lt;br /&gt;
*&#039;&#039;&#039;PDF_INVOICE_SHOW_PRICE_INCL_TAX&#039;&#039;&#039; ► Display price with tax on Invoice(sponge template) (V17+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PDF_USE_GETALIASNBPAGE_FOR_TOTAL&#039;&#039;&#039; ► Display the page number alias&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_NO_SENDER_FRAME&#039;&#039;&#039; ► Do not display the &amp;quot;sender&amp;quot; mention&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_HIDE_SENDER_NAME&#039;&#039;&#039; ► Do not display the sender name&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_NO_RECIPENT_FRAME&#039;&#039;&#039; ► Do not display BillTo&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MULTICURRENCY_SHOW_ALSO_MAIN_CURRENCY_ON_PDF&#039;&#039;&#039; ► Show the amount in the 2 currencies on PDF when using the MultiCurrency module&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_DONOTREPEAT_HEAD ►&#039;&#039;&#039; Do not repeat the header of document&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Point of Sale (POS)=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;CASHDESK_SHOW_KEYPAD&#039;&#039;&#039; ► Show a mouse key pad into the &#039;Simple Point of Sale&#039; module.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;POS_ADDON&#039;&#039;&#039; ► Set this value to an existing numbering module rule (for example &#039;&amp;lt;code&amp;gt;mod_facture_terre&amp;lt;/code&amp;gt;&#039;, &#039;&amp;lt;code&amp;gt;mod_facture_mars&amp;lt;/code&amp;gt;&#039;, ...) to force the numbering module to use for invoice ref definition when invoice is created by the POS. For example setting value &amp;lt;code&amp;gt;POS_ADDON&amp;lt;/code&amp;gt; to &#039;&amp;lt;code&amp;gt;mod_facture_terre&amp;lt;/code&amp;gt;&#039; will use the numbering module &#039;&amp;lt;code&amp;gt;terre&amp;lt;/code&amp;gt;&#039; for invoice generated from POS, whatever is the numbering rule defined into invoice module setup (you can also use POS_NUMBERING_TERRE_FORCE_PREFIX and POS_NUMBERING_MARS_FORCE_PREFIX variable to change the prefix used).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;TAKEPOS_ENABLE_SUMUP&#039;&#039;&#039; ► Enable the compatibility of TakePOS with the card reader terminal [https://SumUp.fr SumUp]&lt;br /&gt;
*&#039;&#039;&#039;TAKEPOS_CAN_FORCE_BANK_ACCOUNT_DURING_PAYMENT&#039;&#039;&#039; ► Possibility to force the bank account during the payment in TakePOS  ► (v13.0)&lt;br /&gt;
*&#039;&#039;&#039;TAKEPOS_CONTROL_CASH_OPENING&#039;&#039;&#039; ► Control the cash opening&lt;br /&gt;
*&#039;&#039;&#039;TAKEPOS_NUMPAD_FORCE_PAYMENT_ICONS_LABELS&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Products Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;CATEGORY_GRAPHSTATS_ON_PRODUCTS&#039;&#039;&#039; ► Show graph of products with categories and totals in Products Area screen&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PRODUCT_DISABLE_CUSTOMCOUNTRYCODE&#039;&#039;&#039; ► Avoid customs code and country of origin to be set as product description when added to Propal/Order/Invoice&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_ADD_TYPE_IN_DOCUMENTS&#039;&#039;&#039; ► Add text &amp;quot;Product&amp;quot; or &amp;quot;Service&amp;quot; at beginning of details lines on built PDF documents.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DONOTSEARCH_ANYWHERE&#039;&#039;&#039; ► When Ajax search is enabled, search is done on criteria anywhere in label of product. By adding this option, search is done only on start of label. This is really faster when you have a huge number of products.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DIRECT_STATUS_UPDATE&#039;&#039;&#039; ► Allows you to change the status of the product (&#039;&#039;for sale/not for sale for purchase/not for purchase&#039;&#039;) directly on the product page via a &#039;&#039;on/off&#039;&#039; switch button. This can be convenient for those who need to quickly disable certain statuses of products without having to go through the editing product page individually. Also can be very useful if used as a filter on the product and product search list. This option doesn&#039;t generate a MODIFY trigger, so be careful with external modules. ► (v4.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SEARCH_PRODUCT_BY_FOURN_REF&#039;&#039;&#039; ►  Allow to search a product by supplier ref in document&#039;s add line form. ► (&amp;gt;= 8.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_FREE_LINES&#039;&#039;&#039; ► Disallow using free lines to add line in documents ► (&amp;gt;= 8.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SHOW_PRODUCT_ACTIVITY_TRIM&#039;&#039;&#039; ► Show Product and Services turnover before for all four quarters tax over recent years recent years on the product area ► (v5.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUIT_DESC_IN_LIST&#039;&#039;&#039; ► Show long description of product/service into lists.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_PROPAGATE_CUSTOMER_PRICES_ON_CHILD_COMPANIES&#039;&#039;&#039; ► Disable propagation of prices per customer from a customer to its child company.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_PUBLIC_URL&#039;&#039;&#039; ► Disable public url in product card ► (v14.0+)&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_STOCK_LEVELS&#039;&#039;&#039; ► Disable properties of stock limits and desired optimal value on product ► (v14.0+)&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_NATURE&#039;&#039;&#039; ► Disable nature in product card ► (v14.0+)&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_WEIGHT&#039;&#039;&#039; ► Disable weight in product card ► (v14.0+)&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_PRICES&#039;&#039;&#039; ► Disable prices in product card ► (v14.0+)&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_ACCOUNTING&#039;&#039;&#039;  ► Disable accounting in product card ► (v14.0+)&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_SIZE&#039;&#039;&#039; ► Disable size in product card.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_LENGTH&#039;&#039;&#039; ► Disable length in product card ► (v4.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_SURFACE&#039;&#039;&#039; ► Disable surface in product card. ► (v4.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_VOLUME&#039;&#039;&#039; ► Disable volume in product card.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_CUSTOM_INFO&#039;&#039;&#039; ► Disable custom info (custom code and country origin) in product/service card.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL&#039;&#039;&#039; ► When option to use price per level/segment is on, this allows to also set a dedicated vat for each price level.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUIT_CUSTOMER_PRICES_BY_QTY&#039;&#039;&#039; ► If price per quantity ► &#039;&#039;Experimental&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES&#039;&#039;&#039; ► If price per quantity and customer ► &#039;&#039;Experimental&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_LOT_ENABLE_QUALITY_CONTROL&#039;&#039;&#039; ► Enable feature (Display fields for life time and quality control duration) for quality control on product and lot&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_MAX_LENGTH_COMBO&#039;&#039;&#039; ► Limit the length of the label displayed when adding lines in proposals/invoices/orders&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_MAX_VISIBLE_PHOTO&#039;&#039;&#039; ► Show a maximum number of product photos (as thumbnails) on the product main card. Example, setting this constant to &#039;&amp;lt;code&amp;gt;5&amp;lt;/code&amp;gt;&#039; will show the first five product photos found on the product card.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUIT_PDF_MERGE_PROPAL&#039;&#039;&#039; ► Enable module Propal merge product PDF&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_USE_OLD_PATH_FOR_PHOTO&#039;&#039;&#039; ► Ask dolibarr to check also old path (before 3.7) where photos were stored.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_USE_UNITS&#039;&#039;&#039; ► Add other units on products (Use same dictionary as default unit feature) and propagate this unit on line of documents.&lt;br /&gt;
*&#039;&#039;&#039;MAIN_EDIT_LINE_ALLOW_ALL_UNIT_TYPE ►&#039;&#039;&#039; Allow the selection of other unit types when editing the document line&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;RESOURCE_ON_PRODUCTS&#039;&#039;&#039; ► Allow to affect resources on products/services ► (v10.0+)&lt;br /&gt;
*&#039;&#039;&#039;RESOURCE_ON_SERVICES&#039;&#039;&#039; ► Allow to affect resources on products/services ► (v10.0+)&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_SHOW_ORIGIN_IN_COMBO&#039;&#039;&#039; ► Show origin of products when adding lines in proposals/invoices/orders ► (v12.0+)&lt;br /&gt;
*&#039;&#039;&#039;PRODUIT_ATTRIBUTES_HIDECHILD&#039;&#039;&#039;  ► Add option hide child if variantes&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_ADD_FORM_ADD_TO&#039;&#039;&#039; ► Add a product to a draft proposal/order/invoice, from the product card.&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_SELLBY&#039;&#039;&#039; ► Hide the Sell by date ► (v13.0+)&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_EATBY&#039;&#039;&#039; ► Hide the Eat by date ► (v13.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DENY_CHANGE_PRODUCT_TYPE&#039;&#039;&#039; ► Forbid to change the product type&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_SORT_BY_CATEGORY&#039;&#039;&#039; ► Sort the product by categories instead of by ID&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_ADD_NET_MEASURE&#039;&#039;&#039; ► Support Net Measure in product&#039;s card.php (For real weight, volume or piece; needed for some business ie fruits, vegetables....). Note brut value is already available natively, use this option only if you need 2 weights, 2 volumes, ...for each product) ► (v11.0.1+)&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_PRICE_BASE_TYPE&#039;&#039;&#039;  ► value &#039;TTC&#039; / &#039;HT&#039; specify the default value of the price (with or without taxes) ► (v16.0.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_LOAD_EXTRAFIELD_INTO_OBJECTLINES&#039;&#039;&#039; ► Load product extrafiled on object lines&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_USE_SUB_COST_PRICES_IF_COST_PRICE_EMPTY&#039;&#039;&#039;&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: Calculate the parent product production price by child prices.&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_SEARCH_AUTO_SELECT_IF_ONLY_ONE&#039;&#039;&#039;&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: Set to 0 to disable or 1 to enable (by default) the auto select product behavior in combobox when there is only one result.(v21.0+)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Projects Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY&#039;&#039;&#039; ► Option related to the combo list Project on elements. It is a list of thirdparty IDs. If set, you can link an object to a project owned by one of this thirdparty in the list.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_ALLOW_COMMENT_ON_PROJECT&#039;&#039;&#039; ► Add comment feature on a project&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_ALLOW_COMMENT_ON_TASK&#039;&#039;&#039; ► Add comment feature on project task&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_ALWAYS_DISCARD_CLOSED_PROJECTS_IN_SELECT&#039;&#039;&#039; ► Discards closed projects in every select field. A closed project can&#039;t be associated to an object ► (v20.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS&#039;&#039;&#039; ► Option related to the combo list Project on elements. Can link a supplier element (vendor proposal, purchase order, vendor invoice, reception, ...) to any project even if object has a different supplier than the one of the project to link to. See also PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY that is different because it allows to define some given thirdparty ID to allow.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_CAN_ALWAYS_LINK_TO_ALL_CUSTOMERS&#039;&#039;&#039; ► Option related to the combo list Project on elements. Can link a custom element (proposal, sale order, vendor invoice, shipment, ...) to any project even if object has a different customer than the one of the project to link to.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_CREATE_ON_OVERVIEW_DISABLED&#039;&#039;&#039; ► Hide the &amp;quot;create ...&amp;quot; button on the overview pagec&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_DISABLE_UNLINK_FROM_OVERVIEW&#039;&#039;&#039; ► Enable removing the button from a link in the project overview. ► (&amp;gt;= v8.0.1)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_HIDE_UNSELECTABLES&#039;&#039;&#039; ► Hide into select list, all project that we can&#039;t select (closed or draft)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_HIDE_TASKS&#039;&#039;&#039; ► Hide tasks. For user using project only as an analytics key and not using tasks.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_LIST_SHOW_STARTDATE&#039;&#039;&#039; ► Shows start date of projects in project lists.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_LINK_ON_OVERWIEW_DISABLED&#039;&#039;&#039; ► Hide the &amp;quot;link to&amp;quot; form on the overview page ► (v4.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_SHOW_REF_INTO_LISTS&#039;&#039;&#039; ► Add column with project ref into list (with 3.7 list of supplier invoices only, will be expanded to other lists)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_TIME_ON_ALL_TASKS_MY_PROJECTS&#039;&#039;&#039; ► Can add time spent on tasks, even if i am not assigned to task (however, task must be a project i am a contact).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_OPEN_ALWAYS_ON_TAB&#039;&#039;&#039; ► Set to value &#039;task&#039;, or &#039;preview&#039; to always open the project on the given tab instead of main tab.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_ELEMENTS_FOR_MINUS_MARGIN&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;TIMESPENT_ALWAYS_UPDATE_THM&#039;&#039;&#039; ► when it&#039;s on always check current time of user to update it in task time line ► (v17.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_CREATE_NO_DRAFT&#039;&#039;&#039; ► when you create project status will be validate ► (v19.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_ENABLE_SUB_PROJECT&#039;&#039;&#039; ► Add support for parent projects ► (v19.0)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Proposals Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_GENERATE_PROPOSALS_WITH_PICTURE&#039;&#039;&#039; ► Add a picture of the product (the first one found if there are several) into the generated PDF of proposals. Note that using this will reduce the available width for the product description.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PROPAL_CHOOSE_ODT_DOCUMENT&#039;&#039;&#039; ► On setup page, you&#039;ll be able to select which ODT document to use when close or cancel proposals.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING&#039;&#039;&#039; ► add optional esign field in pdf propal ► (v8.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROPAL_CLONE_ON_CREATE_PAGE&#039;&#039;&#039; ► On the create proposal page, ask if we want to create the proposal by cloning an already existing one. You should use instead the &amp;quot;Clone&amp;quot; button available on existing proposals.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROPAL_DISABLE_SIGNATURE&#039;&#039;&#039; ► Do no show the box for signature.&lt;br /&gt;
*&#039;&#039;&#039;PROPAL_SIGNATURE_ON_SPECIFIC_PAGE ►&#039;&#039;&#039; Will show the signature on which page you wanted . Set to 1 will show on first page , set to -1 will show on last second page .  ( If &#039;&#039;&#039;PROPAL_SIGNATURE_ON_ALL_PAGES&#039;&#039;&#039; is enabled, the &#039;&#039;&#039;PROPAL_SIGNATURE_ON_SPECIFIC_PAGE&#039;&#039;&#039; setting will be ignored.)&lt;br /&gt;
*&#039;&#039;&#039;PROPAL_SIGNATURE_ON_ALL_PAGES ►&#039;&#039;&#039; Will show the signature on every pages .&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUIT_PDF_MERGE_PROPAL&#039;&#039;&#039; ► When generating the proposal PDF, all PDFs linked to products linked to proposal are also included into final PDF&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD&#039;&#039;&#039; ► When a PDF is generated, a share key is automatically set so the file can be downloaded using the share key. ► (v7.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROPOSAL_AUTO_ADD_AUTHOR_AS_CONTACT&#039;&#039;&#039; ► Add Proposal Author as user contact follow proposal&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROPOSAL_PDF_HIDE_PAYMENTTERM&#039;&#039;&#039; ► Do not show the payment term on proposal ► (v11.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROPOSAL_PDF_HIDE_PAYMENTMODE&#039;&#039;&#039; ► Do not show the payment mode on proposal ► (v11.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;WORKFLOW_PROPAL_CAN_CLASSIFY_BILLED_WITHOUT_INVOICES&#039;&#039;&#039; ► Button &amp;quot;Classified Billed&amp;quot; is visible on proposal even if there is no invoice linked to proposal.&lt;br /&gt;
*&#039;&#039;&#039;PROPAL_REOPEN_UNSIGNED_ONLY&#039;&#039;&#039;  ► Do not allow reopening of signed (or billed) proposals. (V15)&lt;br /&gt;
*&#039;&#039;&#039;PROPOSAL_ARE_NOT_BILLABLE&#039;&#039;&#039;  ► Disable billing button on proposals (V15)&lt;br /&gt;
*&#039;&#039;&#039;PROPAL_DEFAULT_NOTE_PUBLIC&#039;&#039;&#039; ► Default text in public note&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Receptions=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;RECEPTION_STANDALONE&#039;&#039;&#039; ► Create a simple Reception not connected to supplier order, warehouse, stock e.t.c. (&amp;gt;=23.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Services Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SERVICE_ARE_ECOMMERCE_200238EC&#039;&#039;&#039; ►  If seller and buyer are in Europe and buyer is not a company, use the VAT of buying country. For french speaking people, see also the page [[Loi_européenne_TVA_Vente_à_Distance_VAD_et_e-commerce_BtoC]].&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_FILL_SERVICE_DATES_FROM_LAST_SERVICE_LINE&#039;&#039;&#039;  ► (v13.0) On add line form add a button to fill service dates from the last service line&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Shipments=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;STOCK_WAREHOUSE_NOT_REQUIRED_FOR_SHIPMENTS&#039;&#039;&#039; ► If set, you can add a shipment line, with no stock source defined. ► (&amp;gt;= 8.0.1)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SHIPMENT_GETS_ALL_ORDER_PRODUCTS&#039;&#039;&#039; ► Add all order lines in shipment, including the one with 0 in quantity&lt;br /&gt;
*&#039;&#039;&#039;SHIPPING_PDF_HIDE_ORDERED&#039;&#039;&#039; ►Hide column quantity ordered on shipment pdf (&amp;gt;=15.0)&lt;br /&gt;
*&#039;&#039;&#039;STOCK_SUPPORTS_SERVICES&#039;&#039;&#039; ►Allow to manage services into warehouse and allow to ship services&lt;br /&gt;
*&#039;&#039;&#039;SHIPMENT_SUPPORTS_SERVICES&#039;&#039;&#039; ►Allow to ship services without stock (&amp;gt;=19.0)&lt;br /&gt;
*&#039;&#039;&#039;SHIPPING_DISPLAY_STOCK_ENTRY_DATE&#039;&#039;&#039; ►Display date entry stock exped and sort in date order (&amp;gt;=19.0)&lt;br /&gt;
*&#039;&#039;&#039;SHIPMENT_STANDALONE ►&#039;&#039;&#039;Create a simple shipment not connected to sales order, warehouse, stock e.t.c. (&amp;gt;=23.0)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Stocks=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_ORDER_DISABLE_STOCK_DISPATCH_WHEN_TOTAL_REACHED&#039;&#039;&#039; ► Disable stock dispatch when total expected was already received&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;STOCK_EXCLUDE_VIRTUAL_PRODUCTS&#039;&#039;&#039; ► If product is a virtual product, we do not manage stock for it.&lt;br /&gt;
*&#039;&#039;&#039;STOCK_ALLOW_DELETE_OF_MOVEMENT&#039;&#039;&#039; ► Enable massaction option to delete in movements list (be carefull !!).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;ENTREPOT_EXTRA_STATUS&#039;&#039;&#039; ► Instead of the 2 status (Closed, Open), a Warehouse has 3 status: Closed, Open (for all movements), Open (for internal movement only). Internal movement only means you can&#039;t use the warehouse to make shipment or receptions.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_ORDER_STATUS_FOR_VIRTUAL_STOCK&#039;&#039;&#039; ► For the calculation of virtual stocks, by default supplier orders with the status 3 (ordered) and 4 (partially received) are used. You can enter the list of statuses to be taken into account separated by commas for this calculation (example: 0,1,2,3)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;STOCK_MOVEMENT_LIST_HIDE_UNIT_PRICE&#039;&#039;&#039; ► to hide unit price on some pages (V15+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;DISABLE_QTY_OVERWRITE&#039;&#039;&#039; ► Disable quantity overwrites on inventories ► (v19.0)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_WAREHOUSE_LIST_DISPLAY_MODE&#039;&#039;&#039; ► Change warehouse select list display mode  ► (v21.0) (see github pull request [https://github.com/Dolibarr/dolibarr/pull/31013 #31013] for more info)&lt;br /&gt;
**0&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: Default behavior, display parents of warehouse&lt;br /&gt;
**1&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: Display only current warehouse label only&lt;br /&gt;
**2&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: Display last parent warehouse label&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Suppliers Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;FOURN_PRODUCT_AVAILABILITY&#039;&#039;&#039; ► On the Suppliers price page of the products, activate the supplier product availability. &#039;&#039;This is duplicate feature with delivery_delay introduced with 3.8.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;RELOAD_PAGE_ON_SUPPLIER_CHANGE&#039;&#039;&#039; ► On creation of a supplier order/invoice, reload form with supplier-specific details when supplier is selected from drop-down list.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_INVOICE_WITH_PREDEFINED_PRICES_ONLY&#039;&#039;&#039; ► Restrict selection of products in supplier invoice to only those with a buying price defined for that supplier. ► (v6.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_ORDER_AUTOADD_USER_CONTACT&#039;&#039;&#039; ► Add user approving supplier order as a contact automatically.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_ORDER_DEFAULT_PAYMENT_MODE_ID&#039;&#039;&#039; ► Set the default payment method for suppliers (&amp;lt;code&amp;gt;rowid&amp;lt;/code&amp;gt; in table &amp;lt;code&amp;gt;llx_c_paiement&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_ORDER_USE_DISPATCH_STATUS&#039;&#039;&#039; ► Add a status on each dispatch order line when receiving products from suppliers ► (v4.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_ORDER_NO_DIRECT_APPROVE&#039;&#039;&#039; ► No button &amp;quot;Validate and Approve&amp;quot;. Always do step &amp;quot;Validate&amp;quot; and &amp;quot;Approve&amp;quot; in 2 steps.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_ORDER_WITH_PREDEFINED_PRICES_ONLY&#039;&#039;&#039; ► Restrict selection of products in supplier order to only those with a buying price defined for that supplier. ► (v6.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_ORDER_EDIT_BUYINGPRICE_DURING_RECEIPT&#039;&#039;&#039; ► Can modify the buying price used for PMP calculation when making a stock reception on a supplier order. ► (v6.0+)&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_PROPOSAL_WITH_PREDEFINED_PRICES_ONLY&#039;&#039;&#039; ► Restrict selection of products in supplier proposal to only those with a buying price defined for that supplier. ► (v6.0+)&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_ORDER_MORE_THAN_WISHED&#039;&#039;&#039; ► The supplier order status is set to &amp;quot;Totally received&amp;quot; even if there are more products received than ordered. ► (v15.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;DISPLAY_DISCOUNTED_SUPPLIER_PRICE&#039;&#039;&#039; ► Allow to display discounted supplier price when searching product in supplier documents ► (v10.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_CAN_EDIT_SUPPLIER_ON_SUPPLIER_ORDER&#039;&#039;&#039; ►  Allow to change the supplier on a draft supplier order ► (v10.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT&#039;&#039;&#039; ►  Allow to change price on receipt ► (v19.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_HIDE_SUPPLIER_OBJECTLINES&#039;&#039;&#039; ►  Hide the supplier information on objectlines (invoices, etc..) ► (v19.0)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Third Parties Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;COMPANY_AQUARIUM_CLEAN_REGEX&#039;&#039;&#039; ► Add a REGEX rule on the third parties names. It applies a regex replacement pattern on generated code if COMPANY_AQUARIUM_CLEAN_REGEX is set. Value must be a regex with parenthesis. The part into parenthesis is kept, the rest removed. For example if COMPANY_AQUARIUM_CLEAN_REGEX = &#039;&amp;lt;code&amp;gt;^..(..)..(.*)&amp;lt;/code&amp;gt;&#039; the first char and second char are removed and the char 5 and 6 too ► (&amp;gt;= 8.0.1)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_UNKNOWN_CUSTOMERS_ARE_COMPANIES&#039;&#039;&#039; ► See in Global options section.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_VAT_COMPANIES_IN_EEC_WITH_INVALID_VAT_ID_ARE_INDIVIDUAL&#039;&#039;&#039; ► See in Global options section.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_EMAIL_MANDATORY&#039;&#039;&#039; ► E-mail is a mandatory field when creating a thirdparty&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_DISABLE_CUSTOMERS&#039;&#039;&#039; ► Remove all menu and features related to customers&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_DISABLE_PROSPECTS&#039;&#039;&#039; ► Remove all menu and features related to prospects&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_DISABLE_PROSPECTSCUSTOMERS ►&#039;&#039;&#039; Remove the status &amp;quot;Customer/Prospect&amp;quot; when thirdparties creation or modification&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_DISABLE_STATE&#039;&#039;&#039; ► Do not use field &amp;quot;state/province&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_SORT_ON_TYPEENT&#039;&#039;&#039; ► The combo list of &amp;quot;type of third party&amp;quot; is sorted on alphabetical order instead of the field &amp;quot;position&amp;quot; that appears into dictionary instead.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_ASK_FOR_SHIPPING_METHOD&#039;&#039;&#039; ► Shipping method can be predefined on customer card and will be used as default on order creation&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_ADD_REF_IN_LIST&#039;&#039;&#039; ► Displays the code before the name in the lists  ► Value 1 -&amp;gt; Code + name + alias ou Code + name if colone alias 2 -&amp;gt; Code + alias 3 -&amp;gt; Alias&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT_SUPPLIER&#039;&#039;&#039; ► Possible to add Categories to third parties that are not customer, prospect or supplier.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_DEFAULT_USELOCALTAX1&#039;&#039;&#039; ► When creating a new third party, the field &amp;quot;Use second tax&amp;quot; is set to on or off depending on value of this parameter.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_DEFAULT_USELOCALTAX2&#039;&#039;&#039; ► When creating a new third party, the field &amp;quot;Use third tax&amp;quot; is set to on or off depending on value of this parameter.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_NOTCUSTOMERPROSPECT_BY_DEFAULT&#039;&#039;&#039; ► Do not set status &amp;quot;Customer/Prospect&amp;quot; to &amp;quot;on&amp;quot; when creating a new third party from menu &amp;quot;New third party&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_INCLUDE_PARENT_IN_LINKTO&#039;&#039;&#039; ► Search also for elements on parent third party when using the &amp;quot;link to&amp;quot; object feature.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_INCLUDE_PROJECT_THIRDPARY_IN_LINKTO&#039;&#039;&#039; ► Search also for elements on third party that own the project of the current element when using the &amp;quot;link to&amp;quot; object feature (if project is owned by a different thirdparty than current one).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_LOGO_ALLOW_EXTERNAL_DOWNLOAD&#039;&#039;&#039; ► When a logo is uploaded, a share key is automatically set so the file can be downloaded using the share key.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_SUGGEST_ALSO_ADDRESS_CREATION&#039;&#039;&#039; ► Enabled contact creation on third-party create card&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_QUICKSEARCH_ON_FIELDS&#039;&#039;&#039; ► Personalized search criteria ► Example: $conf-&amp;gt;global-&amp;gt;THIRDPARTY_QUICKSEARCH_ON_FIELDS = &#039;s.nom=ThirdPartyName;s.name_alias=AliasNameShort;s.code_client=CustomerCode&#039;&lt;br /&gt;
*&#039;&#039;&#039;MEMBER_CAN_CONVERT_CUSTOMERS_TO_MEMBERS&#039;&#039;&#039; ► Enabled member creation on third-party create card&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_DISABLE_PARENTCOMPANY&#039;&#039;&#039; ► Disables attachment to a parent company.&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_CUSTOMERPROSPECT_BY_DEFAULT&#039;&#039;&#039; ► Set the third party to customer by default&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_SUPPLIER_BY_DEFAULT&#039;&#039;&#039; ► Set the third party to supplier by default&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT&#039;&#039;&#039; ► Set the third party type by default (3 = customer &amp;amp; prospect / 2 = prospect / 1 = customer )&lt;br /&gt;
*&#039;&#039;&#039;CONTACT_DISABLE_PERSONALINFO&#039;&#039;&#039; ► Disable Personal data on contact page&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_DISABLE_WORKFORCE&#039;&#039;&#039; ► Disable work force selector on society page&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_SHOW_VAT_IN_LIST&#039;&#039;&#039; ► display VAT number in combo list of thirdparties ► (V15+)&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_DEFAULT_CREATE_CONTACT&#039;&#039;&#039; ► When set, a contact is created at the creation of an individual third party ► (v14.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES&#039;&#039;&#039; ► Able to share contact between several third parties&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_CUSTOMERCODE_EQUALS_MEMBERREF&#039;&#039;&#039; ► When creating third parties out of members, the customer code is set equal to the member Ref. ► (v22.0)&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_NO_SYNC_LINKED_MEMBER&#039;&#039;&#039; ► If set, changes to a third party will not be synchronized to a linked member. ► (v23.0)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Ticket Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;TICKET_SHOW_MESSAGES_ON_CARD&#039;&#039;&#039; ►Display all ticket related messages on the main ticket card. ► (&amp;gt;= 10.0)&lt;br /&gt;
*&#039;&#039;&#039;TICKET_AUTO_ASSIGN_CONTRACT_CREATE&#039;&#039;&#039; ►Automatically create a contract linked to the ticket ► (&amp;gt;= 10.0)&lt;br /&gt;
*&#039;&#039;&#039;TICKET_AUTO_CREATE_FICHINTER_CREATE&#039;&#039;&#039; ►Automatically create an intervention linked to the ticket ► (&amp;gt;= 10.0)&lt;br /&gt;
*&#039;&#039;&#039;TICKET_AUTO_ASSIGN_USER_CREATE&#039;&#039;&#039; &#039;&#039;&#039;►&#039;&#039;&#039; (&amp;gt;= 21.0) 0=No auto assignement, 1=Auto assign current user if no user was set, 2=Auto assign current user even if another user was set.&lt;br /&gt;
*&#039;&#039;&#039;TICKET_CHECK_NOTIFY_THIRDPARTY_AT_CREATION&#039;&#039;&#039; ►Automatically check &amp;quot;notify thirdparty at creation&amp;quot; ( &amp;gt;=16)&lt;br /&gt;
*&#039;&#039;&#039;TICKETS_MESSAGE_FORCE_MAIL&#039;&#039;&#039; ► Pre check email sending on ticket message (&amp;gt;=15)&lt;br /&gt;
*&#039;&#039;&#039;TICKET_SEND_PRIVATE_EMAIL ►&#039;&#039;&#039; Allow a private message to be sent by mail (&amp;gt;=17)&lt;br /&gt;
*&#039;&#039;&#039;TICKET_LIMIT_VIEW_ASSIGNED_ONLY&#039;&#039;&#039;  &#039;&#039;&#039;►&#039;&#039;&#039; Only display tickets assigned to the user&lt;br /&gt;
*&#039;&#039;&#039;TICKET_ADD_AUTHOR_AS_CONTACT&#039;&#039;&#039; &#039;&#039;&#039;►&#039;&#039;&#039; If set to 1: Automatically adds the author as internal contact. If set to 2: Automatically adds the author as external contact if external user. (&amp;gt;=20)&lt;br /&gt;
*&#039;&#039;&#039;TICKET_ASSIGN_CONTACT_TO_MESSAGE&#039;&#039;&#039; &#039;&#039;&#039;►&#039;&#039;&#039; If known, the external contact is assigned to the message. (&amp;gt;=19)&lt;br /&gt;
*&#039;&#039;&#039;TICKET_ALLOW_CLASSIFICATION_MODIFICATION_EVEN_IF_CLOSED&#039;&#039;&#039; &#039;&#039;&#039;►&#039;&#039;&#039;Allow modify ticket classification even if closed. (&amp;gt;=19)&lt;br /&gt;
*&#039;&#039;&#039;WORKFLOW_TICKET_CLOSE_INTERVENTION&#039;&#039;&#039; ►On ticket close, automatically close an intervention linked to the ticket&lt;br /&gt;
*&#039;&#039;&#039;TICKET_INCLUDE_SUSPENDED_STATUS&#039;&#039;&#039; ► Use ticket suspended status (&amp;gt;=19)&lt;br /&gt;
*&#039;&#039;&#039;TICKET_INCLUDE_LINK_TO_PUBLIC_INTERFACE_IN_MESSAGE&#039;&#039;&#039; ► Add a link in bottom of emails sent from ticket page with link to public ticket admin tool (&amp;gt;=22)&lt;br /&gt;
&lt;br /&gt;
=VAT Report=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_INCLUDE_ZERO_VAT_IN_REPORTS&#039;&#039;&#039; ► Include lines with VAT to 0% (for &amp;quot;auto-liquidation&amp;quot; in EEC) ► (v8.0.3+)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Website Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;WEBSITE_USE_WEBSITE_ACCOUNTS&#039;&#039;&#039; ► Add a table and a tab to manage some accounts for websites to a third party&lt;br /&gt;
*&#039;&#039;&#039;WEBSITE_ALLOW_OVERWRITE_GIT_SOURCE&#039;&#039;&#039; ► Add a button to export a website over the GIT sources&lt;br /&gt;
*&#039;&#039;&#039;WEBSITE_ADD_CSS_TO_BODY&#039;&#039;&#039; ► Add a CSS class to the body tag of websites&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=WYSIWYG Editor=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;FCKEDITOR_ENABLE_DETAILS_FULL&#039;&#039;&#039; ► Can cut and paste external images (hosted on external server) into description of proposal, orders or invoices. WARNING: PDF generation is not guaranteed with this. Also if the image is removed or renamed by the image hosting service, your proposal, order or invoice will be broken.&lt;br /&gt;
*&#039;&#039;&#039;FCKEDITOR_ALLOW_ANY_CONTENT&#039;&#039;&#039; ► Allow to enter any content. However, this will totally disable content filtering which is one of the most important CKEditor features. You can use this to keep all your tags and attributes in the html content.&lt;br /&gt;
*&#039;&#039;&#039;FCKEDITOR_ENABLE_SCAYT_AUTOSTARTUP&#039;&#039;&#039;  ► Allow to activate the SpellCheckAsYouType (SCAYT) plugins of CKEditor i.e an automatic spell checking. The value to activate this option is 1.&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ALLOW_WYSIWYG_LOCAL_MEDIAS_ON_PRIVATE_NETWORK&#039;&#039;&#039;  ► By default, you can add medias links (img src or other) into the rich text content editor, but you can&#039;t add links like that use a local host like &amp;quot;https://localhost/file&amp;quot;. If you set this option to 1, you can.&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ALLOW_WYSIWYG_EVEN_ON_UNSECURED_EXTERNAL_HTTP_URL&#039;&#039;&#039;  ► By default, you can add medias links (img src or other) into the rich text content editor, but not if the link is a unsecure &amp;quot;http&amp;quot; url (not https) and your Dolibarr is http. If you set this option to 1, you can.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=STRIPE Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;STRIPE_FORCE_VERSION&#039;&#039;&#039; ► Force the STRIPE version. For Example: &amp;quot;2019-09-09&amp;quot; (v11+)&lt;br /&gt;
*&#039;&#039;&#039;STRIPE_REUSE_EXISTING_INTENT_IF_FOUND&#039;&#039;&#039; ► With this, you will have idempotency key but the payment intention will be reuse and not Generate again (13+)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=ClickToDial Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;CLICKTODIAL_FORCENEWTARGET&#039;&#039;&#039; ► Open in new page.&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=For SaaS / Cloud hosting integrators=&lt;br /&gt;
&lt;br /&gt;
The following options are useless for a common usage of Dolibarr. But they are usefull if you plan to host / provide Dolibarr instances as Software As A Service (SAAS) to your customers.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;CRON_DISABLE_KEY_CHANGE&#039;&#039;&#039; ► When you provide an instance to a customer, you probably also add an entry in the cron of this user so Dolibarr batch and scheduler can work correctly. For security purpose, it may have a security key that is inside the command line into the cron entry and this entry must match the value defined into Dolibarr setup (setup of module &#039;Scheduled Jobs&#039;). Because, a customer of a Saas platform will probably have no access to edit the cron file, it is also import that he has no way to edit the key into the Dolibarr setup, so the key in the cron command line will always match the key in Dolibarr setup, and the Dolibarr batches will executed without security errors. To be sure, the customer does not change the value, you can set this constant to 1 into the table [[Table_llx_const]].&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;CRON_DISABLE_TUTORIAL_CRON&#039;&#039;&#039; ► Disable the tutorial about how to install the cron script (on a SaaS hosting, this should be done by the web hosting provider)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;CRON_WARNING_DELAY_HOURS&#039;&#039;&#039; ► Set this value to the frequency set for the cron script (so a warning will be shown to user to warn it about max frequency of its scheduled jobs)&lt;br /&gt;
 &lt;br /&gt;
*&#039;&#039;&#039;MAILING_NO_USING_PHPMAIL&#039;&#039;&#039; ► To avoid bad use of the emailing module, it is recommended to set this option to 1 (This option is described previously). Also you can complete the message visible by customers when they try to setup the SMTP credentials of their Dolibarr by using the constant MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS (This option is described previously). For example, you can point to a FAQ on your website.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL&#039;&#039;&#039; ► If you have set a system limit on number of recipients on your system, you can set also this option to match the same value, so users will be informed: So &#039;&#039;&#039;MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL&#039;&#039;&#039; restricts sending of 1 email message to &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; recipients for the same email message (x for To: + CC: + BCC:). If not defined, value is &amp;lt;code&amp;gt;10&amp;lt;/code&amp;gt;. Required to fight against spamming that include a ton of recipients in 1 message. Note that &#039;&#039;&#039;MAIL_MAX_NB_OF_RECIPIENTS_TO_IN_SAME_EMAIL&#039;&#039;&#039;, &#039;&#039;&#039;MAIL_MAX_NB_OF_RECIPIENTS_CC_IN_SAME_EMAIL&#039;&#039;&#039; and &#039;&#039;&#039;MAIL_MAX_NB_OF_RECIPIENTS_BCC_IN_SAME_EMAIL&#039;&#039;&#039; are also available. Note that this is not a hard limit; it is just the quantity that will be displayed on warnings on screen. For a real limit, this must be implemented into the system.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAILING_LIMIT_SENDBYDAY&#039;&#039;&#039; ► This is a limit of number of emails, an instance can send. Note that this is not a hard limit; it is just the quantity that will be displayed on warnings on screen. For a real limit, this must be implemented into the system.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAILING_LIMIT_WARNING_PHPMAIL&#039;&#039;&#039; ► Set this value to a translation key. Then add translation keys into the instance so user will see a message when into the email setup page. For example, you can set a message to say: &#039;&#039;Warning: To avoid abuse, when using default setup, you are restricted to 500 emails per day for all your application (account may be suspended in case of violation of this rule. You can setup application to use your own SMTP server for sending email so you want have no restriction at all (see menu Home-Setup-Emails)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ALWAYS_CREATE_LOCK_AFTER_LAST_UPGRADE&#039;&#039;&#039; ► If set, when you launch upgrades of your customer instances, you are sure that the upgrade process recreate automatically the file install.lock and remove the upgrade.unlock so the administration tools like install.php, upgrade.php and repair.php can&#039;t be used on your customer instance (until the install.lock file is deleted or the upgrade.unlock file is created).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS&#039;&#039;&#039; ► (A better name of this option should be MAIN_EXTERNAL_MAIL_CLIENT_IP_ADDRESS). Set here the list of IPs where your Dolibarr instances are hosted, separated by a comma. So, when your customer go into the Email setup area:&lt;br /&gt;
**If he has chosen mail method, a message will explain him how to setup its SPF record for its email domain (showing the list of IP). This is to avoid to have its emails, sent from its Dolibarr instance, fails due to strict antispam rule of some emailing servers.&lt;br /&gt;
**If he has chosen smtp method, a message will explain him the list of IP he can use if there is restriction on IP by the SMTP agent. If you also need to add a message to help SPF setup, see option &#039;&#039;&#039;MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can also provide a list of URLs that return just an IP instead of a list of hardcoded IP. So you can for example set 1 url that contact a whoami service that return the public IP of server and another one doing the one on a IPv6 address, so on the setup page, the public IP adress of the server will always be uptodate for both ipv4 and ipv6 (Example: &amp;quot;https://ipv4.server.com/_service_showmyip.php,https://ipv6.server.com/_service_showmyip.php&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD&#039;&#039;&#039; ► Set here the string to add in the SPF record This string will be shown into a help message when the user in in the setup of email page and has choose a method using an external SMTP server.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_FIRST_PING_OK_ID&#039;&#039;&#039; ► Set this value to &amp;quot;disabled&amp;quot; to remove completely any ping after a complete setup.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_FILECHECK_LOCAL_SUFFIX&#039;&#039;&#039; and &#039;&#039;&#039;MAIN_FILECHECK_LOCAL_EXT&#039;&#039;&#039; ► If you offer a customized or patched version of Dolibarr, when the user will use the tool to check the integrity of files, the default xml file name used for signature checking will be the official file provided by the Dolibarr team, so it does not includes your own changes. To have the suggested signature file being your own file, you can set the constant MAIN_FILECHECK_LOCAL_SUFFIX to a suffix. For example, set this to &amp;quot;&#039;&#039;&#039;-mysaassolution&#039;&#039;&#039;&amp;quot;. So, when the user will use the file integrity tool, the default file to check for signature will be &amp;quot;&#039;&#039;&#039;/install/filelist-10.0.2-mysaassolution.xml&#039;&#039;&#039;&amp;quot; instead of &amp;quot;&#039;&#039;&#039;/install/filelist-10.0.2.xml&#039;&#039;&#039;&amp;quot;. All you have to do is generate the signature file &#039;&#039;&#039;mysaassolution&#039;&#039;&#039; using the tool &#039;&#039;&#039;build/generate_filelist_xml.php&#039;&#039;&#039; and put this file into the install directory of your customer instance. Doing this, your customer, and yourself, will be able to check if a file was modified without being disturbed by false alerts due to your customized files or patches (they will be included in the signature used for check). Also, if you want to zip the customized signature file into &amp;quot;&#039;&#039;&#039;/install/filelist-10.0.2-mysaassolution.xml.zip&#039;&#039;&#039;&amp;quot;, you can set the constant MAIN_FILECHECK_LOCAL_EXT to &#039;.zip&#039;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP&#039;&#039;&#039; ► Set to 1 by default (so warning is hidden). You can set it to 0 to show a warning to encourage admin to set its own SMTP service.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_SENDMODE_password&#039;&#039;&#039; ► To force the mode to send the email on the &amp;quot;password forgotten&amp;quot; page. So you can decide to use php mail or SMTP method for this specific use case.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING&#039;&#039;&#039; ► If set to N, the warning saying modules are not activated will be shown if number of activated module is &amp;lt; N (Having this variable not defined is same than having it set to 1). This may be usefull if you preinstall an application with some modules already loaded by default and you want to keep the warning to be sure the user will enable other modules he need, even if some modules are already enabed.&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SETUP_MODULES_DESC&#039;&#039;&#039; ► If your installation is already done with activated module, the help message to explain how to enable a module on the setup page is hidden. You can keep it visible by adding this option to 1.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_NO_UPGRADE_REDIRECT_ON_LEVEL_3_CHANGE&#039;&#039;&#039; ► The page to make the migration is not shown automatically when you deploy files of version X.Y.Z+delta over an  installation with a database version X.Y.Z. The upgrade page will be shown automatically only if there is a change on value of X or Y in version.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SYSLOG_DISABLE_LOGHANDLER_SYSLOG&#039;&#039;&#039; ► Set this to 1 to disable usage of syslog (having all customer instances logging in the same system file is not a good idea).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;WEBSITE_REPLACE_INFO_ABOUT_USAGE_WITH_WEBSERVER&#039;&#039;&#039; ► Put here a text or a translation key of a text to show when the user will use the feature &amp;quot;Deploy&amp;quot; when he want to deploy a website done with Dolibarr CMS. So you can, for example, show him a message that this feature is not part of its subscription and putting a website online may need a complementary subscription.&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Setup_Other&amp;diff=65980</id>
		<title>Setup Other</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Setup_Other&amp;diff=65980"/>
		<updated>2026-04-22T13:00:01Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* Shipments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Paramétrage_Divers]]&lt;br /&gt;
[[es:Configuración_Varios]]&lt;br /&gt;
[[de:Erweiterte_Einstellungen]]&lt;br /&gt;
[[zh:其他设置]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Admin]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Help About Screen&#039;&#039;&#039;: Other setup&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Menu Path&#039;&#039;&#039;: Home ► Setup ► Other&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Introduction&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Some options are not visible in the interface (often because they are deprecated or are beta features). In most cases you do not need these functions and their use may make the application unstable or may not work as expected.&lt;br /&gt;
&lt;br /&gt;
 {{warning|32px}} This page contains the list of some advanced development parameters. In most cases, they are parameters for internal usage, development, external modules, features in development not stable or that may lead to security risk. For standard usage of Dolibarr, such parameters &#039;&#039;&#039;SHOULD NOT&#039;&#039;&#039; be used. All experimental options are NOT supported. They may be removed in a future, modified at any version and break stability of your application.&lt;br /&gt;
&lt;br /&gt;
To enable/override a parameter you have to define the constant name and set it to 1 (unless otherwise stated) in &amp;lt;code&amp;gt;Home ► Setup ► Other Setup&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The options here may not be documented since they are not stable and are unsupported (remember they are experimental or development options). The basic format of how the list is written is broken down in the example below:&lt;br /&gt;
&lt;br /&gt;
UNSTABLE_OR_DEV_OPTION ► &#039;&#039;Description of config and goal&#039;&#039; ► &#039;&#039;(specific version information) or values&#039;&#039;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
=Global Options=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;ADD_UNSPLASH_LOGIN_BACKGROUND&#039;&#039;&#039; ► The background image will be refreshed on every login page refresh. Background image is pulled from the popular open source image website Unsplash. If an already saved static background image exists, then this code will override it (but not delete the saved image). Warning: Using this may allow this external website to steel your login credentials (the value to be put is the URL of the service, exemple&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: https://source.unsplash.com/random) ► (v10.0)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_HIDE_POWERED_BY&#039;&#039;&#039; ► Hide the &amp;quot;Powered by Dolibarr&amp;quot; picto on public pages&lt;br /&gt;
*&#039;&#039;&#039;MAIN_APPLICATION_TITLE&#039;&#039;&#039; ► This will change the title of software (that appears on the login page by default). Warning: changing this may make Dolibarr version detection to fail by smartphone applications like [[Application Android - DoliDroid]], breaking some features when using Dolibarr from such application. If the text start with a &amp;quot;+&amp;quot;, the text will be added to the standard &amp;quot;Dolibarr&amp;quot; label instead of replacing it.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_AUTOFILL_DATE&#039;&#039;&#039; ► If this constant is defined (to something other than &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;), the date of invoice, proposal, order or payment are auto-filled with the current date. It is highly recommended to NOT ENABLE this feature. This can create a lot of input errors with data not validated by users. This leads to incorrect values saved in the database causing confusion when you have to do your accountancy reports!&lt;br /&gt;
*&#039;&#039;&#039;MAIN_AUTOFILL_DATE_PROPOSAL►&#039;&#039;&#039;If this constant is defined (to something other than 0), the date of  proposal is auto-filled with the current date.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_AUTO_TIMESTAMP_IN_PUBLIC_NOTES&#039;&#039;&#039; ► Add a timestamp and user automatically when editing the &#039;&#039;public&#039;&#039; note.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_AUTO_TIMESTAMP_IN_PRIVATE_NOTES&#039;&#039;&#039; ► Add a timestamp and user automatically when editing the &#039;&#039;private&#039;&#039; note.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DEFAULT_PAYMENT_TERM_ID&#039;&#039;&#039; ► With ID of a payment term, will use this as default payment term each time you create a new proposal, order, invoice (customer and supplier). Deprecated. Replaced with the default setup feature instead (see French page of wiki for some exemple&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: [[Paramétrage Valeurs par défaut]])&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DEFAULT_PAYMENT_TYPE_ID&#039;&#039;&#039; ► With ID of a payment type, will use this as default payment type each time you create a new proposal, order, invoice (customer and supplier). Deprecated. Replaced with the default setup feature instead (see French page of wiki for some exemple&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: [[Paramétrage Valeurs par défaut]])&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DEFAULT_LANGUAGE_FILTER&#039;&#039;&#039; ► Useful if you do not want to show &amp;lt;code&amp;gt;en_US&amp;lt;/code&amp;gt; language option in combo boxes (other languages can easily be removed in &amp;lt;code&amp;gt;langs&amp;lt;/code&amp;gt; directory but not &amp;lt;code&amp;gt;en_US&amp;lt;/code&amp;gt;) ► (v10.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_LANGUAGES_ALLOWED&#039;&#039;&#039; ► Is a list of languages without spaces, example&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: &amp;lt;code&amp;gt;fr_FR,en_US,de_DE,it_IT&amp;lt;/code&amp;gt; If defined, only those languages will appear in combos. ► (v11.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_NOTES_TAB&#039;&#039;&#039; ► Show or hide notes tab in the card page&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_CONTACTS_TAB&#039;&#039;&#039; ► Show or hide contacts tab in the card page&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_FULL_SCANLIST&#039;&#039;&#039; ► Disables the complete scan of tables to allow the pagination to show total number of pages. May be useful to activate on systems with a very high quantity of data (tables with more than 2 000 000 records).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_JQUERY_JNOTIFY&#039;&#039;&#039; ► Disable usage of &amp;lt;code&amp;gt;JNotify&amp;lt;/code&amp;gt; to show confirm or error messages&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_AJAX_COMBOX&#039;&#039;&#039; ► If you have a large number of third parties or products, you can disable the autocomplete feature on the third parties list by setting this constant to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; ► (v3.6.0+)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_MULTIPLE_FILEUPLOAD&#039;&#039;&#039; ► Disable users to upload multiple files at once.&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_TRUNC&#039;&#039;&#039; ► Disable all truncings in select list. ► (v7.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLEDRAFTSTATUS&#039;&#039;&#039; ► Disable the status &amp;quot;Draft&amp;quot; for some objects (project, donation, ...) so the object is directly created with status &amp;quot;Validated&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DOC_USE_OBJECT_THIRDPARTY_NAME&#039;&#039;&#039; ► Add name of thirdparty at begin of generated document.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DOC_USE_TIMING&#039;&#039;&#039; ► Add a timestamp at end of generated document. Value must be format of timestamp. For example: &amp;lt;code&amp;gt;%Y%m%d%H%M&amp;lt;/code&amp;gt; (only for ODT files)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DOC_UPLOAD_NOT_RENAME_BY_DEFAULT&#039;&#039;&#039; ► Disable the auto renaming on upload file ► (v10.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DOL_SCRIPTS_ROOT&#039;&#039;&#039; ► Define directory who contains &#039;scripts&#039; directory (e.g. &amp;lt;code&amp;gt;/var/www/dolibarr&amp;lt;/code&amp;gt;). Value of this variable may be requested by some external script or tools.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ENABLE_LOG_TO_HTML&#039;&#039;&#039; ► If this constant is defined, it is possible to have logs inside pages by adding the parameter &amp;lt;code&amp;gt;&amp;amp;logtohtml=1&amp;lt;/code&amp;gt; into URL.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES&#039;&#039;&#039; ► Allow to import lines into current document from &amp;quot;linked&amp;quot; compatible documents ► (v8.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_FIRST_TO_UPPER&#039;&#039;&#039; ► Dolibarr add uppercase to Third Parties, contacts or members names if not done. Warning: with some languages (whose words with uppercase are not same words, or pagecode does not always have an uppercase, like Cyrillic languages), this feature may alter your data.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ALL_TO_UPPER&#039;&#039;&#039; ► Dolibarr puts uppercase for Third Parties, contacts or members names if not done. Warning, with some languages (whose words with uppercase are not same words, or pagecode does not always have an uppercase, like Cyrillic languages), this feature may alter your data. ► (v11.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ALL_TOWN_TO_UPPER&#039;&#039;&#039; ► Dolibarr puts uppercase for town names if not done. ► (v13.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_FILESYSTEM_ENCODING&#039;&#039;&#039; ► With some PHP versions, PHP is not able to detect the page code for filesystem of the server OS. To solve this, Dolibarr assumes your OS filesystem is &amp;lt;code&amp;gt;UTF-8&amp;lt;/code&amp;gt; if on Linux or OSX system, and &amp;lt;code&amp;gt;ISO-8859-1&amp;lt;/code&amp;gt; if on Windows. If not, for example on a Windows server with a NTFS &amp;lt;code&amp;gt;UTF-8&amp;lt;/code&amp;gt; pagecode, you can set the variable &amp;lt;code&amp;gt;MAIN_FILESYSTEM_ENCODING&amp;lt;/code&amp;gt; to &amp;quot;&amp;lt;code&amp;gt;utf-8&amp;lt;/code&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_FORCELANGDIR&#039;&#039;&#039; ► Relative path of the directory holding your custom &amp;lt;code&amp;gt;langs&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
*&#039;&#039;&#039;MAIN_HTML_TITLE&#039;&#039;&#039; ► Can be used to control how the html page title is formatted. If value contains key &#039;&amp;lt;code&amp;gt;noapp&amp;lt;/code&amp;gt;&#039;, application name will not be output. If value contains &#039;&amp;lt;code&amp;gt;thirdpartynameonly&amp;lt;/code&amp;gt;&#039;, on tab for thirdparties, only name of thirdparties are output. Value can be list of tags: &#039;&amp;lt;code&amp;gt;noapp;thirdpartynameonly&amp;lt;/code&amp;gt;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_HELPCENTER_LINKTOUSE&#039;&#039;&#039; ► Define the URL link to use as the target page for link &amp;quot;I need help&amp;quot; onto logon page&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_LOGOUT_GOTO_URL&#039;&#039;&#039; ► URL to which the user will be redirected after LOGOUT&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAXTABS_IN_CARD&#039;&#039;&#039; ► Maximum number of tabs visible. Others are grouped into a combo list.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAXLIST_OVERLOAD&#039;&#039;&#039; ► Maximum number of line in space&#039;s domain.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING&#039;&#039;&#039; ► A warning saying setup of modules is not complete is shown if the number of enabled modules is lower or equal than this value (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; if not defined)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_NO_CONCAT_DESCRIPTION&#039;&#039;&#039; ► Allow to use only input custom description in lines (proposal, order, invoice) ► (v10.0)   &amp;lt; v20.0. [ OSBOLETE since 20.0 | SEE Product module admin configuration to set the description behavior of products and services ]. This value is overwritten by PRODUCT_AUTOFILL_DESC, controled by the option in the product module admin configuration, and is no longer used. Kept in code to allow compatibility if custom modules are using it. Removed completely from v22.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_OPTIMIZE_SPEED&#039;&#039;&#039; ► Use some speed enhancements. See page [[FAQ Increase Performance]] for more information.&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PASSWORD_FORGOTLINK  ►&#039;&#039;&#039; Change forgotten password link on login page. ► (v9.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN&#039;&#039;&#039; ► When creating an order, contract, invoice from another object, specific contacts of objects are set as specific contact of the new object when possible. ► (v4.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PUBLIC_NOTE_IN_ADDRESS&#039;&#039;&#039; ► Show public note in address block ► (v4.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_REMOVE_INSTALL_WARNING&#039;&#039;&#039; ► Remove all security warnings that appear to administrator users if URL &amp;lt;code&amp;gt;/install&amp;lt;/code&amp;gt; is public. You should solve the problem if warning occurs, instead of removing the warning! For this, create a file called &amp;lt;code&amp;gt;install.lock&amp;lt;/code&amp;gt; into Dolibarr root directory. This will stop the warning but also make the page &amp;lt;code&amp;gt;/install&amp;lt;/code&amp;gt; not possible to use, to protect your installation.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_REPEATCONTACTONEACHTAB&#039;&#039;&#039; ► If added and set to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, this adds contacts on all tabs, not only main tab.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_REPLACE_TRANS_xx_XX&#039;&#039;&#039; ► Where &amp;lt;code&amp;gt;xx_XX&amp;lt;/code&amp;gt; is language code. If value is &amp;lt;code&amp;gt;string1:newstring1;string2:newstring2&amp;lt;/code&amp;gt; then replace &amp;lt;code&amp;gt;string1&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;newstring1&amp;lt;/code&amp;gt; in all translation done for language &amp;lt;code&amp;gt;xx_XX&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND&#039;&#039;&#039; ► Change way of rounding total including tax of lines, rounding first of after.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND_SUPPLIER&#039;&#039;&#039;► Change way of rounding total including tax of lines, rounding first of after.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SERVER_TZ&#039;&#039;&#039; ► If you can&#039;t set the time zone of your PHP installation, set this constant. Better is to set it to UTC. In future, this constant will be forced to &#039;&amp;lt;code&amp;gt;UTC&amp;lt;/code&amp;gt;&#039; so PHP server time zone will not have effect any more. Examples: &amp;lt;code&amp;gt;Europe/Paris&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;auto&amp;lt;/code&amp;gt;. Dolibarr will apply the timezone before saving dates in the database. Meaning that if you remove the parameter the dates saved will not change back to UTC.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SEARCH_FORM_ON_HOME_AREAS&#039;&#039;&#039; ► Show the search form on home page areas for core modules (Removed after v5 due to global search combo) ► (v6.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED&#039;&#039;&#039; ► Disable the supplier invoice on the search form&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE&#039;&#039;&#039; ► If only one result is found, then setting this value to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; will take you direct to the item (default method).  Setting the value to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; will show the result in the list as a single result ► (v5.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SERVICES_ARE_ECOMMERCE_200238EC&#039;&#039;&#039;  ► If seller and buyer are in Europe and buyer is not a company, use the VAT of buying country. It can have value &#039;1&#039; or &#039;2&#039;. If value 2, the VATs available to select only the ones of buying country. If &#039;1&#039;, the VATs available to select mix the ones of selling country and the ones of buying country. ► (v18.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SHOW_TUNING_INFO&#039;&#039;&#039; ► Add tuning information into JavaScript console. Better when xdebug is enabled.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SHOW_TECHNICAL_ID&#039;&#039;&#039; ► Show also technical IDs on elements cards or some lists (not supported everywhere).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SHOWDATABASENAMEINHELPPAGESLINK&#039;&#039;&#039; ► Show database name in upper help menu ► (v8.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_ALTERNATE_TRANSLATION_FOR&#039;&#039;&#039; ► List of fields per object that need an alternate translation. Example: &amp;lt;code&amp;gt;MAIN_USE_ALTERNATE_TRANSLATION_FOR=societe:name,town;contact:firstname,lastname&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_HOURMIN_IN_DATE_RANGE&#039;&#039;&#039; ► On all entities lines (invoice, order, contract...), it is possible to add hour and minutes with date on fields &amp;quot;date start&amp;quot; and &amp;quot;date end&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_JQUERY_JEDITABLE&#039;&#039;&#039; ► Allow to update from screen, directly into database, some properties of elements (invoices, proposals, ...) using Ajax. This make response time faster, but avoid using this feature, because it bypasses some business actions (updates on other data that should be done consistently) and ignores business controls on data you saved. Consequently this feature breaks consistency of data and possibly the stability of the software.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_JQUERY_MULTISELECT&#039;&#039;&#039; ► Allow to use Ajax when a choice that require multiselect is used (for the moment only external modules uses select box with multiselect values). Set the value to the jQuery plugin name to use (multiselect, multiple-select, select2…). Setting it to any other value will result in unwanted side-effects and/or bugs.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_OLD_SEARCH_FORM&#039;&#039;&#039; ► Display the old search form in left menu.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS&#039;&#039;&#039; ► Allow to force the VAT rate to a given value (instead of higher VAT rate of country) if the VAT rate of product was not defined.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_UNKNOWN_CUSTOMERS_ARE_COMPANIES&#039;&#039;&#039; ► If we can&#039;t guess if a thirdparty is a company or individual (not VAT ID fill, no Prof ID fill, no type of thirdparty fill), then we suppose it is a company (B2B business) if 1, we suppose it is an individual (B2C business) if 0.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_VAT_COMPANIES_IN_EEC_WITH_INVALID_VAT_ID_ARE_INDIVIDUAL&#039;&#039;&#039; ► For intra CEE sales, we use by default, on proposal, order or invoice creation, a 0 VAT for customers that are companies (see MAIN_UNKNOWN_CUSTOMERS_ARE_COMPANIES to change behaviour to know if a thirdparty is a company or an individual). But if the option MAIN_USE_VAT_COMPANIES_IN_EEC_WITH_INVALID_VAT_ID_ARE_INDIVIDUAL is set, we will use the 0 VAT only if a VAT ID is defined for the customer.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_VAT_OF_PRODUCT_FOR_INDIVIDUAL_CUSTOMER_OUT_OF_EEC&#039;&#039;&#039; ► For to use the default VAT of product for individual customers that are out E.E.C. (European Economic Community) ► (v7.0+). &#039;&#039;There is no reason to use this.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_VIEW_LINE_NUMBER&#039;&#039;&#039; ► Shows a line number for each line of products/services at documents like proposal / order / invoice. Only on screen, not on PDF.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_VIEW_LINE_NUMBER_IN_LIST&#039;&#039;&#039; ► Shows a line number in lists ► (v12.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_VOLUME_DEFAULT_ROUND&#039;&#039;&#039; ► Accuracy of volume (number of decimals)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_VOLUME_DEFAULT_UNIT&#039;&#039;&#039; ► Default unit for weight (&amp;lt;code&amp;gt;0=kg&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-3=g&amp;lt;/code&amp;gt;, ...)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_WEIGHT_DEFAULT_ROUND&#039;&#039;&#039; ► Accuracy of weight (number of decimals)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_WEIGHT_DEFAULT_UNIT&#039;&#039;&#039; ► Default unit for weight (&amp;lt;code&amp;gt;0=kg&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-3=g&amp;lt;/code&amp;gt;, ...)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;USER_HIDE_INACTIVE_IN_COMBOBOX&#039;&#039;&#039; ► Disable display inactive users in combobox.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_PDF_THUMBS&#039;&#039;&#039; ► Disable thumbs PDF in case of imagick bug&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_KEEP_REF_CUSTOMER_ON_CLONING&#039;&#039;&#039; ► Keep the Customer Reference on cloned object (Propal/Invoice)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DONT_KEEP_NOTE_ON_CLONING&#039;&#039;&#039; ► Remove the object notes during cloning ► (v11.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DOC_SORT_FIELD&#039;&#039;&#039; ► Set the default sorting field on document page (name by default) ► (v11.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DOC_SORT_ORDER&#039;&#039;&#039; ► Set the default sorting order (ASC or DESC) on document page (ASC by default) ► (v11.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_ZIPTOWN_DICTIONNARY&#039;&#039;&#039; ► Use dictionary ZIP for create card.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_TOP_MENU_SEARCH_DROPDOWN&#039;&#039;&#039; ► Show search in top menu with theme eldy ► (v11.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PHONE_SEPAR&#039;&#039;&#039; ► Separ phone number other space ► (v12.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;GRAPH_USE_FISCAL_YEAR&#039;&#039;&#039; ► Widgets uses fiscal year&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SHOW_SOCINFO_ON_PRINT&#039;&#039;&#039; ► Permit to add user company information on each printed document (when click on Dolibarr print button) ► (v12.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_FEATURES_LEVEL&#039;&#039;&#039; ► Level of features to show: &amp;lt;code&amp;gt;-1=stable+deprecated&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0=stable only (default)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;1=stable+experimental&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;2=stable+experimental+development&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SHOW_TECHNICAL_ID&#039;&#039;&#039; ► Show technical id for object.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_HTTP_CONTENT_SECURITY_POLICY&#039;&#039;&#039; ► Allows you to fill in the content security rules ► (v6.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD&#039;&#039;&#039; ► Allow to change the link of the third party to customer/supplier card instead of contact card on List.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MODULE_SETUP_ON_LIST_BY_DEFAULT&#039;&#039;&#039; ► If set to &amp;quot;common&amp;quot; the setup module becomes list by defaut&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PAGESIZE_CHOICES&#039;&#039;&#039;  ► Configure select field to choose number of lines displayed on listing (&amp;lt;code&amp;gt;10:10,15:15,20:20,30:30,40:40,50:50,100:100,250:250,500:500,1000:1000,5000:5000&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_TOP_MENU_QUICKADD_DROPDOWN&#039;&#039;&#039; ► Add a dropdown menu with shortcuts to create new objects ► (v13.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER&#039;&#039;&#039; ► Remove the header stored by email collector ► (v13.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_VAT_OF_PRODUCT_FOR_COMPANIES_IN_EEC_WITH_INVALID_VAT_ID&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_OPTIMIZEFORTEXTBROWSER&#039;&#039;&#039; ► Optimise interface for a text only browser. This variable is set to 1 automatically if your browser is lynx or links&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_NB_OF_YEAR_IN_WIDGET_GRAPH&#039;&#039;&#039; ► Set the number of years visible on some graph of some widgets (2 is default value)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;API_DISABLE_LOGIN_API&#039;&#039;&#039; ►(v14.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_LOGIN_BADCHARUNAUTHORIZED&#039;&#039;&#039; ► Add possibility to define bad character unauthorized into login name REGEX expression (Default value is @&amp;lt;&amp;gt;&amp;quot;\&#039;)  ► (v16.0)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SHOW_ALL_FILES_ON_DOCUMENT_TOOLTIP&#039;&#039;&#039;  ► Add all files visible from the object to be visible from the list of object.&lt;br /&gt;
*&#039;&#039;&#039;MAIN_LIST_ALLOW_PUBLIC_NOTES&#039;&#039;&#039;  ► Display public notes on list&lt;br /&gt;
*&#039;&#039;&#039;MAIN_LIST_ALLOW_PRIVATE_NOTES&#039;&#039;&#039;  ► Display private notes on list&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_CHECKBOX_LEFT_COLUMN&#039;&#039;&#039; ► Display private check boxes on the left ► (v17.0)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_STATS_GRAPHS_SHOW_N_YEARS&#039;&#039;&#039; ► Nb of years to shows in widget and graph ► (v14.0)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_HOOK_DEBUG&#039;&#039;&#039; ► if &amp;gt;=2 the hook in the logs are more verbose ► (v18.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ENABLE_AJAX_TOOLTIP&#039;&#039;&#039; ► if 1 the tooltips are updated with AJAX request ► (v18.0)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_NO_INPUT_PRICE_WITH_TAX&#039;&#039;&#039; ► if 1 the TTC input field is removed from propal/invoices/... ► (v17.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_SELECT2_FOCUS_PROTECTION&#039;&#039;&#039; ► if 1 disable the focus protection ► (v17.0)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_ADVANCED_PERMS ►&#039;&#039;&#039; Add advanced user permission&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_FREE_PRODUCT_CHECKED_BY_DEFAULT ►&#039;&#039;&#039; Check &amp;quot;product&amp;quot; or &amp;quot;service&amp;quot; by default on order/invoices/propal cards (set value &amp;quot;product&amp;quot; or &amp;quot;service&amp;quot;)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_LINK_BY_REF ►&#039;&#039;&#039; Allow to link documents by choosing the type and ref from the object linked option&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Official supported option&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The following options are not hidden option. They are available by default from the interface.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ONLY_LOGIN_ALLOWED ►&#039;&#039;&#039; Activate maintenance mode and set user that is allowed to login. Value must be user login. Available into menu Home - Admin tools - User session, it is filled with admin user when clicking on button &amp;quot;Block other session&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Security Options=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SECURITY_ANTI_SSRF_SERVER_IP&#039;&#039;&#039; ► Can set a complete list of IPs of server.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SECURITY_CSRF_WITH_TOKEN&#039;&#039;&#039; ► Activate a second anti-CSRF protection on POST (so a POST from another web site can&#039;t be done). Note there is also a default protection using test on referrer that is not reliable. This second protection uses TOKEN on forms and is more powerful. Value can be: 0=CSRF protection disabled; 1=CSRF protection is on POST URLs only (default from version Dolibarr 15.0+); 2=CSRF protection is required on POST + some GET URL that contains some white listed parameters like the parameter &amp;quot;action&amp;quot; used to request database change (default from version Dolibarr 16+), 3=CSRF protection is enabled on any POST and GET URLs (a valid CSRF token is expected whatever are the parameters, warning: can be enabled on Dolibarr but some external modules developped by thirdparty may not be ready yet with this option)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MODULES_FOR_EXTERNAL&#039;&#039;&#039; ► Limit available modules for external users. By default value is &#039;&amp;lt;code&amp;gt;facture,commande,contact,propal,projet,contrat,societe,ficheinter,expedition,agenda&amp;lt;/code&amp;gt;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ALLOW_SVG_FILES_AS_IMAGES&#039;&#039;&#039; ► Allow to use SVG file as image files. Warning: This may introduce security vulnerability (javascript can be embedded into SVG file).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_RESTRICTHTML_ONLY_VALID_HTML&#039;&#039;&#039; ► Refused parameter if value is not a valid HTML content. The content is also sanitized with Tidy.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY&#039;&#039;&#039; ► Refused parameter if value is not a HTML content validated by Tidy PHP library. The content is also sanitized with Tidy.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES&#039;&#039;&#039; ► Sanitize also non standard attributes on HTML content.&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SECURITY_SALT&#039;&#039;&#039; ► A salt string to base the hashing on. 8 strings length recommended.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SECURITY_MAX_IMG_IN_HTML_CONTENT&#039;&#039;&#039; ► Maximum number of Images on the HTML content&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SECURITY_ALLOW_UNSECURED_LABELS_WITH_HTML&#039;&#039;&#039; ► Allow HTML tags into products label&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SECURITY_FORCERP&#039;&#039;&#039; = &amp;quot;strict-origin-when-cross-origin&amp;quot; (default) so browser doesn&#039;t send any referrer when going into another web site domain / &amp;quot;same-origin&amp;quot; / &amp;quot;strict-origin&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Members Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MEMBER_NEWFORM_FORCEMORPHY&#039;&#039;&#039; ► Force nature of member set to &amp;quot;phy&amp;quot; for physical or to &amp;quot;mor&amp;quot; for moral ► (v12.0)&lt;br /&gt;
*&#039;&#039;&#039;MEMBER_ALLOW_CHANGE_OF_TYPE&#039;&#039;&#039; ► Member can edit their type on public subscription page ► (v13.0)&lt;br /&gt;
*&#039;&#039;&#039;ADHERENT_DEFAULT_CREATE_THIRDPARTY&#039;&#039;&#039; ► Thirdparty is created when creating a new member ► (v13.0)&lt;br /&gt;
*&#039;&#039;&#039;MEMBER_SUBSCRIPTION_SUGGEST_END_OF_MONTH&#039;&#039;&#039; ► If set to 1, the member subscription end date will be suggested for the end of the month ► (v18.0)&lt;br /&gt;
*&#039;&#039;&#039;MEMBER_SUBSCRIPTION_SUGGEST_END_OF_YEAR&#039;&#039;&#039; ► If set to 1, the member subscription end date will be suggested for the end of the year ► (v18.0)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_NB_OF_YEAR_IN_MEMBERSHIP_WIDGET_GRAPH&#039;&#039;&#039; ► If set, it limits the number of years visible on graph and widgets of membership (empty is default value to show all) ► (v18.0)&lt;br /&gt;
*&#039;&#039;&#039;MEMBER_NO_SYNC_LINKED_THIRDPARTY ►&#039;&#039;&#039; If set, changes to a member will not be synchronized to a linked third party. ► (v23.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Accounting Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;ACCOUNTANCY_COMBO_FOR_AUX&#039;&#039;&#039; ► Add graphic option for ACCOUNTANCY_COMBO_FOR_AUX. Having this option on may slow down and even freeze the accounting features if you have a very large number of thirdparties ► (v10.0)&lt;br /&gt;
*&#039;&#039;&#039;ACCOUNTING_DEFAULT_NOT_NOTIFIED_VALIDATION_DATE&#039;&#039;&#039; ► Avoid validating the lines with the accountancy export.(1= box unchecked by default / 0 = box checked by default) ► (v14.0)&lt;br /&gt;
*&#039;&#039;&#039;ACCOUNTING_DEFAULT_NOT_NOTIFIED_EXPORT_DATE&#039;&#039;&#039; ► Avoid flagging the lines as exported with the accountancy export.(1= box unchecked by default / 0 = box checked by default) ► (v14.0)&lt;br /&gt;
*&#039;&#039;&#039;ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY ►&#039;&#039;&#039; Add 2 fields on thirdparty card which allow you to set an account for all sells products and an other for all buying products for this customer ► (v14.0)&lt;br /&gt;
*&#039;&#039;&#039;ACCOUNTING_MANAGE_ZERO&#039;&#039;&#039; &#039;&#039;&#039;►&#039;&#039;&#039; Allow to manage char 0 in accounting account (if enabled 1 ≠ 10) ► (v14.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Agenda Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;AGENDA_ALL_CALENDARS&#039;&#039;&#039; ► Change the default view of calendar pages to see all the Agenda&#039;s (instead or yours only be default)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS&#039;&#039;&#039; ► To automatically set end date of event to start date + delta on event creation page.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;AGENDA_DISABLE_LOCATION&#039;&#039;&#039; ► Disable location field in action card  ► (&amp;gt;=v5.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;AGENDA_MAX_EVENTS_DAY_VIEW&#039;&#039;&#039; ► Define the maximum number of visible entries for each day in agenda. Default value is 3. Value 0 means no limit.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;AGENDA_USE_EVENT_TYPE&#039;&#039;&#039; ► Add a mandatory field &amp;quot;Type&amp;quot; when creating an event (&#039;&#039;&#039;&#039;&#039;deprecated&#039;&#039;&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ADD_EVENT_ON_ELEMENT_CARD&#039;&#039;&#039; ► Allow to create an event from a document (proposal, order, invoice)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;AGENDA_SUPPORT_PRIORITY_IN_EVENTS&#039;&#039;&#039; ► Allow to have priorities in events ► (&amp;gt;=v13.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;AGENDA_ADDACTIONFORPHONE&#039;&#039;&#039; ► Allow you to create a event from phone number ► (=&amp;lt;v12.0) - Need to be fix for (=&amp;gt;v12.0) https://github.com/Dolibarr/dolibarr/issues/22720&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;AGENDA_ADDACTIONFOREMAIL&#039;&#039;&#039; ► Allow you to create a event from Email ► (=&amp;lt;v12.0) - Need to be fix for (=&amp;gt;v12.0) https://github.com/Dolibarr/dolibarr/issues/22720&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT&#039;&#039;&#039; ► Allow you to add any contact on events if set at 1a https://github.com/Dolibarr/dolibarr/releases/tag/18.0.0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
=Bank Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;BANK_CAN_RECONCILIATE_CASHACCOUNT&#039;&#039;&#039; ► Can reconciliate cash accounts ► (v3.8)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;BANK_DISABLE_CHECK_DEPOSIT&#039;&#039;&#039; ► Disable check deposit feature&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;BANK_ASK_PAYMENT_BANK_DURING_ORDER&#039;&#039;&#039; ► Ask bank account during creation of an order&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL&#039;&#039;&#039; ► Ask bank account during creation of a proposal&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;BANK_USE_OLD_VARIOUS_PAYMENT&#039;&#039;&#039; ► To allow to enter miscellaneous payments (not covered by other modules) using old method. &#039;&#039;&#039;&#039;&#039;Deprecated&#039;&#039;&#039;&#039;&#039;. Entering various payment is preferred ► (&amp;lt;=v12.0).&lt;br /&gt;
*&#039;&#039;&#039;MAIN_IBAN_IS_NEVER_MANDATORY&#039;&#039;&#039; ► IBAN and BIC informations not mandatory. (V15)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=BOM and MO Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;ALLOW_USE_KITS_INTO_BOM_AND_MO&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;BOM_SUB_BOM&#039;&#039;&#039; ►Allow to add a BOM in another BOM►(v16.0)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Bookmarks Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;BOOKMARKS_SHOW_IN_MENU&#039;&#039;&#039; ► Numbers of bookmark entries to be displayed (10 by default)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Inalterable Log Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;BLOCKEDLOG_ADD_ACTIONS_SUPPORTED&#039;&#039;&#039; ► Can complete list of triggered action that are logged&lt;br /&gt;
*&#039;&#039;&#039;BLOCKEDLOG_USE_REMOTE_AUTHORITY&#039;&#039;&#039; ► URL of the remote authority for the blockchain&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Category-Tags Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;CATEGORY_SHOW_COUNTS&#039;&#039;&#039; ► Shows nb of object by tags in tag tree&lt;br /&gt;
*&#039;&#039;&#039;CATEGORY_EDIT_IN_MENU_NOT_IN_POPUP ►&#039;&#039;&#039; Display categories menu instead of managing it only from &amp;quot;Tools&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Contracts=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;CONTRACT_SUPPORT_PRODUCTS&#039;&#039;&#039; ► Products are also suggested into module contract.&lt;br /&gt;
*&#039;&#039;&#039;CONTRACT_ALLOW_EXTERNAL_DOWNLOAD&#039;&#039;&#039; ► When a PDF is generated, a share key is automatically set so the file can be downloaded using the share key. ► (v7.0+)&lt;br /&gt;
*&#039;&#039;&#039;CONTRACT_HIDE_PLANNED_DATE_ON_PDF&#039;&#039;&#039; ► allows you to not display dates on pdf files.&lt;br /&gt;
*&#039;&#039;&#039;CONTRACT_HIDE_REAL_DATE_ON_PDF&#039;&#039;&#039; ► allows you to not display dates on pdf files.&lt;br /&gt;
*&#039;&#039;&#039;CONTRACT_HIDE_PRICE_ON_PDF&#039;&#039;&#039; ► allows you to not display price on pdf files.&lt;br /&gt;
*&#039;&#039;&#039;CONTRACT_HIDE_QTY_ON_PDF&#039;&#039;&#039; ► allows you to not quantity dates on pdf files.&lt;br /&gt;
*&#039;&#039;&#039;CONTRACT_SHOW_SIGNATURE_STATUS_WITH_SERVICE_STATUS&#039;&#039;&#039; ► Show signature status in contract card (Sign by all parties).► (v21.0+)&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Cron module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;CRON_DISABLE_KEY_CHANGE&#039;&#039;&#039; ► When you provide an instance to a customer, you probably also add an entry in the cron of this user so Dolibarr batch and scheduler can work correctly. For security purpose, it may have a security key that is inside the command line into the cron entry and this entry must match the value defined into Dolibarr setup (setup of module &#039;Scheduled Jobs&#039;). Because, a customer of a Saas platform will probably have no access to edit the cron file, it is also import that he has no way to edit the key into the Dolibarr setup, so the key in the cron command line will always match the key in Dolibarr setup, and the Dolibarr batches will executed without security errors. To be sure, the customer does not change the value, you can set this constant to 1 into the table [[Table_llx_const]].&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;CRON_DISABLE_TUTORIAL_CRON&#039;&#039;&#039; ► Disable the tutorial about how to install the cron script (on a SaaS hosting, this should be done by the web hosting provider)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;CRON_WARNING_DELAY_HOURS&#039;&#039;&#039; ► Set this value to the frequency set for the cron script (so a warning will be shown to user to warn it about max frequency of its scheduled jobs)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Direct Debit Orders=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS&#039;&#039;&#039; ► If this option is set, all invoices status (even already paid) may appear on the list of invoices qualified for a direct debit payment. This is the list of invoices with a payment request done, and not linked to a direct debit payment. By default, only &amp;quot;unpayed&amp;quot; invoices are used to avoid to pay twice the same invoice.&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Donation Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;DONATION_USE_THIRDPARTIES&#039;&#039;&#039; ► If this option is set, a thirdparty field appear on donation forms.&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
=Email=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_COPY_FILE_IN_EVENT_AUTO&#039;&#039;&#039; ► Add attachment document on event auto generated by sending email from dolibarr. ► (v6.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_EMAIL_USE_LAYOUT&#039;&#039;&#039;► Enable the use of predefined layout when writing an email.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAILFORM_DISABLE_ENTERKEY&#039;&#039;&#039; ► Activate JavaScript code to disable the enter key in the MAIL form. ► (&amp;gt;= 8.0.1)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_DEBUG&#039;&#039;&#039; ► Write content with header of last mail into file &amp;lt;code&amp;gt;dolibarr_mail.log&amp;lt;/code&amp;gt; into directory &amp;lt;code&amp;gt;dolibarr_main_data_root&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_DEBUG_ERR_WITH_DATE&#039;&#039;&#039; ► Use a different filename (by adding a prefix of date) for each email sent with error when MAIN_MAIL_DEBUG.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_DEBUG_LOG_WITH_DATE&#039;&#039;&#039; ► Use a different filename (by adding a prefix of date) to log each email sent (whatever is result) when MAIN_MAIL_DEBUG.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_FORCE_FROM&#039;&#039;&#039; ► (v19+) Can force the value into the From field of the SMTP header. Note that email sender is always saved into the &amp;quot;Reply-To&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_ALLOW_SENDMAIL_F&#039;&#039;&#039; ► On Linux or BSD system, PHP email function use the command sendmail local to server. In some cases, the sender email must be provided on command line of sendmail with option &amp;lt;code&amp;gt;-f&amp;lt;/code&amp;gt;. This option is here to ask Dolibarr to call the function mail of PHP by adding value for the option &amp;lt;code&amp;gt;-f&amp;lt;/code&amp;gt;. Note that in most cases, even with sendmail, sender email is correctly managed as it is added in the email technical header. This option is here only for setup or version of sendmail that ask the -f option to be mandatory or for sendmail setup that does not use by default the From of the header email to define the sender (with this option, the from can be forced on command line to avoid to have the from lost by sendmail).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_SENDMAIL_FORCE_BA&#039;&#039;&#039; ► On Linux or BSD system, PHP email function use the command sendmail local to server. In some case, we want to recipient to be provided to sendmail into the email content instead of its command line parameter. For this we must add the -ba parameter to sendmail. This option asks PHP to provide this parameter when sending a mail. Note that another solution is to edit the mail.force_extra_parameters=-ba into &amp;lt;code&amp;gt;php.ini&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_NO_FULL_EMAIL&#039;&#039;&#039; ► Recipient email and sender are cleaned to be on form &amp;quot;&amp;lt;email&amp;gt;&amp;quot; instead of &amp;quot;Name &amp;lt;email&amp;gt;&amp;quot;. This might solve problem of compatibility with very old mailers.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_FIX_FOR_BUGGED_MTA&#039;&#039;&#039; ► Some MTA agent are bugged and add some CR chars each time they saw a LF. Because Dolibarr emails are forged to be already cleaned, if MTA agent do that, you will send an email with two CR chars. This may result in having recipient not able to read your email. To fix this, add this constant to 1. Dolibarr will then create an email that is not RFC compliant, but because the MTA agent is bugged, the email will be modified and become correct during sending, solving the problem of bad email received. Add this constant to 1 if your recipient experience problems when opening email for example users using webmail of &amp;lt;code&amp;gt;orange.fr&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;hotmail.com&amp;lt;/code&amp;gt;. Note that some users have reported that when using Exim (Exim 4), you must set this parameter to 0. Default value is 1 but may be changed to 0 in future.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_DO_NOT_USE_SIGN&#039;&#039;&#039; ► Do not add user signature at end of suggested pre-defined email&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_FORCE_NOT_SENDING_TO&#039;&#039;&#039; ► If en email is defined into this variable, emails will never be sent to this email.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIL_FORCE_DELIVERY_RECEIPT_INVOICE&#039;&#039;&#039; ► Set default as &amp;quot;Yes&amp;quot; on requesting delivery receipt when sending email through the &#039;&#039;Customer Invoice&#039;&#039; module.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIL_FORCE_DELIVERY_RECEIPT_ORDER&#039;&#039;&#039; ► Set default as &amp;quot;Yes&amp;quot; on requesting delivery receipt when sending email through the &#039;&#039;Customer Order&#039;&#039; module.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIL_FORCE_DELIVERY_RECEIPT_PROPAL&#039;&#039;&#039; ► Set default as &amp;quot;Yes&amp;quot; on requesting delivery receipt when sending email through the &#039;&#039;Customer Proposal&#039;&#039; module.&lt;br /&gt;
*&#039;&#039;&#039;MAIL_FORCE_DELIVERY_RECEIPT_SUPPLIER_PROPOSAL&#039;&#039;&#039; ► Set default as &amp;quot;Yes&amp;quot; on requesting delivery receipt when sending email through the &#039;&#039;Supplier Proposal&#039;&#039; module.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_EMAIL_SUPPORT_ACK ►&#039;&#039;&#039; Restore email acknowledgment checkbox on sending emails. This feature is commonly abandoned by mailers. Active from Dolibarr V17 - see [https://github.com/Dolibarr/dolibarr/blob/33744f74da1a5c20f8aa9950018ab4e549e00205/ChangeLog#L53 changelog]&lt;br /&gt;
*&#039;&#039;&#039;MAIN_EMAIL_USECCC&#039;&#039;&#039; ► 1 = Shows field BCC into email forms, If value is an email = Shows the BCC pre filled with the email value.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_AUTOCOPY_PROPOSAL_TO&#039;&#039;&#039;, &#039;&#039;&#039;MAIN_MAIL_AUTOCOPY_ORDER_TO&#039;&#039;&#039;, &#039;&#039;&#039;MAIN_MAIL_AUTOCOPY_INVOICE_TO&#039;&#039;&#039;, &#039;&#039;&#039;MAIN_MAIL_AUTOCOPY_SHIPMENT_TO&#039;&#039;&#039;, &#039;&#039;&#039;MAIN_MAIL_AUTOCOPY_..._TO&#039;&#039;&#039; ► Email to use as a BCC recipient when sending email for proposal, order or invoice. You can make this value visible by setting MAIN_EMAIL_USECCC (to 1 or to another email, see previous point)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_EMAIL_ADD_TRACK_ID&#039;&#039;&#039; ► When value is 1 (this is also default value if option is not set): The record &amp;quot;Message-id&amp;quot; added into smtp header includes a tracking id to define where the email was sent from. When value is 2: you send an email from third party card, the sender email is completed with the email source tracking string  &amp;quot;+thiXXX&amp;quot; on email (your email will be sent with the &amp;quot;From&amp;quot; that is myname+thi123@mycompany.com). So when user receiving email will make &amp;quot;Answer&amp;quot;, email will be sent to myname@mycompany.com but with the tracking id included (into header or into target email), allowing you to know to which third party or object, the email exchange is related to.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL&#039;&#039;&#039; ► Restrict sending of 1 email message to &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; recipients for same email message (x for To: + CC: + BCC:). If not defined, value is &amp;lt;code&amp;gt;10&amp;lt;/code&amp;gt;. Required to fight against spamming that include 1000 recipients in 1 message. Note that &#039;&#039;&#039;MAIL_MAX_NB_OF_RECIPIENTS_TO_IN_SAME_EMAIL&#039;&#039;&#039;, &#039;&#039;&#039;MAIL_MAX_NB_OF_RECIPIENTS_CC_IN_SAME_EMAIL&#039;&#039;&#039; and &#039;&#039;&#039;MAIL_MAX_NB_OF_RECIPIENTS_BCC_IN_SAME_EMAIL&#039;&#039;&#039; are also available.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_FORCE_CONTENT_TYPE_TO_HTML&#039;&#039;&#039; ► Force to send all email (event with text only content) as HTML formatted email.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_USE_MULTI_PART&#039;&#039;&#039; ► Forge email content using an alternate text part ► (for 5.0.2+). By default with 6.0+&lt;br /&gt;
*&#039;&#039;&#039;MAIN_INFO_SOCIETE_MAIL_ALIASES&#039;&#039;&#039; ► add address aliases for the from field on mail. Set his value with &amp;quot;Firstname Name &amp;lt;firstname.lastname@mydomain.tld, Otherfirstname OtherlastName &amp;lt;othermail@mydomain.tld&amp;gt;,...&amp;quot; ► (v5.0.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_ADD_INLINE_IMAGES_IF_IN_MEDIAS&#039;&#039;&#039; ► If images were stored into the medias directory from CKEditor, then images into emails are replaced with &amp;quot;inline content&amp;quot;. This may increase seriously risk of being detected as SPAM.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS&#039;&#039;&#039; ► (A better name of this option should be MAIN_EXTERNAL_MAIL_CLIENT_IP_ADDRESS). Set here the list of IPs where your Dolibarr instances are hosted. You can also set the URLs where to get the IP addresses, for exemple: &amp;quot;https://ipv4.urltoshowip.com/_service_showmyip.php,https://ipv6.urltoshowup.com/_service_showmyip.php. So when your customer go into the setup area of email:&lt;br /&gt;
**If he chose mail method, a message will explain him how to setup its SPF record for its email domain (showing the list of IP). This is to avoid to have its emails, sent from its Dolibarr instance, fails due to strict antispam rule of some emailing servers.&lt;br /&gt;
**If he chose smtp method, a message will explain him the list of IP he can use if there is restriction on IP by the SMTP agent. If you also need to add a message to help SPF setup, see option &#039;&#039;&#039;MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_IMAP_USE_PHPIMAP&#039;&#039;&#039; ► Use embedded PHP-imap library (not using the native php imap) instead of native php imap extension ► (v17.0+, available as official option in setup of emailcollector by default from v19)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_ENABLED_USER_DEST_SELECT&#039;&#039;&#039; ► Show also internal users into list of recipients of email in email sending form ► (v8.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIL_PREFIX_FOR_EMAIL_ID&#039;&#039;&#039; ► Prefix for the mails ID. Default value is &amp;lt;code&amp;gt;$_SERVER[&amp;quot;SERVER_NAME&amp;quot;]&amp;lt;/code&amp;gt; ► (&amp;gt;= 8.0.1)&lt;br /&gt;
*&#039;&#039;&#039;MAIL_MASS_ACTION_SEARCH_MOST_RECENT_FILE_IF_NOT_FOUND&#039;&#039;&#039; ► When sending an email from a mass action. If the path saved in DB does not point to an existing file, then search for the most recent file and use it as an attahcment.► (&amp;gt;= 24.0.0)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=SMS= &lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SMS_DEBUG&#039;&#039;&#039; ► Write content of SMS sent into file &amp;lt;code&amp;gt;dolibarr_sms.log&amp;lt;/code&amp;gt; into directory &amp;lt;code&amp;gt;dolibarr_main_data_root&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Emailing Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAILING_PREFIX_FOR_EMAIL_ID&#039;&#039;&#039; ► Set the value that will be used to compose the &amp;quot;Email ID&amp;quot; into email headers. If you set this value to &#039;&amp;lt;code&amp;gt;SERVER_NAME&amp;lt;/code&amp;gt;&#039;, the virtual host of web server will be used. By default, this is not defined, so a hash key, unique to each instance, is used.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAILING_NO_USING_PHPMAIL&#039;&#039;&#039; ► If set, the module emailing can&#039;t be used with mail setup of &amp;quot;phpmail&amp;quot;. Using a thirdparty SMTP server is required. You can complete warning message by adding an email to contact for setup help with constant &amp;lt;code&amp;gt;&#039;&#039;&#039;MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS&#039;&#039;&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS&#039;&#039;&#039; ► Contains the email of contact to show into the message visible to a user when he try to use emailing module without SMTP server and if option &#039;&#039;&#039;MAILING_NO_USING_PHPMAIL&#039;&#039;&#039; is set to on.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAILING_LIMIT_WARNING_PHPMAIL&#039;&#039;&#039; ► Show a warning message (var contains the &#039;&#039;&#039;message to show&#039;&#039;&#039;, or &#039;&#039;&#039;translation key&#039;&#039;&#039;) on emailing send form if setup is on &amp;quot;phpmail&amp;quot;. Note: The application always try to translate the message considering the message is a translation key, before showing the translation or message if translation was not found.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAILING_LIMIT_WARNING_NOPHPMAIL&#039;&#039;&#039; ► Show a warning message (var contains the &#039;&#039;&#039;message to show&#039;&#039;&#039;, or &#039;&#039;&#039;translation key&#039;&#039;&#039;) on emailing send form if setup is something else than &amp;quot;phpmail&amp;quot;. Note: The application always try to translation the message considering the message is a translation key, before showing the translation or message if translation was not found.&lt;br /&gt;
*&#039;&#039;&#039;EMAILING_USE_ADVANCED_SELECTOR&#039;&#039;&#039; ► Enable the advanced selector for recipients.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAILING_LIMIT_SENDBYWEB&#039;&#039;&#039; ► Restrict number of emails you can send in same sending session with emailing module from GUI. The value &amp;quot;&amp;lt;code&amp;gt;dolibarr_mailing_limit_sendbyweb&amp;lt;/code&amp;gt;&amp;quot; if defined into config file is used in priority for this limit. A negative value means, sending by web is forbidden.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAILING_LIMIT_SENDBYCLI&#039;&#039;&#039; ► Restrict number of emails you can send in same sending session with emailing module from CLI script. The value &amp;quot;&amp;lt;code&amp;gt;dolibarr_mailing_limit_sendbycli&amp;lt;/code&amp;gt;&amp;quot; if defined into config file is used in priority for this limit.&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Expense Report=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;EXPENSEREPORT_ALLOW_OVERLAPPING_PERIODS&#039;&#039;&#039; ► Can enter several expense reports on same or overlapping date periods. ► (v7.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;EXPENSEREPORT_OVERRIDE_VAT&#039;&#039;&#039; ► Setting this constant to 1 will allow expense reports to show VAT even if the global VAT setting is off ► (v10.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;EXPENSEREPORT_USE_OLD_NUMBERING_RULE&#039;&#039;&#039; ► The module Expense Report use numbering rules that you can setup (like other modules do). If you need to keep the hard-coded numbering rule of expenses report used in v6.0 set this constant to 1 ► (&amp;gt;=v7.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_EXPENSE_IK&#039;&#039;&#039; ► This feature allows you to set index kilometres against a mileage index for different types of vehicles. ► (v7.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_EXPENSE_RULE&#039;&#039;&#039; ► This feature allows you to set a variety of rules per user/group/all so they can only create reports within their limits. ► (v7.0+)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Export Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;EXPORT_CSV_SEPARATOR_TO_USE&#039;&#039;&#039; ► String value to use as default separator to delimit fields of exported files (by default Dolibarr uses &amp;quot;&amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;&amp;quot;). Example: EXPORT_CSV_SEPARATOR_TO_USE=&amp;lt;code&amp;gt;;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;EXPORT_CSV_FORCE_CHARSET&#039;&#039;&#039; ► Choose the charset used in the output file built by the CSV exporter. By default it is ISO-8859-1. Example: EXPORT_CSV_FORCE_CHARSET= &amp;lt;code&amp;gt;utf-8&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;EXPORTTOOL_CATEGORIES&#039;&#039;&#039; ► Can export categories (several lines) into one column with the &amp;quot;product export profile&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;USE_STRICT_CSV_RULES&#039;&#039;&#039; ► Use strict/real CSV format for export. Do not clean/replace CR+LF with &#039;\n&#039; but quote them using the escaping CSV char (&amp;lt;code&amp;gt;&amp;quot;&amp;lt;/code&amp;gt;).&lt;br /&gt;
*&#039;&#039;&#039;EXPORTS_SHARE_MODELS&#039;&#039;&#039;  ► Share export models between users.&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Foundation Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MEMBER_URL_REDIRECT_SUBSCRIPTION&#039;&#039;&#039; ► Link called and shown when a member account is autocreated in member module by a guest user.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MEMBER_EXT_URL_SUBSCRIPTION_INFO&#039;&#039;&#039; ► Link of external page pointed by the &amp;quot;Show here&amp;quot; link added in front of payment cell, into the page to make online subscription.&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=Holiday Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;HOLIDAY_HIDE_BALANCE&#039;&#039;&#039; ► Hide the user&#039;s vacation balance on the vacation request page&lt;br /&gt;
&lt;br /&gt;
[https://wiki.dolibarr.org/Setup_Other#Top (back to top)]&lt;br /&gt;
=Interventions Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;FICHINTER_CLASSIFY_BILLED&#039;&#039;&#039;► Allow to classify an intervention card as &amp;quot;Billed&amp;quot;. This add also trigger &amp;lt;code&amp;gt;FICHINTER_CLASSIFY_BILLED&amp;lt;/code&amp;gt; into list of possible automatic event into agenda.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;FICHINTER_DISABLE_DETAILS&#039;&#039;&#039;► Disable entry of detail lines on intervention. Can validate with no line. Only one line will be shown per intervention on list.&lt;br /&gt;
**If set to &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; details are disabled only on intervention list ► (v21.0+)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Invoice Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DEPOSIT_MULTI_TVA&#039;&#039;&#039; ► In deposits invoice, creates one line per VAT rate from the origin document ► (6.0)&lt;br /&gt;
*&#039;&#039;&#039;PDF_INVOICE_SHOW_PRICE_INCL_TAX&#039;&#039;&#039; ► In customer&#039;s invoice, add a column with the total including all taxes  ►&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_ALLOW_REUSE_OF_CREDIT_WHEN_PARTIALLY_REFUNDED&#039;&#039;&#039; ► If a credit note was partially refunded (a refund was sent to the customer), with common situation, we wait to have the remain refunded too. With this option, it is possible to convert the remain of invoice into a discount to reuse it into another invoice.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_INVOICE_ALLOW_REUSE_OF_CREDIT_WHEN_PARTIALLY_REFUNDED&#039;&#039;&#039; ► See INVOICE_ALLOW_REUSE_OF_CREDIT_WHEN_PARTIALLY_REFUNDED, but for supplier credit notes.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_CAN_BE_EDITED_EVEN_IF_PAYMENT_DONE&#039;&#039;&#039; ► Allow to edit invoices even if payment was started. Note: If the module &amp;quot;BlockedLog&amp;quot; is active (required in some countries for legal reasons), this will not change content of archived logs tracked by this module. By definition there is no way to change or remove archived records. It will just update data in your application and a new record to track your change  will be recorded into the archive log.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_CAN_ALWAYS_BE_REMOVED&#039;&#039;&#039; ► Allow to always delete invoices (even if invoice is not last one). Note: If the module &amp;quot;BlockedLog&amp;quot; is active (required by some countries for legal reason), this will not change content of archived logs tracked by this module. By definition there is no way to change or remove archived records. It will just update data in your application and a new record to track your change into the read-only archive log.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_CAN_NEVER_BE_EDITED&#039;&#039;&#039; ► Never allow to edit invoices (except draft invoices with ref like (PROV%)). See also INVOICE_CAN_NEVER_BE_REMOVED.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_CAN_NEVER_BE_REMOVED&#039;&#039;&#039; ► Never allow to delete invoices (except draft invoices with ref like (PROV%)). See also INVOICE_CAN_NEVER_BE_EDITED&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_POSITIVE_CREDIT_NOTE&#039;&#039;&#039; ► All amounts on PDF credit notes are positive.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;FACTURE_DEPOSITS_ARE_JUST_PAYMENTS&#039;&#039;&#039; ► An old way to create initial payment. This treats deposit invoices as a special case and not as legal deposit invoice. Deposit invoices don&#039;t get counted on turnover. They are then applied as a payment, like a discount, on the final invoice. By default, when you include the deposit into draft of final invoice, the amount of final invoice is reduced. With this option, final amount is not reduced but a payment is registered. WARNING: In a lot of european countries, using this option is not allowed.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;FACTURE_SENDBYEMAIL_FOR_ALL_STATUS&#039;&#039;&#039; ► Can send invoice by email to customer even if invoice has status &amp;quot;draft&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_CREDIT_NOTE_STANDALONE&#039;&#039;&#039; ► Start implementation to allow a credit note even without invoice (dangerous) ► (v3.9)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_USE_SITUATION&#039;&#039;&#039; ► 1=Enable the &amp;quot;situation invoice&amp;quot; feature. Warning, this feature is bugged and may not be compatible with the final version of the feature once the bug will be solved. Also, using the double-entry accountancy module is not possible when this option is on (due to the same design problem). 2=Enable the &amp;quot;situation invoice&amp;quot; feature with a rewrite. This mode should be better to become a future stable feature.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_USE_SITUATION_CREDIT_NOTE&#039;&#039;&#039; ► Enable the &amp;quot;situation credit note&amp;quot; feature (need &amp;lt;code&amp;gt;INVOICE_USE_SITUATION&amp;lt;/code&amp;gt;) ► (v8.0)&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_USE_RETAINED_WARRANTY&#039;&#039;&#039; ► Enable the retained warranty on invoice ► (v14.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_DISABLE_DEPOSIT&#039;&#039;&#039; ► Disable deposit invoices&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_DISABLE_REPLACEMENT&#039;&#039;&#039; ► Disable replacement invoices&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_DISABLE_CREDIT_NOTE&#039;&#039;&#039; ► Disable credit notes&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;bdi&amp;gt;&#039;&#039;&#039;INVOICE_ADD_EXTRAFIELD_IN_NOTE&#039;&#039;&#039; ► Add extrafields in note for canelle template ► (v17.0+)&amp;lt;/bdi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_DEFAULT_NOTE_PUBLIC&#039;&#039;&#039; &amp;lt;bdi&amp;gt;► Default text in public note&amp;lt;/bdi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: To decode a QR image of a ZATCA code: https://www.onlinebarcodereader.com/. You can also use the mobile application https://play.google.com/store/apps/details?id=com.posbankbh.einvoiceqrreader&amp;amp;gl=FR&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT&#039;&#039;&#039; ► See PDF option&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN&#039;&#039;&#039; ► See PDF options&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;WORKFLOW_BILL_ON_SHIPMENT&#039;&#039;&#039; ► Change label of button with suitable label when you need to create invoice on shipments&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_ALLOW_EXTERNAL_DOWNLOAD&#039;&#039;&#039; ► When a PDF is generated, a share key is automatically set so the file can be downloaded using the share key. Use the tag __DIRECTDOWNLOAD_URL_INVOICE__ in email template to insert it. ► (v7.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_POINTOFTAX_DATE&#039;&#039;&#039; ► Add Point of Tax Date on invoices for country-specific legality reasons ► (v4.0+)&lt;br /&gt;
*&#039;&#039;&#039;FACTURE_ENABLE_NEGATIVE&#039;&#039;&#039; ► Can validate an invoice when amount is negative&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;FACTURE_ENABLE_NEGATIVE_LINES&#039;&#039;&#039; ► Allows to add negative lines to an invoice ► (v8.0.2+)&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_INVOICE_ENABLE_NEGATIVE&#039;&#039;&#039; ► Can validate an supplier invoice when amount is negative ► (V21 ?)&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_INVOICE_ENABLE_NEGATIVE_LINES&#039;&#039;&#039; ► Allows to add negative lines to an supplier invoice ► (V21 ?)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_USE_DEFAULT_DOCUMENT&#039;&#039;&#039; ► Allow user to select a default invoice documents models according to invoice type. On invoice create page, the model is dynamically changed on invoice type selection. ► (v9.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;FACTURE_REUSE_NOTES_ON_CREATE_FROM&#039;&#039;&#039; ► Reuse the Public Note and Private note of the previous object (Proposal,...) when creating the bill.&lt;br /&gt;
*&#039;&#039;&#039;FACTUREFOURN_REUSE_NOTES_ON_CREATE_FROM&#039;&#039;&#039; ► Reuse the Public Note and Private note of the previous object when creating the supplier bill ► (V13.0)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SHOW_FACNUMBER_IN_DISCOUNT_LIST&#039;&#039;&#039; ► Display the reference of credit notes in discount list when creating the bill.&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_ALLOW_FREE_REF&#039;&#039;&#039; ► Capability to change reference of an invoice. This will be possible as long as the invoice has the status “Draft” and only if your country is not in Europe(V11)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_DISALLOW_REOPEN&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_MAX_FUTURE_DELAY&#039;&#039;&#039; ► Numbers of seconds allowed for billing in the future ► (V14.0)&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_AUTO_NEXT_MONTH_ON_LINES&#039;&#039;&#039; ► Increase start date and end date by one month, if an invoice line is a clone of a time based service AND if this services started on the first day of month and ended on the last day of month ► (V13.0.1)&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_KEEP_DISCOUNT_LINES_AS_IN_ORIGIN&#039;&#039;&#039; ► Does not change a line with a negative price into an absolute discount when creating an invoice ► (V16 ?)&lt;br /&gt;
*&#039;&#039;&#039;INVOICEREC_SET_AUTOFILL_DATE_START&#039;&#039;&#039; and &#039;&#039;&#039;INVOICEREC_SET_AUTOFILL_DATE_END ►&#039;&#039;&#039; Set start and end date to yes for lines of template invoice when created from a draft invoice ► (V16)&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_REC_DATE_TO_YES&#039;&#039;&#039; &#039;&#039;&#039;►&#039;&#039;&#039; Set start and end date to yes by default in add line form for template invoice ► (V16)&lt;br /&gt;
*&#039;&#039;&#039;INVOICE_SUBTYPE_ENABLED&#039;&#039;&#039; ► Extends Dolibarr standard invoice with more invoice types used in some countries. A combo box in the new invoice creation card allows the selection of &amp;quot;subtypes&amp;quot; with values from dictionary &amp;quot;Invoice Subtypes&amp;quot; ► (v19.0+)&lt;br /&gt;
*&#039;&#039;&#039;LIST_OF_QUALIFIED_INVOICES_LIMIT_DEFINED&#039;&#039;&#039; &#039;&#039;&#039;►&#039;&#039;&#039; Perf options to limit list of invoices for &amp;quot;credit note&amp;quot; source (on form &amp;quot;create a credit note&amp;quot;), usable for big quantities of invoices for one customer like you can have with TakePos ► (V22+)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Leave=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY&#039;&#039;&#039; ► Set this value to 0 if you want to have the Saturday as a working day&lt;br /&gt;
*&#039;&#039;&#039;MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY&#039;&#039;&#039; ► Set this value to 0 if you want to have the Sunday as a working day&lt;br /&gt;
&lt;br /&gt;
=Look or Theme=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_FAVICON_URL&#039;&#039;&#039; ► favicon url&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_EASTER_EGG_COMMITSTRIP&#039;&#039;&#039; ► Show a comic image from the CommitStrip website. Images are refreshed daily. ► (v6.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_INCLUDE_GLOBAL_STATS_IN_OPENED_DASHBOARD&#039;&#039;&#039; ► This conf will auto remove global stats box item if there are already in the new dashboard of opened elements and keep displayed stats on the opened item box (not only on mouse over) ► (v11.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_TOP_MENU_SEARCH_DROPDOWN&#039;&#039;&#039; ► Actually only for eldy theme, this conf move search input  to top menu and use new design too ► (v11.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;THEME_AGRESSIVENESS_RATIO&#039;&#039;&#039; ► This conf can be used to increase/decrease aggressiveness of colors. Value 0 is medium, value is between -100 (light grey colors) to +100 (very flashy colors) ► (v11.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;THEME_SHOW_BORDER_ON_INPUT&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_GLOBAL_WORKBOARD&#039;&#039;&#039; ► Hide the work board of the main page ► (v13.0+)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_GLOBAL_BOXSTATS&#039;&#039;&#039; ► Hide the Statistic Box of the main page&lt;br /&gt;
*&#039;&#039;&#039;ALLOW_THEME_JS ►&#039;&#039;&#039; Allow JS file in theme folder (same name as theme folder)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Manifest (Progressive Web App)=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MANIFEST_APPLI_THEME_COLOR ►&#039;&#039;&#039; Theme color for manifest&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MANIFEST_APPLI_BG_COLOR ►&#039;&#039;&#039; Background color  for manifest&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MANIFEST_APPLI_LOGO_URL  ►&#039;&#039;&#039; Logo for manifest&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MANIFEST_APPLI_LOGO_URL_SIZE  ►&#039;&#039;&#039; Logo url size for app (150, 192, 512px) missing 3 configurations&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Order Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MASSACTION_CREATEBILLS_REDIRECT_IF_ONE&#039;&#039;&#039; ► If set 1, redirects to the one bill created from massaction create bills from order list ► (v20.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MASSACTION_CREATEBILLS_REDIRECT_IF_MANY&#039;&#039;&#039; ► If set to 1, redirects to the invoice list after plural invoices where generated from tho massaction create bills from order list  ► (v20.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ORDERLIST_CREATEBILLS_ONEBYTHIRD&#039;&#039;&#039; ► Allow defining value for option &amp;quot;one by thirdparty&amp;quot; in massaction create bills from orders list page (no by default, yes if set to &#039;yes&#039; or 1) ► (v20.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_PROPAL_REFCLIENT_FOR_ORDER&#039;&#039;&#039; =&amp;gt; Copy customer reference from proposal to order. ► (v7.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;ORDER_REQUIRE_SOURCE&#039;&#039;&#039; =&amp;gt; Make the input field &amp;quot;Source of order&amp;quot; mandatory.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;ORDER_VALID_AFTER_CLOSE_PROPAL&#039;&#039;&#039; =&amp;gt; When an order is created on a proposal close, the order is directly defined with status &amp;quot;Validated&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;ORDER_ALLOW_EXTERNAL_DOWNLOAD&#039;&#039;&#039; =&amp;gt; When a PDF is generated, a share key is automatically set so the file can be downloaded using the share key. ► (v7.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;ORDER_ENABLE_NEGATIVE&#039;&#039;&#039; =&amp;gt; Can validate an order when amount is negative&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_PROPAGATE_EXTRAFIELDS_TO_ORDER&#039;&#039;&#039; =&amp;gt; Copy also extrafields from thirdparty to order (if name match). ► (v11.0+)&lt;br /&gt;
*&#039;&#039;&#039;ORDER_DEFAULT_NOTE_PUBLIC&#039;&#039;&#039; ► Default text in public note&lt;br /&gt;
*&#039;&#039;&#039;MAIN_REMOVE_DROPDOWN_CREATE_BUTTONS_ON_ORDER&#039;&#039;&#039; =&amp;gt; Remove the create dropdown button on order card (introduce on v19) to come back with old buttons.  &#039;&#039;&#039;►&#039;&#039;&#039; (v20.0+)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=PDF Options=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ADD_PDF_BACKGROUND&#039;&#039;&#039; ► Define this constant with short name of a PDF file (example &amp;quot;&amp;lt;code&amp;gt;mypdf.pdf&amp;lt;/code&amp;gt;&amp;quot;) that must be saved into directory &amp;quot;&amp;lt;code&amp;gt;documents/mycompany&amp;lt;/code&amp;gt;&amp;quot;. This will add PDF as a background of some of your generated PDF files (proposals,invoices,orders). If you need to concat PDF, see instead [[Module Concat PDF]].&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_FORCE_SAVEAS&#039;&#039;&#039; ► If your browser always asks to save downloaded files on disk (like PDF), try this this option. File may be displayed directly in your browser. Values&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: 0= Default (file is auto downloaded), 1= For to output the file into the browser tab, 2= For to output the file into a browser tab open with target_blank&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_PDF_AUTOUPDATE&#039;&#039;&#039; ► Disable automatic generation of PDF each time we add/update/delete a product line (we can still build document by clicking on &amp;quot;Generate&amp;quot;). This option may increase interface speed on servers with low CPU.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_PDF_COMPRESSION&#039;&#039;&#039; ► Disable PDF compression.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DOCUMENTS_WITH_PICTURE_WIDTH&#039;&#039;&#039; ► Can change size of picture when hidden option &amp;lt;code&amp;gt;MAIN_GENERATE_PROPOSALS_WITH_PICTURE&amp;lt;/code&amp;gt; is used. By default value is &amp;lt;code&amp;gt;20&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS&#039;&#039;&#039; ► Adding the company address at the bottom of the page. Disabled by default&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_GENERATE_PROPOSALS_WITH_PICTURE&#039;&#039;&#039; ► Include the first image of the product into the line of the generated PDF for customer proposals.&lt;br /&gt;
*&#039;&#039;&#039;MAIN_GENERATE_ORDERS_WITH_PICTURE&#039;&#039;&#039; ► Include the first image of the product into the line of the generated PDF for customer orders.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_GENERATE_INVOICES_WITH_PICTURE&#039;&#039;&#039; ► Include the first image of the product into the line of the generated PDF for customer invoices.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_GENERATE_SUPPLIER_PROPOSAL_WITH_PICTURE&#039;&#039;&#039; ► Include the first image of the product into the line of the generated PDF for supplier proposals ► (v5.0.3+)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_GENERATE_SUPPLIER_ORDER_WITH_PICTURE&#039;&#039;&#039; ► Include the first image of the product into the line of the generated PDF for supplier orders&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT&#039;&#039;&#039; ► Disable VAT on generated documents. like for an association. (Works with crabe template)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN&#039;&#039;&#039; ► Hide column with VAT information but only column not total.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_INVERT_SENDER_RECIPIENT&#039;&#039;&#039; ► Invert sender and recipient in some PDF. Note: This option is set automatically if country if Germany.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ODT_AS_PDF&#039;&#039;&#039; ► Activate ODT to PDF conversion. Value can be &amp;quot;libreoffice&amp;quot; or &amp;quot;unoconv&amp;quot;. Do not use value &#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;jodconverter&#039;&amp;lt;nowiki/&amp;gt;&#039;&#039;&#039; any more, as it is declared deprecated and partly not functional, use value &#039;&#039;&#039;&amp;lt;nowiki/&amp;gt;&#039;libreoffice&#039;&#039;&#039;&#039; instead, it requires only &#039;&#039;&#039;soffice&#039;&#039;&#039; (OpenOffice or LibreOffice) installed on server (use &#039;&#039;&#039;apt install soffice libreoffice-common libreoffice-writer&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
If you got this error: javaldx failed! Warning: failed to read path from javaldx with no return to prompt when running soffice --headless -env:UserInstallation=file:&amp;quot;/tmp&amp;quot; --convert-to pdf --outdir xxx ./yyy.odt, check that directory defined into env:UserInstallation parameters exists and is writeable.&lt;br /&gt;
&lt;br /&gt;
You may also have a look at this page if your server is on Windows: [[Générer automatiquement des documents PDF à partir de fichier ODT avec Doliwamp]]&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ODT_AS_PDF_DEL_SOURCE&#039;&#039;&#039; ► For ODT generation. If set, then initial behaviour is conserved but ODT file is removed when option to convert it as PDF (see previous) is on. Disabled by default&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_FORCE_FONT&#039;&#039;&#039; ► To ignore font defined into language file and force usage of a particular font. For example &amp;quot;&amp;lt;code&amp;gt;DejaVuSans&amp;lt;/code&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_FORCE_FONT_SIZE&#039;&#039;&#039; ► To force size of font (by default 10). For example &amp;quot;&amp;lt;code&amp;gt;12&amp;lt;/code&amp;gt;&amp;quot; ► (v11.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_FREETEXT_HEIGHT&#039;&#039;&#039; ► Change height of space reserved to output the free text.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_TITLE_BACKGROUND_COLOR&#039;&#039;&#039; ► Can define a background color onto title line. Example: &amp;lt;code&amp;gt;220,220,200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_USE_LARGE_LOGO&#039;&#039;&#039; ► Use the original logo with its higher resolution into the PDF instead of the small thumb. This may lead to very very large PDF !&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_BACKGROUND_ON_PDF&#039;&#039;&#039; ► Define this constant with short name of an image (example &amp;quot;&amp;lt;code&amp;gt;myimage.jpg&amp;lt;/code&amp;gt;&amp;quot;) that must be saved into directory &amp;quot;&amp;lt;code&amp;gt;documents/mycompany/logos&amp;lt;/code&amp;gt;&amp;quot;. This will add this background image into your generated PDF files.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_COMPANY_NAME_OF_CONTACT&#039;&#039;&#039; ► Use contact name and information rather than company&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_ADDALSOTARGETDETAILS&#039;&#039;&#039; ► If 1, add details of recipient on generated PDFs (email, fax, url and phone). Can be useful in cases where a printed order/invoice etc is given to a delivery driver/courier etc.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_TVAINTRA_IN_SOURCE_ADDRESS&#039;&#039;&#039; ► Show VAT N° in source address of PDF to comply with legalities in certain countries. Note that VAT number should be already visible in footer of page ► (v8.0.1+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING&#039;&#039;&#039; ► Add optional esign field in pdf propal ► (v8.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PROFID1_IN_SOURCE_ADDRESS&#039;&#039;&#039; ► Show Professional ID 1 in source address of PDF to comply with legalities in certain countries ► (v8.0.1+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PROFID2_IN_SOURCE_ADDRESS&#039;&#039;&#039; ► Show Professional ID 2 in source address of PDF to comply with legalities in certain countries ► (v8.0.1+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PROFID3_IN_SOURCE_ADDRESS&#039;&#039;&#039; ► Show Professional ID 3 in source address of PDF to comply with legalities in certain countries ► (v8.0.1+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PROFID4_IN_SOURCE_ADDRESS&#039;&#039;&#039; ► Show Professional ID 4 in source address of PDF to comply with legalities in certain countries ► (v8.0.1+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PROFID5_IN_SOURCE_ADDRESS&#039;&#039;&#039; ► Show Professional ID 5 in source address of PDF to comply with legalities in certain countries ► (v8.0.1+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PROFID6_IN_SOURCE_ADDRESS&#039;&#039;&#039; ► Show Professional ID 6 in source address of PDF to comply with legalities in certain countries ► (v8.0.1+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PDF_BANK_HIDE_NUMBER_SHOW_ONLY_BICIBAN&#039;&#039;&#039; ► Hide bank number (&amp;quot;code banque/guichet/compte&amp;quot; for France, &amp;quot;sort code/account number&amp;quot; for GB, ...) and keep only BIC/IBAN on PDF.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PDF_BOLD_PRODUCT_REF_AND_PERIOD&#039;&#039;&#039; ► Add more visibility (bold) on product ref and period of service in desc. ► (v12.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PDF_HIDE_PRODUCT_REF_IN_SUPPLIER_LINES&#039;&#039;&#039; ► Modify the use/position of Supplier Ref/Internal Ref with the item Label (name) on PDF documents.&lt;br /&gt;
&lt;br /&gt;
Default (constant not set or Value &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;): Internal ref followed by supplier ref in brackets.&amp;quot;COMPANY-REF-001 (Vendor SKU SUPPLIER-REF-001) - LABEL...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Value &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;: Supplier ref only eg.&amp;quot;SUPPLIER-REF-001 - LABEL...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Value &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;: Supplier ref followed by internal ref in brackets. eg.&amp;quot;SUPPLIER-REF-001 (InternalRef COMPANY-REF-001) - LABEL...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME&#039;&#039;&#039; ► Include alternative/alias name into name on PDF.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PDF_SECURITY_ENCRYPTION&#039;&#039;&#039; ► Encrypt PDF produced by dolibarr. See additional parameters&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:PDF_SECURITY_ENCRYPTION_RIGHTS (block &#039;modify&#039; or &#039;copy&#039;) - &#039;&#039;&#039;PDF_SECURITY_ENCRYPTION_USERPASS&#039;&#039;&#039; - &#039;&#039;&#039;PDF_SECURITY_ENCRYPTION_OWNERPASS&#039;&#039;&#039; (random if not specified) - &#039;&#039;&#039;PDF_SECURITY_ENCRYPTION_STRENGTH&#039;&#039;&#039; (0 = RC4 40 bit; 1 = RC4 128 bit; 2 = AES 128 bit; 3 = AES 256 bit) - &#039;&#039;&#039;PDF_SECURITY_ENCRYPTION_PUBKEYS&#039;&#039;&#039; Array of recipients containing public-key certificates (&#039;c&#039;) and permissions (&#039;p&#039;) - For example: array(array(&#039;c&#039; =&amp;gt; &#039;file://../examples/data/cert/tcpdf.crt&#039;, &#039;p&#039; =&amp;gt; array(&#039;print&#039;))). WARNING: if an &#039;encrypted PDF&#039; provides a protection against manual change done by mistake, it does NOT provide any protection against modification of your PDF in a security point of view: A protected PDF can still be modified by any advanced PDF editors. Don&#039;t forget this: If a software can read the PDF, this software can also rebuild it differently !&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PDF_SHOW_PROJECT&#039;&#039;&#039; ► Show project onto PDF (supported on supplier order only for the moment)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PDF_USE_ALSO_LANGUAGE_CODE&#039;&#039;&#039; ► The value of this constant must be a language code (&#039;fr_FR&#039;, &#039;en_US&#039;, &#039;sa_SA&#039;, ...). If set, the PDF document will contains both language (default and the one defined by the constant).&lt;br /&gt;
*&#039;&#039;&#039;DOC_SHOW_FIRST_SALES_REP&#039;&#039;&#039; ► Show the sales representant on header (at least on propal azur and rubis template)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_DASH_BETWEEN_LINES&#039;&#039;&#039;&lt;br /&gt;
*&lt;br /&gt;
*&#039;&#039;&#039;SHOW_SUBPRODUCT_REF_IN_PDF&#039;&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;PDF_HIDE_PRODUCT_LABEL_IN_SUPPLIER_LINES&#039;&#039;&#039; ► hide product label in supplier order lines (V15+)&lt;br /&gt;
*&#039;&#039;&#039;SHIPPING_PDF_DISPLAY_AMOUNT_HT&#039;&#039;&#039; ► Show HT unit price and HT total price for lines of PDF shipment&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DOCUMENTS_HIDE_DESCRIPTION_FOR_FACTURE&#039;&#039;&#039; ► To Hide product description in Customer Invoice&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DOCUMENTS_HIDE_DESCRIPTION_FOR_COMMANDE&#039;&#039;&#039; ► To Hide product description in Sales Order&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DOCUMENTS_HIDE_DESCRIPTION_FOR_ORDER_SUPPLIER&#039;&#039;&#039; ► To Hide product description in Purchase Order&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DOCUMENTS_HIDE_DESCRIPTION_FOR_INVOICE_SUPPLIER&#039;&#039;&#039; ► To Hide product description in Vendor Invoice&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PDF_PROPAL_SHOW_PRICE_INCL_TAX&#039;&#039;&#039; ► Display price with tax on Proposal(cyan template) (V17+)&lt;br /&gt;
*&#039;&#039;&#039;PDF_ORDER_SHOW_PRICE_INCL_TAX&#039;&#039;&#039; ► Display price with tax on Order(eratosthene template) (V17+)&lt;br /&gt;
*&#039;&#039;&#039;PDF_INVOICE_SHOW_PRICE_INCL_TAX&#039;&#039;&#039; ► Display price with tax on Invoice(sponge template) (V17+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PDF_USE_GETALIASNBPAGE_FOR_TOTAL&#039;&#039;&#039; ► Display the page number alias&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_NO_SENDER_FRAME&#039;&#039;&#039; ► Do not display the &amp;quot;sender&amp;quot; mention&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_HIDE_SENDER_NAME&#039;&#039;&#039; ► Do not display the sender name&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_NO_RECIPENT_FRAME&#039;&#039;&#039; ► Do not display BillTo&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MULTICURRENCY_SHOW_ALSO_MAIN_CURRENCY_ON_PDF&#039;&#039;&#039; ► Show the amount in the 2 currencies on PDF when using the MultiCurrency module&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_DONOTREPEAT_HEAD ►&#039;&#039;&#039; Do not repeat the header of document&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Point of Sale (POS)=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;CASHDESK_SHOW_KEYPAD&#039;&#039;&#039; ► Show a mouse key pad into the &#039;Simple Point of Sale&#039; module.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;POS_ADDON&#039;&#039;&#039; ► Set this value to an existing numbering module rule (for example &#039;&amp;lt;code&amp;gt;mod_facture_terre&amp;lt;/code&amp;gt;&#039;, &#039;&amp;lt;code&amp;gt;mod_facture_mars&amp;lt;/code&amp;gt;&#039;, ...) to force the numbering module to use for invoice ref definition when invoice is created by the POS. For example setting value &amp;lt;code&amp;gt;POS_ADDON&amp;lt;/code&amp;gt; to &#039;&amp;lt;code&amp;gt;mod_facture_terre&amp;lt;/code&amp;gt;&#039; will use the numbering module &#039;&amp;lt;code&amp;gt;terre&amp;lt;/code&amp;gt;&#039; for invoice generated from POS, whatever is the numbering rule defined into invoice module setup (you can also use POS_NUMBERING_TERRE_FORCE_PREFIX and POS_NUMBERING_MARS_FORCE_PREFIX variable to change the prefix used).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;TAKEPOS_ENABLE_SUMUP&#039;&#039;&#039; ► Enable the compatibility of TakePOS with the card reader terminal [https://SumUp.fr SumUp]&lt;br /&gt;
*&#039;&#039;&#039;TAKEPOS_CAN_FORCE_BANK_ACCOUNT_DURING_PAYMENT&#039;&#039;&#039; ► Possibility to force the bank account during the payment in TakePOS  ► (v13.0)&lt;br /&gt;
*&#039;&#039;&#039;TAKEPOS_CONTROL_CASH_OPENING&#039;&#039;&#039; ► Control the cash opening&lt;br /&gt;
*&#039;&#039;&#039;TAKEPOS_NUMPAD_FORCE_PAYMENT_ICONS_LABELS&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Products Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;CATEGORY_GRAPHSTATS_ON_PRODUCTS&#039;&#039;&#039; ► Show graph of products with categories and totals in Products Area screen&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PRODUCT_DISABLE_CUSTOMCOUNTRYCODE&#039;&#039;&#039; ► Avoid customs code and country of origin to be set as product description when added to Propal/Order/Invoice&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_ADD_TYPE_IN_DOCUMENTS&#039;&#039;&#039; ► Add text &amp;quot;Product&amp;quot; or &amp;quot;Service&amp;quot; at beginning of details lines on built PDF documents.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DONOTSEARCH_ANYWHERE&#039;&#039;&#039; ► When Ajax search is enabled, search is done on criteria anywhere in label of product. By adding this option, search is done only on start of label. This is really faster when you have a huge number of products.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DIRECT_STATUS_UPDATE&#039;&#039;&#039; ► Allows you to change the status of the product (&#039;&#039;for sale/not for sale for purchase/not for purchase&#039;&#039;) directly on the product page via a &#039;&#039;on/off&#039;&#039; switch button. This can be convenient for those who need to quickly disable certain statuses of products without having to go through the editing product page individually. Also can be very useful if used as a filter on the product and product search list. This option doesn&#039;t generate a MODIFY trigger, so be careful with external modules. ► (v4.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SEARCH_PRODUCT_BY_FOURN_REF&#039;&#039;&#039; ►  Allow to search a product by supplier ref in document&#039;s add line form. ► (&amp;gt;= 8.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_DISABLE_FREE_LINES&#039;&#039;&#039; ► Disallow using free lines to add line in documents ► (&amp;gt;= 8.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SHOW_PRODUCT_ACTIVITY_TRIM&#039;&#039;&#039; ► Show Product and Services turnover before for all four quarters tax over recent years recent years on the product area ► (v5.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUIT_DESC_IN_LIST&#039;&#039;&#039; ► Show long description of product/service into lists.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_PROPAGATE_CUSTOMER_PRICES_ON_CHILD_COMPANIES&#039;&#039;&#039; ► Disable propagation of prices per customer from a customer to its child company.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_PUBLIC_URL&#039;&#039;&#039; ► Disable public url in product card ► (v14.0+)&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_STOCK_LEVELS&#039;&#039;&#039; ► Disable properties of stock limits and desired optimal value on product ► (v14.0+)&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_NATURE&#039;&#039;&#039; ► Disable nature in product card ► (v14.0+)&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_WEIGHT&#039;&#039;&#039; ► Disable weight in product card ► (v14.0+)&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_PRICES&#039;&#039;&#039; ► Disable prices in product card ► (v14.0+)&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_ACCOUNTING&#039;&#039;&#039;  ► Disable accounting in product card ► (v14.0+)&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_SIZE&#039;&#039;&#039; ► Disable size in product card.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_LENGTH&#039;&#039;&#039; ► Disable length in product card ► (v4.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_SURFACE&#039;&#039;&#039; ► Disable surface in product card. ► (v4.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_VOLUME&#039;&#039;&#039; ► Disable volume in product card.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_CUSTOM_INFO&#039;&#039;&#039; ► Disable custom info (custom code and country origin) in product/service card.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL&#039;&#039;&#039; ► When option to use price per level/segment is on, this allows to also set a dedicated vat for each price level.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUIT_CUSTOMER_PRICES_BY_QTY&#039;&#039;&#039; ► If price per quantity ► &#039;&#039;Experimental&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES&#039;&#039;&#039; ► If price per quantity and customer ► &#039;&#039;Experimental&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_LOT_ENABLE_QUALITY_CONTROL&#039;&#039;&#039; ► Enable feature (Display fields for life time and quality control duration) for quality control on product and lot&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_MAX_LENGTH_COMBO&#039;&#039;&#039; ► Limit the length of the label displayed when adding lines in proposals/invoices/orders&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_MAX_VISIBLE_PHOTO&#039;&#039;&#039; ► Show a maximum number of product photos (as thumbnails) on the product main card. Example, setting this constant to &#039;&amp;lt;code&amp;gt;5&amp;lt;/code&amp;gt;&#039; will show the first five product photos found on the product card.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUIT_PDF_MERGE_PROPAL&#039;&#039;&#039; ► Enable module Propal merge product PDF&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_USE_OLD_PATH_FOR_PHOTO&#039;&#039;&#039; ► Ask dolibarr to check also old path (before 3.7) where photos were stored.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_USE_UNITS&#039;&#039;&#039; ► Add other units on products (Use same dictionary as default unit feature) and propagate this unit on line of documents.&lt;br /&gt;
*&#039;&#039;&#039;MAIN_EDIT_LINE_ALLOW_ALL_UNIT_TYPE ►&#039;&#039;&#039; Allow the selection of other unit types when editing the document line&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;RESOURCE_ON_PRODUCTS&#039;&#039;&#039; ► Allow to affect resources on products/services ► (v10.0+)&lt;br /&gt;
*&#039;&#039;&#039;RESOURCE_ON_SERVICES&#039;&#039;&#039; ► Allow to affect resources on products/services ► (v10.0+)&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_SHOW_ORIGIN_IN_COMBO&#039;&#039;&#039; ► Show origin of products when adding lines in proposals/invoices/orders ► (v12.0+)&lt;br /&gt;
*&#039;&#039;&#039;PRODUIT_ATTRIBUTES_HIDECHILD&#039;&#039;&#039;  ► Add option hide child if variantes&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_ADD_FORM_ADD_TO&#039;&#039;&#039; ► Add a product to a draft proposal/order/invoice, from the product card.&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_SELLBY&#039;&#039;&#039; ► Hide the Sell by date ► (v13.0+)&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DISABLE_EATBY&#039;&#039;&#039; ► Hide the Eat by date ► (v13.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_DENY_CHANGE_PRODUCT_TYPE&#039;&#039;&#039; ► Forbid to change the product type&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_SORT_BY_CATEGORY&#039;&#039;&#039; ► Sort the product by categories instead of by ID&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_ADD_NET_MEASURE&#039;&#039;&#039; ► Support Net Measure in product&#039;s card.php (For real weight, volume or piece; needed for some business ie fruits, vegetables....). Note brut value is already available natively, use this option only if you need 2 weights, 2 volumes, ...for each product) ► (v11.0.1+)&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_PRICE_BASE_TYPE&#039;&#039;&#039;  ► value &#039;TTC&#039; / &#039;HT&#039; specify the default value of the price (with or without taxes) ► (v16.0.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_LOAD_EXTRAFIELD_INTO_OBJECTLINES&#039;&#039;&#039; ► Load product extrafiled on object lines&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_USE_SUB_COST_PRICES_IF_COST_PRICE_EMPTY&#039;&#039;&#039;&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: Calculate the parent product production price by child prices.&lt;br /&gt;
*&#039;&#039;&#039;PRODUCT_SEARCH_AUTO_SELECT_IF_ONLY_ONE&#039;&#039;&#039;&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: Set to 0 to disable or 1 to enable (by default) the auto select product behavior in combobox when there is only one result.(v21.0+)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Projects Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY&#039;&#039;&#039; ► Option related to the combo list Project on elements. It is a list of thirdparty IDs. If set, you can link an object to a project owned by one of this thirdparty in the list.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_ALLOW_COMMENT_ON_PROJECT&#039;&#039;&#039; ► Add comment feature on a project&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_ALLOW_COMMENT_ON_TASK&#039;&#039;&#039; ► Add comment feature on project task&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_ALWAYS_DISCARD_CLOSED_PROJECTS_IN_SELECT&#039;&#039;&#039; ► Discards closed projects in every select field. A closed project can&#039;t be associated to an object ► (v20.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS&#039;&#039;&#039; ► Option related to the combo list Project on elements. Can link a supplier element (vendor proposal, purchase order, vendor invoice, reception, ...) to any project even if object has a different supplier than the one of the project to link to. See also PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY that is different because it allows to define some given thirdparty ID to allow.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_CAN_ALWAYS_LINK_TO_ALL_CUSTOMERS&#039;&#039;&#039; ► Option related to the combo list Project on elements. Can link a custom element (proposal, sale order, vendor invoice, shipment, ...) to any project even if object has a different customer than the one of the project to link to.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_CREATE_ON_OVERVIEW_DISABLED&#039;&#039;&#039; ► Hide the &amp;quot;create ...&amp;quot; button on the overview pagec&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_DISABLE_UNLINK_FROM_OVERVIEW&#039;&#039;&#039; ► Enable removing the button from a link in the project overview. ► (&amp;gt;= v8.0.1)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_HIDE_UNSELECTABLES&#039;&#039;&#039; ► Hide into select list, all project that we can&#039;t select (closed or draft)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_HIDE_TASKS&#039;&#039;&#039; ► Hide tasks. For user using project only as an analytics key and not using tasks.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_LIST_SHOW_STARTDATE&#039;&#039;&#039; ► Shows start date of projects in project lists.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_LINK_ON_OVERWIEW_DISABLED&#039;&#039;&#039; ► Hide the &amp;quot;link to&amp;quot; form on the overview page ► (v4.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_SHOW_REF_INTO_LISTS&#039;&#039;&#039; ► Add column with project ref into list (with 3.7 list of supplier invoices only, will be expanded to other lists)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_TIME_ON_ALL_TASKS_MY_PROJECTS&#039;&#039;&#039; ► Can add time spent on tasks, even if i am not assigned to task (however, task must be a project i am a contact).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_OPEN_ALWAYS_ON_TAB&#039;&#039;&#039; ► Set to value &#039;task&#039;, or &#039;preview&#039; to always open the project on the given tab instead of main tab.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_ELEMENTS_FOR_MINUS_MARGIN&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;TIMESPENT_ALWAYS_UPDATE_THM&#039;&#039;&#039; ► when it&#039;s on always check current time of user to update it in task time line ► (v17.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_CREATE_NO_DRAFT&#039;&#039;&#039; ► when you create project status will be validate ► (v19.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROJECT_ENABLE_SUB_PROJECT&#039;&#039;&#039; ► Add support for parent projects ► (v19.0)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Proposals Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_GENERATE_PROPOSALS_WITH_PICTURE&#039;&#039;&#039; ► Add a picture of the product (the first one found if there are several) into the generated PDF of proposals. Note that using this will reduce the available width for the product description.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PROPAL_CHOOSE_ODT_DOCUMENT&#039;&#039;&#039; ► On setup page, you&#039;ll be able to select which ODT document to use when close or cancel proposals.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING&#039;&#039;&#039; ► add optional esign field in pdf propal ► (v8.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROPAL_CLONE_ON_CREATE_PAGE&#039;&#039;&#039; ► On the create proposal page, ask if we want to create the proposal by cloning an already existing one. You should use instead the &amp;quot;Clone&amp;quot; button available on existing proposals.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROPAL_DISABLE_SIGNATURE&#039;&#039;&#039; ► Do no show the box for signature.&lt;br /&gt;
*&#039;&#039;&#039;PROPAL_SIGNATURE_ON_SPECIFIC_PAGE ►&#039;&#039;&#039; Will show the signature on which page you wanted . Set to 1 will show on first page , set to -1 will show on last second page .  ( If &#039;&#039;&#039;PROPAL_SIGNATURE_ON_ALL_PAGES&#039;&#039;&#039; is enabled, the &#039;&#039;&#039;PROPAL_SIGNATURE_ON_SPECIFIC_PAGE&#039;&#039;&#039; setting will be ignored.)&lt;br /&gt;
*&#039;&#039;&#039;PROPAL_SIGNATURE_ON_ALL_PAGES ►&#039;&#039;&#039; Will show the signature on every pages .&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PRODUIT_PDF_MERGE_PROPAL&#039;&#039;&#039; ► When generating the proposal PDF, all PDFs linked to products linked to proposal are also included into final PDF&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD&#039;&#039;&#039; ► When a PDF is generated, a share key is automatically set so the file can be downloaded using the share key. ► (v7.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROPOSAL_AUTO_ADD_AUTHOR_AS_CONTACT&#039;&#039;&#039; ► Add Proposal Author as user contact follow proposal&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROPOSAL_PDF_HIDE_PAYMENTTERM&#039;&#039;&#039; ► Do not show the payment term on proposal ► (v11.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;PROPOSAL_PDF_HIDE_PAYMENTMODE&#039;&#039;&#039; ► Do not show the payment mode on proposal ► (v11.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;WORKFLOW_PROPAL_CAN_CLASSIFY_BILLED_WITHOUT_INVOICES&#039;&#039;&#039; ► Button &amp;quot;Classified Billed&amp;quot; is visible on proposal even if there is no invoice linked to proposal.&lt;br /&gt;
*&#039;&#039;&#039;PROPAL_REOPEN_UNSIGNED_ONLY&#039;&#039;&#039;  ► Do not allow reopening of signed (or billed) proposals. (V15)&lt;br /&gt;
*&#039;&#039;&#039;PROPOSAL_ARE_NOT_BILLABLE&#039;&#039;&#039;  ► Disable billing button on proposals (V15)&lt;br /&gt;
*&#039;&#039;&#039;PROPAL_DEFAULT_NOTE_PUBLIC&#039;&#039;&#039; ► Default text in public note&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Services Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SERVICE_ARE_ECOMMERCE_200238EC&#039;&#039;&#039; ►  If seller and buyer are in Europe and buyer is not a company, use the VAT of buying country. For french speaking people, see also the page [[Loi_européenne_TVA_Vente_à_Distance_VAD_et_e-commerce_BtoC]].&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_FILL_SERVICE_DATES_FROM_LAST_SERVICE_LINE&#039;&#039;&#039;  ► (v13.0) On add line form add a button to fill service dates from the last service line&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Shipments=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;STOCK_WAREHOUSE_NOT_REQUIRED_FOR_SHIPMENTS&#039;&#039;&#039; ► If set, you can add a shipment line, with no stock source defined. ► (&amp;gt;= 8.0.1)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SHIPMENT_GETS_ALL_ORDER_PRODUCTS&#039;&#039;&#039; ► Add all order lines in shipment, including the one with 0 in quantity&lt;br /&gt;
*&#039;&#039;&#039;SHIPPING_PDF_HIDE_ORDERED&#039;&#039;&#039; ►Hide column quantity ordered on shipment pdf (&amp;gt;=15.0)&lt;br /&gt;
*&#039;&#039;&#039;STOCK_SUPPORTS_SERVICES&#039;&#039;&#039; ►Allow to manage services into warehouse and allow to ship services&lt;br /&gt;
*&#039;&#039;&#039;SHIPMENT_SUPPORTS_SERVICES&#039;&#039;&#039; ►Allow to ship services without stock (&amp;gt;=19.0)&lt;br /&gt;
*&#039;&#039;&#039;SHIPPING_DISPLAY_STOCK_ENTRY_DATE&#039;&#039;&#039; ►Display date entry stock exped and sort in date order (&amp;gt;=19.0)&lt;br /&gt;
*&#039;&#039;&#039;SHIPMENT_STANDALONE ►&#039;&#039;&#039;Create a simple shipment not connected to sales order, stock e.t.c. (&amp;gt;=23.0)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Stocks=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_ORDER_DISABLE_STOCK_DISPATCH_WHEN_TOTAL_REACHED&#039;&#039;&#039; ► Disable stock dispatch when total expected was already received&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;STOCK_EXCLUDE_VIRTUAL_PRODUCTS&#039;&#039;&#039; ► If product is a virtual product, we do not manage stock for it.&lt;br /&gt;
*&#039;&#039;&#039;STOCK_ALLOW_DELETE_OF_MOVEMENT&#039;&#039;&#039; ► Enable massaction option to delete in movements list (be carefull !!).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;ENTREPOT_EXTRA_STATUS&#039;&#039;&#039; ► Instead of the 2 status (Closed, Open), a Warehouse has 3 status: Closed, Open (for all movements), Open (for internal movement only). Internal movement only means you can&#039;t use the warehouse to make shipment or receptions.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_ORDER_STATUS_FOR_VIRTUAL_STOCK&#039;&#039;&#039; ► For the calculation of virtual stocks, by default supplier orders with the status 3 (ordered) and 4 (partially received) are used. You can enter the list of statuses to be taken into account separated by commas for this calculation (example: 0,1,2,3)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;STOCK_MOVEMENT_LIST_HIDE_UNIT_PRICE&#039;&#039;&#039; ► to hide unit price on some pages (V15+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;DISABLE_QTY_OVERWRITE&#039;&#039;&#039; ► Disable quantity overwrites on inventories ► (v19.0)&lt;br /&gt;
*&#039;&#039;&#039;MAIN_WAREHOUSE_LIST_DISPLAY_MODE&#039;&#039;&#039; ► Change warehouse select list display mode  ► (v21.0) (see github pull request [https://github.com/Dolibarr/dolibarr/pull/31013 #31013] for more info)&lt;br /&gt;
**0&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: Default behavior, display parents of warehouse&lt;br /&gt;
**1&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: Display only current warehouse label only&lt;br /&gt;
**2&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: Display last parent warehouse label&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Suppliers Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;FOURN_PRODUCT_AVAILABILITY&#039;&#039;&#039; ► On the Suppliers price page of the products, activate the supplier product availability. &#039;&#039;This is duplicate feature with delivery_delay introduced with 3.8.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;RELOAD_PAGE_ON_SUPPLIER_CHANGE&#039;&#039;&#039; ► On creation of a supplier order/invoice, reload form with supplier-specific details when supplier is selected from drop-down list.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_INVOICE_WITH_PREDEFINED_PRICES_ONLY&#039;&#039;&#039; ► Restrict selection of products in supplier invoice to only those with a buying price defined for that supplier. ► (v6.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_ORDER_AUTOADD_USER_CONTACT&#039;&#039;&#039; ► Add user approving supplier order as a contact automatically.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_ORDER_DEFAULT_PAYMENT_MODE_ID&#039;&#039;&#039; ► Set the default payment method for suppliers (&amp;lt;code&amp;gt;rowid&amp;lt;/code&amp;gt; in table &amp;lt;code&amp;gt;llx_c_paiement&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_ORDER_USE_DISPATCH_STATUS&#039;&#039;&#039; ► Add a status on each dispatch order line when receiving products from suppliers ► (v4.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_ORDER_NO_DIRECT_APPROVE&#039;&#039;&#039; ► No button &amp;quot;Validate and Approve&amp;quot;. Always do step &amp;quot;Validate&amp;quot; and &amp;quot;Approve&amp;quot; in 2 steps.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_ORDER_WITH_PREDEFINED_PRICES_ONLY&#039;&#039;&#039; ► Restrict selection of products in supplier order to only those with a buying price defined for that supplier. ► (v6.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_ORDER_EDIT_BUYINGPRICE_DURING_RECEIPT&#039;&#039;&#039; ► Can modify the buying price used for PMP calculation when making a stock reception on a supplier order. ► (v6.0+)&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_PROPOSAL_WITH_PREDEFINED_PRICES_ONLY&#039;&#039;&#039; ► Restrict selection of products in supplier proposal to only those with a buying price defined for that supplier. ► (v6.0+)&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_ORDER_MORE_THAN_WISHED&#039;&#039;&#039; ► The supplier order status is set to &amp;quot;Totally received&amp;quot; even if there are more products received than ordered. ► (v15.0+)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;DISPLAY_DISCOUNTED_SUPPLIER_PRICE&#039;&#039;&#039; ► Allow to display discounted supplier price when searching product in supplier documents ► (v10.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_CAN_EDIT_SUPPLIER_ON_SUPPLIER_ORDER&#039;&#039;&#039; ►  Allow to change the supplier on a draft supplier order ► (v10.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT&#039;&#039;&#039; ►  Allow to change price on receipt ► (v19.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SUPPLIER_HIDE_SUPPLIER_OBJECTLINES&#039;&#039;&#039; ►  Hide the supplier information on objectlines (invoices, etc..) ► (v19.0)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Third Parties Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;COMPANY_AQUARIUM_CLEAN_REGEX&#039;&#039;&#039; ► Add a REGEX rule on the third parties names. It applies a regex replacement pattern on generated code if COMPANY_AQUARIUM_CLEAN_REGEX is set. Value must be a regex with parenthesis. The part into parenthesis is kept, the rest removed. For example if COMPANY_AQUARIUM_CLEAN_REGEX = &#039;&amp;lt;code&amp;gt;^..(..)..(.*)&amp;lt;/code&amp;gt;&#039; the first char and second char are removed and the char 5 and 6 too ► (&amp;gt;= 8.0.1)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_UNKNOWN_CUSTOMERS_ARE_COMPANIES&#039;&#039;&#039; ► See in Global options section.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_USE_VAT_COMPANIES_IN_EEC_WITH_INVALID_VAT_ID_ARE_INDIVIDUAL&#039;&#039;&#039; ► See in Global options section.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_EMAIL_MANDATORY&#039;&#039;&#039; ► E-mail is a mandatory field when creating a thirdparty&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_DISABLE_CUSTOMERS&#039;&#039;&#039; ► Remove all menu and features related to customers&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_DISABLE_PROSPECTS&#039;&#039;&#039; ► Remove all menu and features related to prospects&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_DISABLE_PROSPECTSCUSTOMERS ►&#039;&#039;&#039; Remove the status &amp;quot;Customer/Prospect&amp;quot; when thirdparties creation or modification&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_DISABLE_STATE&#039;&#039;&#039; ► Do not use field &amp;quot;state/province&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_SORT_ON_TYPEENT&#039;&#039;&#039; ► The combo list of &amp;quot;type of third party&amp;quot; is sorted on alphabetical order instead of the field &amp;quot;position&amp;quot; that appears into dictionary instead.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_ASK_FOR_SHIPPING_METHOD&#039;&#039;&#039; ► Shipping method can be predefined on customer card and will be used as default on order creation&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_ADD_REF_IN_LIST&#039;&#039;&#039; ► Displays the code before the name in the lists  ► Value 1 -&amp;gt; Code + name + alias ou Code + name if colone alias 2 -&amp;gt; Code + alias 3 -&amp;gt; Alias&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT_SUPPLIER&#039;&#039;&#039; ► Possible to add Categories to third parties that are not customer, prospect or supplier.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_DEFAULT_USELOCALTAX1&#039;&#039;&#039; ► When creating a new third party, the field &amp;quot;Use second tax&amp;quot; is set to on or off depending on value of this parameter.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_DEFAULT_USELOCALTAX2&#039;&#039;&#039; ► When creating a new third party, the field &amp;quot;Use third tax&amp;quot; is set to on or off depending on value of this parameter.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_NOTCUSTOMERPROSPECT_BY_DEFAULT&#039;&#039;&#039; ► Do not set status &amp;quot;Customer/Prospect&amp;quot; to &amp;quot;on&amp;quot; when creating a new third party from menu &amp;quot;New third party&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_INCLUDE_PARENT_IN_LINKTO&#039;&#039;&#039; ► Search also for elements on parent third party when using the &amp;quot;link to&amp;quot; object feature.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_INCLUDE_PROJECT_THIRDPARY_IN_LINKTO&#039;&#039;&#039; ► Search also for elements on third party that own the project of the current element when using the &amp;quot;link to&amp;quot; object feature (if project is owned by a different thirdparty than current one).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_LOGO_ALLOW_EXTERNAL_DOWNLOAD&#039;&#039;&#039; ► When a logo is uploaded, a share key is automatically set so the file can be downloaded using the share key.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_SUGGEST_ALSO_ADDRESS_CREATION&#039;&#039;&#039; ► Enabled contact creation on third-party create card&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_QUICKSEARCH_ON_FIELDS&#039;&#039;&#039; ► Personalized search criteria ► Example: $conf-&amp;gt;global-&amp;gt;THIRDPARTY_QUICKSEARCH_ON_FIELDS = &#039;s.nom=ThirdPartyName;s.name_alias=AliasNameShort;s.code_client=CustomerCode&#039;&lt;br /&gt;
*&#039;&#039;&#039;MEMBER_CAN_CONVERT_CUSTOMERS_TO_MEMBERS&#039;&#039;&#039; ► Enabled member creation on third-party create card&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_DISABLE_PARENTCOMPANY&#039;&#039;&#039; ► Disables attachment to a parent company.&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_CUSTOMERPROSPECT_BY_DEFAULT&#039;&#039;&#039; ► Set the third party to customer by default&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_SUPPLIER_BY_DEFAULT&#039;&#039;&#039; ► Set the third party to supplier by default&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT&#039;&#039;&#039; ► Set the third party type by default (3 = customer &amp;amp; prospect / 2 = prospect / 1 = customer )&lt;br /&gt;
*&#039;&#039;&#039;CONTACT_DISABLE_PERSONALINFO&#039;&#039;&#039; ► Disable Personal data on contact page&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_DISABLE_WORKFORCE&#039;&#039;&#039; ► Disable work force selector on society page&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_SHOW_VAT_IN_LIST&#039;&#039;&#039; ► display VAT number in combo list of thirdparties ► (V15+)&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_DEFAULT_CREATE_CONTACT&#039;&#039;&#039; ► When set, a contact is created at the creation of an individual third party ► (v14.0)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES&#039;&#039;&#039; ► Able to share contact between several third parties&lt;br /&gt;
*&#039;&#039;&#039;THIRDPARTY_CUSTOMERCODE_EQUALS_MEMBERREF&#039;&#039;&#039; ► When creating third parties out of members, the customer code is set equal to the member Ref. ► (v22.0)&lt;br /&gt;
*&#039;&#039;&#039;SOCIETE_NO_SYNC_LINKED_MEMBER&#039;&#039;&#039; ► If set, changes to a third party will not be synchronized to a linked member. ► (v23.0)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Ticket Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;TICKET_SHOW_MESSAGES_ON_CARD&#039;&#039;&#039; ►Display all ticket related messages on the main ticket card. ► (&amp;gt;= 10.0)&lt;br /&gt;
*&#039;&#039;&#039;TICKET_AUTO_ASSIGN_CONTRACT_CREATE&#039;&#039;&#039; ►Automatically create a contract linked to the ticket ► (&amp;gt;= 10.0)&lt;br /&gt;
*&#039;&#039;&#039;TICKET_AUTO_CREATE_FICHINTER_CREATE&#039;&#039;&#039; ►Automatically create an intervention linked to the ticket ► (&amp;gt;= 10.0)&lt;br /&gt;
*&#039;&#039;&#039;TICKET_AUTO_ASSIGN_USER_CREATE&#039;&#039;&#039; &#039;&#039;&#039;►&#039;&#039;&#039; (&amp;gt;= 21.0) 0=No auto assignement, 1=Auto assign current user if no user was set, 2=Auto assign current user even if another user was set.&lt;br /&gt;
*&#039;&#039;&#039;TICKET_CHECK_NOTIFY_THIRDPARTY_AT_CREATION&#039;&#039;&#039; ►Automatically check &amp;quot;notify thirdparty at creation&amp;quot; ( &amp;gt;=16)&lt;br /&gt;
*&#039;&#039;&#039;TICKETS_MESSAGE_FORCE_MAIL&#039;&#039;&#039; ► Pre check email sending on ticket message (&amp;gt;=15)&lt;br /&gt;
*&#039;&#039;&#039;TICKET_SEND_PRIVATE_EMAIL ►&#039;&#039;&#039; Allow a private message to be sent by mail (&amp;gt;=17)&lt;br /&gt;
*&#039;&#039;&#039;TICKET_LIMIT_VIEW_ASSIGNED_ONLY&#039;&#039;&#039;  &#039;&#039;&#039;►&#039;&#039;&#039; Only display tickets assigned to the user&lt;br /&gt;
*&#039;&#039;&#039;TICKET_ADD_AUTHOR_AS_CONTACT&#039;&#039;&#039; &#039;&#039;&#039;►&#039;&#039;&#039; If set to 1: Automatically adds the author as internal contact. If set to 2: Automatically adds the author as external contact if external user. (&amp;gt;=20)&lt;br /&gt;
*&#039;&#039;&#039;TICKET_ASSIGN_CONTACT_TO_MESSAGE&#039;&#039;&#039; &#039;&#039;&#039;►&#039;&#039;&#039; If known, the external contact is assigned to the message. (&amp;gt;=19)&lt;br /&gt;
*&#039;&#039;&#039;TICKET_ALLOW_CLASSIFICATION_MODIFICATION_EVEN_IF_CLOSED&#039;&#039;&#039; &#039;&#039;&#039;►&#039;&#039;&#039;Allow modify ticket classification even if closed. (&amp;gt;=19)&lt;br /&gt;
*&#039;&#039;&#039;WORKFLOW_TICKET_CLOSE_INTERVENTION&#039;&#039;&#039; ►On ticket close, automatically close an intervention linked to the ticket&lt;br /&gt;
*&#039;&#039;&#039;TICKET_INCLUDE_SUSPENDED_STATUS&#039;&#039;&#039; ► Use ticket suspended status (&amp;gt;=19)&lt;br /&gt;
*&#039;&#039;&#039;TICKET_INCLUDE_LINK_TO_PUBLIC_INTERFACE_IN_MESSAGE&#039;&#039;&#039; ► Add a link in bottom of emails sent from ticket page with link to public ticket admin tool (&amp;gt;=22)&lt;br /&gt;
&lt;br /&gt;
=VAT Report=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_INCLUDE_ZERO_VAT_IN_REPORTS&#039;&#039;&#039; ► Include lines with VAT to 0% (for &amp;quot;auto-liquidation&amp;quot; in EEC) ► (v8.0.3+)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=Website Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;WEBSITE_USE_WEBSITE_ACCOUNTS&#039;&#039;&#039; ► Add a table and a tab to manage some accounts for websites to a third party&lt;br /&gt;
*&#039;&#039;&#039;WEBSITE_ALLOW_OVERWRITE_GIT_SOURCE&#039;&#039;&#039; ► Add a button to export a website over the GIT sources&lt;br /&gt;
*&#039;&#039;&#039;WEBSITE_ADD_CSS_TO_BODY&#039;&#039;&#039; ► Add a CSS class to the body tag of websites&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=WYSIWYG Editor=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;FCKEDITOR_ENABLE_DETAILS_FULL&#039;&#039;&#039; ► Can cut and paste external images (hosted on external server) into description of proposal, orders or invoices. WARNING: PDF generation is not guaranteed with this. Also if the image is removed or renamed by the image hosting service, your proposal, order or invoice will be broken.&lt;br /&gt;
*&#039;&#039;&#039;FCKEDITOR_ALLOW_ANY_CONTENT&#039;&#039;&#039; ► Allow to enter any content. However, this will totally disable content filtering which is one of the most important CKEditor features. You can use this to keep all your tags and attributes in the html content.&lt;br /&gt;
*&#039;&#039;&#039;FCKEDITOR_ENABLE_SCAYT_AUTOSTARTUP&#039;&#039;&#039;  ► Allow to activate the SpellCheckAsYouType (SCAYT) plugins of CKEditor i.e an automatic spell checking. The value to activate this option is 1.&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ALLOW_WYSIWYG_LOCAL_MEDIAS_ON_PRIVATE_NETWORK&#039;&#039;&#039;  ► By default, you can add medias links (img src or other) into the rich text content editor, but you can&#039;t add links like that use a local host like &amp;quot;https://localhost/file&amp;quot;. If you set this option to 1, you can.&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ALLOW_WYSIWYG_EVEN_ON_UNSECURED_EXTERNAL_HTTP_URL&#039;&#039;&#039;  ► By default, you can add medias links (img src or other) into the rich text content editor, but not if the link is a unsecure &amp;quot;http&amp;quot; url (not https) and your Dolibarr is http. If you set this option to 1, you can.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=STRIPE Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;STRIPE_FORCE_VERSION&#039;&#039;&#039; ► Force the STRIPE version. For Example: &amp;quot;2019-09-09&amp;quot; (v11+)&lt;br /&gt;
*&#039;&#039;&#039;STRIPE_REUSE_EXISTING_INTENT_IF_FOUND&#039;&#039;&#039; ► With this, you will have idempotency key but the payment intention will be reuse and not Generate again (13+)&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
=ClickToDial Module=&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;CLICKTODIAL_FORCENEWTARGET&#039;&#039;&#039; ► Open in new page.&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=For SaaS / Cloud hosting integrators=&lt;br /&gt;
&lt;br /&gt;
The following options are useless for a common usage of Dolibarr. But they are usefull if you plan to host / provide Dolibarr instances as Software As A Service (SAAS) to your customers.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;CRON_DISABLE_KEY_CHANGE&#039;&#039;&#039; ► When you provide an instance to a customer, you probably also add an entry in the cron of this user so Dolibarr batch and scheduler can work correctly. For security purpose, it may have a security key that is inside the command line into the cron entry and this entry must match the value defined into Dolibarr setup (setup of module &#039;Scheduled Jobs&#039;). Because, a customer of a Saas platform will probably have no access to edit the cron file, it is also import that he has no way to edit the key into the Dolibarr setup, so the key in the cron command line will always match the key in Dolibarr setup, and the Dolibarr batches will executed without security errors. To be sure, the customer does not change the value, you can set this constant to 1 into the table [[Table_llx_const]].&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;CRON_DISABLE_TUTORIAL_CRON&#039;&#039;&#039; ► Disable the tutorial about how to install the cron script (on a SaaS hosting, this should be done by the web hosting provider)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;CRON_WARNING_DELAY_HOURS&#039;&#039;&#039; ► Set this value to the frequency set for the cron script (so a warning will be shown to user to warn it about max frequency of its scheduled jobs)&lt;br /&gt;
 &lt;br /&gt;
*&#039;&#039;&#039;MAILING_NO_USING_PHPMAIL&#039;&#039;&#039; ► To avoid bad use of the emailing module, it is recommended to set this option to 1 (This option is described previously). Also you can complete the message visible by customers when they try to setup the SMTP credentials of their Dolibarr by using the constant MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS (This option is described previously). For example, you can point to a FAQ on your website.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL&#039;&#039;&#039; ► If you have set a system limit on number of recipients on your system, you can set also this option to match the same value, so users will be informed: So &#039;&#039;&#039;MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL&#039;&#039;&#039; restricts sending of 1 email message to &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; recipients for the same email message (x for To: + CC: + BCC:). If not defined, value is &amp;lt;code&amp;gt;10&amp;lt;/code&amp;gt;. Required to fight against spamming that include a ton of recipients in 1 message. Note that &#039;&#039;&#039;MAIL_MAX_NB_OF_RECIPIENTS_TO_IN_SAME_EMAIL&#039;&#039;&#039;, &#039;&#039;&#039;MAIL_MAX_NB_OF_RECIPIENTS_CC_IN_SAME_EMAIL&#039;&#039;&#039; and &#039;&#039;&#039;MAIL_MAX_NB_OF_RECIPIENTS_BCC_IN_SAME_EMAIL&#039;&#039;&#039; are also available. Note that this is not a hard limit; it is just the quantity that will be displayed on warnings on screen. For a real limit, this must be implemented into the system.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAILING_LIMIT_SENDBYDAY&#039;&#039;&#039; ► This is a limit of number of emails, an instance can send. Note that this is not a hard limit; it is just the quantity that will be displayed on warnings on screen. For a real limit, this must be implemented into the system.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAILING_LIMIT_WARNING_PHPMAIL&#039;&#039;&#039; ► Set this value to a translation key. Then add translation keys into the instance so user will see a message when into the email setup page. For example, you can set a message to say: &#039;&#039;Warning: To avoid abuse, when using default setup, you are restricted to 500 emails per day for all your application (account may be suspended in case of violation of this rule. You can setup application to use your own SMTP server for sending email so you want have no restriction at all (see menu Home-Setup-Emails)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_ALWAYS_CREATE_LOCK_AFTER_LAST_UPGRADE&#039;&#039;&#039; ► If set, when you launch upgrades of your customer instances, you are sure that the upgrade process recreate automatically the file install.lock and remove the upgrade.unlock so the administration tools like install.php, upgrade.php and repair.php can&#039;t be used on your customer instance (until the install.lock file is deleted or the upgrade.unlock file is created).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS&#039;&#039;&#039; ► (A better name of this option should be MAIN_EXTERNAL_MAIL_CLIENT_IP_ADDRESS). Set here the list of IPs where your Dolibarr instances are hosted, separated by a comma. So, when your customer go into the Email setup area:&lt;br /&gt;
**If he has chosen mail method, a message will explain him how to setup its SPF record for its email domain (showing the list of IP). This is to avoid to have its emails, sent from its Dolibarr instance, fails due to strict antispam rule of some emailing servers.&lt;br /&gt;
**If he has chosen smtp method, a message will explain him the list of IP he can use if there is restriction on IP by the SMTP agent. If you also need to add a message to help SPF setup, see option &#039;&#039;&#039;MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You can also provide a list of URLs that return just an IP instead of a list of hardcoded IP. So you can for example set 1 url that contact a whoami service that return the public IP of server and another one doing the one on a IPv6 address, so on the setup page, the public IP adress of the server will always be uptodate for both ipv4 and ipv6 (Example: &amp;quot;https://ipv4.server.com/_service_showmyip.php,https://ipv6.server.com/_service_showmyip.php&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD&#039;&#039;&#039; ► Set here the string to add in the SPF record This string will be shown into a help message when the user in in the setup of email page and has choose a method using an external SMTP server.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_FIRST_PING_OK_ID&#039;&#039;&#039; ► Set this value to &amp;quot;disabled&amp;quot; to remove completely any ping after a complete setup.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_FILECHECK_LOCAL_SUFFIX&#039;&#039;&#039; and &#039;&#039;&#039;MAIN_FILECHECK_LOCAL_EXT&#039;&#039;&#039; ► If you offer a customized or patched version of Dolibarr, when the user will use the tool to check the integrity of files, the default xml file name used for signature checking will be the official file provided by the Dolibarr team, so it does not includes your own changes. To have the suggested signature file being your own file, you can set the constant MAIN_FILECHECK_LOCAL_SUFFIX to a suffix. For example, set this to &amp;quot;&#039;&#039;&#039;-mysaassolution&#039;&#039;&#039;&amp;quot;. So, when the user will use the file integrity tool, the default file to check for signature will be &amp;quot;&#039;&#039;&#039;/install/filelist-10.0.2-mysaassolution.xml&#039;&#039;&#039;&amp;quot; instead of &amp;quot;&#039;&#039;&#039;/install/filelist-10.0.2.xml&#039;&#039;&#039;&amp;quot;. All you have to do is generate the signature file &#039;&#039;&#039;mysaassolution&#039;&#039;&#039; using the tool &#039;&#039;&#039;build/generate_filelist_xml.php&#039;&#039;&#039; and put this file into the install directory of your customer instance. Doing this, your customer, and yourself, will be able to check if a file was modified without being disturbed by false alerts due to your customized files or patches (they will be included in the signature used for check). Also, if you want to zip the customized signature file into &amp;quot;&#039;&#039;&#039;/install/filelist-10.0.2-mysaassolution.xml.zip&#039;&#039;&#039;&amp;quot;, you can set the constant MAIN_FILECHECK_LOCAL_EXT to &#039;.zip&#039;.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP&#039;&#039;&#039; ► Set to 1 by default (so warning is hidden). You can set it to 0 to show a warning to encourage admin to set its own SMTP service.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MAIL_SENDMODE_password&#039;&#039;&#039; ► To force the mode to send the email on the &amp;quot;password forgotten&amp;quot; page. So you can decide to use php mail or SMTP method for this specific use case.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING&#039;&#039;&#039; ► If set to N, the warning saying modules are not activated will be shown if number of activated module is &amp;lt; N (Having this variable not defined is same than having it set to 1). This may be usefull if you preinstall an application with some modules already loaded by default and you want to keep the warning to be sure the user will enable other modules he need, even if some modules are already enabed.&lt;br /&gt;
*&#039;&#039;&#039;MAIN_SETUP_MODULES_DESC&#039;&#039;&#039; ► If your installation is already done with activated module, the help message to explain how to enable a module on the setup page is hidden. You can keep it visible by adding this option to 1.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;MAIN_NO_UPGRADE_REDIRECT_ON_LEVEL_3_CHANGE&#039;&#039;&#039; ► The page to make the migration is not shown automatically when you deploy files of version X.Y.Z+delta over an  installation with a database version X.Y.Z. The upgrade page will be shown automatically only if there is a change on value of X or Y in version.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;SYSLOG_DISABLE_LOGHANDLER_SYSLOG&#039;&#039;&#039; ► Set this to 1 to disable usage of syslog (having all customer instances logging in the same system file is not a good idea).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;WEBSITE_REPLACE_INFO_ABOUT_USAGE_WITH_WEBSERVER&#039;&#039;&#039; ► Put here a text or a translation key of a text to show when the user will use the feature &amp;quot;Deploy&amp;quot; when he want to deploy a website done with Dolibarr CMS. So you can, for example, show him a message that this feature is not part of its subscription and putting a website online may need a complementary subscription.&lt;br /&gt;
&lt;br /&gt;
[[#Top|(back to top)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=65735</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=65735"/>
		<updated>2026-03-28T19:14:20Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* Legislation and current status */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
{{#metamaster:keywords|einvoice,ebilling,ereporting,facturx,e-invoice,e-reporting,e-billing,ubl,peppol,e-factura,efactura}}&lt;br /&gt;
&lt;br /&gt;
This page presents a description of the rules and solutions for Electronic Invoicing (&#039;&#039;&#039;e-invoicing, e-billing&#039;&#039;&#039;) and Invoice and VAT reporting (&#039;&#039;&#039;e-reporting&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions to read, generate and/or send e-invoice depend on your country...&lt;br /&gt;
&lt;br /&gt;
If your country is not in this list, feel free to develop your own interface module and publish it on any git source repository or packaged as a zip (for the price of your choice) on dolistore.com. But you can also do it as an alternative of an existing solution if a module already exists and does not match your need...&lt;br /&gt;
&lt;br /&gt;
Note that for European country, europe maintain a resoure page that may contains complementary generic information ([https://ec.europa.eu/digital-building-blocks/sites/spaces/DIGITAL/pages/467108874/eInvoicing+Country+Factsheets+for+each+Member+State+and+other+countries on this page]):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Argentina=&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
Need AFIP/ARCA e-invoicing&lt;br /&gt;
Automatic CAE, credit/debit notes, digital VAT book and electronic delivery notes.&lt;br /&gt;
TODO Need more reference...&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You can use the following module:&lt;br /&gt;
https://www.dolistore.com/product.php?id=2580&amp;amp;title=facturacion-electronica-argentina-afip-arca-takepos&amp;amp;l=fr&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
&#039;&#039;&#039;Manual support&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
There is several platforms and services in Belgium that you can use to send manually classic invoices. They will be converted and transfer to Peppol network by these services. You will also find on their website sites, the invoices sent by your suppliers. For example the non-profit service [https://letspeppol.org LetsPeppol]. You can also prefer [https://bosa.belgium.be/fr/services/mercurius Mercurius], or the more popular [https://doccle.be/ Doccle]. If you have a low number of invoice, using such platforms may be a good choice. If the platform can&#039;t work with a simple PDF and need a UBL xml file, you can use [https://www.dolistore.com/product.php?id=884&amp;amp;title=peppol-xml-ubl-facture-electronique-multi-ap&amp;amp;l=fr this module] whose goal is to convert your own Dolibarr PDF into the XML format to push them on such platforms.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Integrated support&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you need a more integrated solution, to just generate invoices in the Peppol format from the application, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
If you want to both generate the Peppol invoices and also send or retrieve them on the Peppol network, this is a list of possible modules (note that you may need to subscribe a subscription to the network gateway service used by this modules): &lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client&lt;br /&gt;
*https://www.dolistore.com/product.php?id=2537&amp;amp;title=wiwitrouter-invoice-facturation-electronique-peppol&amp;amp;l=fr&lt;br /&gt;
*https://www.dolistore.com/product.php?id=2635&amp;amp;title=dolifalco&amp;amp;l=fr&lt;br /&gt;
*https://www.dolistore.com/product.php?id=884&amp;amp;title=peppol-xml-ubl-facture-electronique-multi-ap&amp;amp;l=fr (Multi-AP, experimental)&lt;br /&gt;
&lt;br /&gt;
More modules may exists, see [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
Note: Belgium already offers some platforms, for example LetsPeppol, Mercurius, or Doccle, where you can send manually classic invoice to get a Peppol invoice.&lt;br /&gt;
&lt;br /&gt;
A Peppol file can be validated here: https://ecosio.com/en/peppol-and-xml-document-validator/#&lt;br /&gt;
&lt;br /&gt;
To know if a Peppol file has been published on the peppol network, you should find a report page on your Access Point (StoreCove, Mercurial, Doccle, LetsPeppol, ...).&lt;br /&gt;
&lt;br /&gt;
=Colombia=&lt;br /&gt;
==Format==&lt;br /&gt;
Factura Electronica Colombia DIAN&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New, robust DIAN electronic invoicing for Dolibarr (UBL 2.1). Covers Invoice, Credit/Debit Notes, Support Document, and optional e-Payroll. Actively maintained with support and updates. https://www.dolistore.com/product.php?id=2376&amp;amp;title=facturacion-electronica-dian-colombia-ilimitada&amp;amp;l=es&lt;br /&gt;
&lt;br /&gt;
A old module is available here: [https://www.dolistore.com/product.php?id=1153&amp;amp;title=colombian-electronic-invoice&amp;amp;l=fr https://www.dolistore.com/product.php?id=2376&amp;amp;title=unlimited-dian-colombia-electronic-billing&amp;amp;l=fr]&lt;br /&gt;
&lt;br /&gt;
=Croatia=&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
There are no current Business-to-Business (B2B) or Business-to-Consumer (B2C) eInvoicing mandates. However, a B2B mandate is under public consultation and is expected to take effect on 1 January 2026. Near real-time reporting is expected to begin in 2026.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Croatia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Denmark=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3.0 and OIOUBL 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
No mandate for B2B einvoicing yet, but under the 2022 Bookkeeping Act, businesses must ensure their systems are capable of sending and receiving eInvoices, including through Peppol and NemHandel&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Denmark&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Estonia=&lt;br /&gt;
&lt;br /&gt;
===Format===&lt;br /&gt;
Peppol &lt;br /&gt;
&lt;br /&gt;
===Timeline===&lt;br /&gt;
Since 1 July 2025 all accounting entities registered as e-invoice recipients in the commercial register are entitled to receive e-invoices by default.&lt;br /&gt;
&lt;br /&gt;
===Dolibarr support===&lt;br /&gt;
To generate invoices in this format, you may need to install the module: &amp;lt;nowiki&amp;gt;https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
===Legislation and current status===&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Estonia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Finland=&lt;br /&gt;
==Format==&lt;br /&gt;
UBL 2.1 and Cross-Industry Invoice (CII)&amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt; or national formats such as Finvoice 3.0 and TEAPPSXML 3.0 (provided their compliance with the European Standard) or Peppol BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
However, under the eInvoicing Act 241/2019, companies with an annual turnover exceeding EUR 10,000 are entitled to request EN-compliant eInvoices from their suppliers.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Legislation and current status&lt;br /&gt;
&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Finland&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Partial&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factur-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually onto this platform, or to use a third-party service for submission directly from Dolibarr, for example by using:&lt;br /&gt;
&lt;br /&gt;
*The [[Module Chorus|Chorus Pro Module]] - Subscription from EasyaSolution.&lt;br /&gt;
*The EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
*To develop your own code to interface with Chorus, there is a small tuto on the french forum: https://www.dolibarr.fr/forum/t/connexion-api-chorus-pro-environnement-de-test-qualif/46738&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
*Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
*Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing:  Starting from 2/2/2026 with a grace period of gradual implementation until 31/3/2026 all companies with an annual turnover exceeding 1000000,00 euros.&lt;br /&gt;
&lt;br /&gt;
Starting from 1/10/2026 with a grace period of gradual implementation until 31/12/2026 for all entities/companies.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
E-reporting is implemented through Independent Authority for Public Revenue (IAPR) MyDATA platform with constant API changes&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;s&amp;gt;For Dolibarr versions 13.0.0 - 18.0.x download *https://github.com/evansgl/dolibarr-mydata/releases/tag/1.8&amp;lt;/s&amp;gt;&lt;br /&gt;
*&amp;lt;s&amp;gt;For Dolibarr versions 19.0.0 -21.0.0 use &amp;quot;dolibarr-19 branch&amp;quot; *https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19&amp;lt;/s&amp;gt;&lt;br /&gt;
*For Dolibarr version 22.0.x download from [https://www.dolibarr.gr/foroum/mydata-diathesimo-module/page-50.html#4245 here]&lt;br /&gt;
*For Dolibarr version 23.0.0+ we move to e-invoicing module still under heavy development&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
*Digital delivery note: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Ireland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
No Business-to-Government (B2G) eInvoicing mandate exists, but since June 2019, all public sector entities are required to receive and process structured eInvoices compliant with the European standard (EN 16931)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Ireland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2019, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
There are two solutions:&lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;Fatturazione elettronica &amp;amp; Professionisti Smart&amp;quot; module: https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html&lt;br /&gt;
*The &amp;quot;Fatture Elettroniche ITA&amp;quot; module available from the site https://doliplatform.com/fatturazione-elettronica/ (Italian Dolibarr Preferred Partner Diciannove Soc. Coop. )&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*https://www.fatturapa.gov.it/en/index.html&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Latvia=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing starting from 2028&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Latvia*&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Lithuania=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
mandatory eInvoicing targeted for 1 January 2028.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Lithuania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
While there&#039;s no specific mention of Dolibarr support for Luxembourg e-invoicing, users can likely use the Peppol XML module available for other countries:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
CFDI XML&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Mexican electronic format, you need to install a CFDI XML module.&lt;br /&gt;
&lt;br /&gt;
*Sources of such a module are available here: https://github.com/avadnc/cfdixml&lt;br /&gt;
&lt;br /&gt;
*You can find a ready to deploy module file here: https://www.dolistore.com/product.php?id=354&amp;amp;title=mexico-cfdi&amp;amp;l=fr&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Norway=&lt;br /&gt;
==Format==&lt;br /&gt;
EHF/Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Norway&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Poland (KSeF)=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Poland plans to make business-to-business (B2B) e-Invoicing mandatory from 2026.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use one of the module to synchronise Dolibarr invoices with Peppol [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol available on DoliStore]:&lt;br /&gt;
&lt;br /&gt;
You can also have a look at this KSeF dedicated modue: https://github.com/InPoint-Automation/Dolibarr-KSeF-Module&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
More information on page: https://ksef.mf.gov.pl/&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Poland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Portugal=&lt;br /&gt;
==Format==&lt;br /&gt;
OASIS UBL CIUS-PT and CEFACT CII CIUS-PT&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Portugal&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Romania (e-Factura)=&lt;br /&gt;
==Format==&lt;br /&gt;
RO_CIUS  ensuring alignment with the broader European e-invoicing standard EN 16931.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
A dedicated module called QInvoice exists here: https://www.dolistore.com/product.php?id=2494&lt;br /&gt;
&lt;br /&gt;
It integrates Dolibarr with SPV/ANAF for e-Invoice, covering the full flow—authorization, submission, vendor download, statuses, and logs. It follows UBL 2.1 / CIUS-RO rules, including proper storno mapping (negative quantity, positive unit price).&lt;br /&gt;
&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Romania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Slovakia=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3&lt;br /&gt;
==Timeline==&lt;br /&gt;
Slovakia intends to introduce the mandatory B2B e-invoicing. Based on the mandatory e-invoicing, there will be on-line electronic reporting from January 2027, for domestic transactions (transactions with the place of supply within the territory of the Slovakia) and for taxable persons established in Slovakia. Cross-border B2B reporting (for intra EU transactions), based on e-invoicing, is going to be introduced from 1 July 2030.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovakia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Slovenia=&lt;br /&gt;
==Format==&lt;br /&gt;
The national e-SLOG standard (version 2.0) is compliant with the EN 16931.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovenia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Spain (FacturaE - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain is called FacturaE (European standard EN 16931). VeriFactu is the system and network to send and validate invoices.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
B2B: The Law 18/2022 amendment mandates that all B2B transactions must be conducted using eInvoices. Businesses with annual revenues of EUR 8 million or more must comply within one year, while others have a two-year compliance period but it has not been officially issued yet.&lt;br /&gt;
&lt;br /&gt;
Effective on 1 January 2026, the VERIFACTU system will become mandatory for all companies that are not subject to the SII Reporting mandate. This will require these companies to use certified accounting software and obtain invoice clearance for all their transactions.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
One of the following module is required:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module LeyAntiFraude y VeriFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To be compliant with the Faturae y VeryFactu system, you need to install an external module.&lt;br /&gt;
&lt;br /&gt;
See the following page for the liste of available modules: [[Law SIF for the AEAT In Spain]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: As the law is evolving frequently and may depends on your business, you MUST check with your book keeper or your laywer that this suits completely the law and the need of your own business.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Sweden=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Sweden&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The &amp;quot;red payment slip&amp;quot; (called BV) and an &amp;quot;orange payment slip&amp;quot; (called BVR) is no more required after 2022.&lt;br /&gt;
&lt;br /&gt;
QR-Bill is expected for PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer since the 20th june 2020.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To obtain such a swiss QR invoice section on your PDF:&lt;br /&gt;
&lt;br /&gt;
*If you know how to download a module from a git repository, you can also install the module provided here https://github.com/sinabe/dolibarr-swissqr (More information: https://sinabe.ch/facture-qr-suisse-dans-dolibarr/). It is a free module with the development repository available publicly.&lt;br /&gt;
*You can also install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html (as a paying module, you may also benefit a support from author)&lt;br /&gt;
*The last option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but the installation of an external PHP library will be requested at the first generation of the PDF.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Tunisia (TEIF - El Fatoora)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
TTN (Tunisie TradeNet) and standard UBL 2.1 / TEIF.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
To complete...&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
A module exists to generate the XML file for tunisia e-invoicing.&lt;br /&gt;
See https://github.com/kambac80/tunisiaelinv&lt;br /&gt;
&lt;br /&gt;
You must then sign the file using TTN and your certificat TunTrust (Digigo ou clé USB) to send it to the portal El Fatoora.&lt;br /&gt;
&lt;br /&gt;
=United Kingdom=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed).&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed).&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Other / Resources=&lt;br /&gt;
More resources can be found: https://www.tx2.fr/en/2024/01/15/electronic-invoicing-europe-regulations-obligations/&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=65734</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=65734"/>
		<updated>2026-03-28T19:12:10Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* Legislation and current status */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
{{#metamaster:keywords|einvoice,ebilling,ereporting,facturx,e-invoice,e-reporting,e-billing,ubl,peppol,e-factura,efactura}}&lt;br /&gt;
&lt;br /&gt;
This page presents a description of the rules and solutions for Electronic Invoicing (&#039;&#039;&#039;e-invoicing, e-billing&#039;&#039;&#039;) and Invoice and VAT reporting (&#039;&#039;&#039;e-reporting&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions to read, generate and/or send e-invoice depend on your country...&lt;br /&gt;
&lt;br /&gt;
If your country is not in this list, feel free to develop your own interface module and publish it on any git source repository or packaged as a zip (for the price of your choice) on dolistore.com. But you can also do it as an alternative of an existing solution if a module already exists and does not match your need...&lt;br /&gt;
&lt;br /&gt;
Note that for European country, europe maintain a resoure page that may contains complementary generic information ([https://ec.europa.eu/digital-building-blocks/sites/spaces/DIGITAL/pages/467108874/eInvoicing+Country+Factsheets+for+each+Member+State+and+other+countries on this page]):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Argentina=&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
Need AFIP/ARCA e-invoicing&lt;br /&gt;
Automatic CAE, credit/debit notes, digital VAT book and electronic delivery notes.&lt;br /&gt;
TODO Need more reference...&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You can use the following module:&lt;br /&gt;
https://www.dolistore.com/product.php?id=2580&amp;amp;title=facturacion-electronica-argentina-afip-arca-takepos&amp;amp;l=fr&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
&#039;&#039;&#039;Manual support&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
There is several platforms and services in Belgium that you can use to send manually classic invoices. They will be converted and transfer to Peppol network by these services. You will also find on their website sites, the invoices sent by your suppliers. For example the non-profit service [https://letspeppol.org LetsPeppol]. You can also prefer [https://bosa.belgium.be/fr/services/mercurius Mercurius], or the more popular [https://doccle.be/ Doccle]. If you have a low number of invoice, using such platforms may be a good choice. If the platform can&#039;t work with a simple PDF and need a UBL xml file, you can use [https://www.dolistore.com/product.php?id=884&amp;amp;title=peppol-xml-ubl-facture-electronique-multi-ap&amp;amp;l=fr this module] whose goal is to convert your own Dolibarr PDF into the XML format to push them on such platforms.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Integrated support&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you need a more integrated solution, to just generate invoices in the Peppol format from the application, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
If you want to both generate the Peppol invoices and also send or retrieve them on the Peppol network, this is a list of possible modules (note that you may need to subscribe a subscription to the network gateway service used by this modules): &lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client&lt;br /&gt;
*https://www.dolistore.com/product.php?id=2537&amp;amp;title=wiwitrouter-invoice-facturation-electronique-peppol&amp;amp;l=fr&lt;br /&gt;
*https://www.dolistore.com/product.php?id=2635&amp;amp;title=dolifalco&amp;amp;l=fr&lt;br /&gt;
*https://www.dolistore.com/product.php?id=884&amp;amp;title=peppol-xml-ubl-facture-electronique-multi-ap&amp;amp;l=fr (Multi-AP, experimental)&lt;br /&gt;
&lt;br /&gt;
More modules may exists, see [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
Note: Belgium already offers some platforms, for example LetsPeppol, Mercurius, or Doccle, where you can send manually classic invoice to get a Peppol invoice.&lt;br /&gt;
&lt;br /&gt;
A Peppol file can be validated here: https://ecosio.com/en/peppol-and-xml-document-validator/#&lt;br /&gt;
&lt;br /&gt;
To know if a Peppol file has been published on the peppol network, you should find a report page on your Access Point (StoreCove, Mercurial, Doccle, LetsPeppol, ...).&lt;br /&gt;
&lt;br /&gt;
=Colombia=&lt;br /&gt;
==Format==&lt;br /&gt;
Factura Electronica Colombia DIAN&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New, robust DIAN electronic invoicing for Dolibarr (UBL 2.1). Covers Invoice, Credit/Debit Notes, Support Document, and optional e-Payroll. Actively maintained with support and updates. https://www.dolistore.com/product.php?id=2376&amp;amp;title=facturacion-electronica-dian-colombia-ilimitada&amp;amp;l=es&lt;br /&gt;
&lt;br /&gt;
A old module is available here: [https://www.dolistore.com/product.php?id=1153&amp;amp;title=colombian-electronic-invoice&amp;amp;l=fr https://www.dolistore.com/product.php?id=2376&amp;amp;title=unlimited-dian-colombia-electronic-billing&amp;amp;l=fr]&lt;br /&gt;
&lt;br /&gt;
=Croatia=&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
There are no current Business-to-Business (B2B) or Business-to-Consumer (B2C) eInvoicing mandates. However, a B2B mandate is under public consultation and is expected to take effect on 1 January 2026. Near real-time reporting is expected to begin in 2026.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Croatia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Denmark=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3.0 and OIOUBL 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
No mandate for B2B einvoicing yet, but under the 2022 Bookkeeping Act, businesses must ensure their systems are capable of sending and receiving eInvoices, including through Peppol and NemHandel&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Denmark&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Estonia=&lt;br /&gt;
&lt;br /&gt;
===Format===&lt;br /&gt;
Peppol &lt;br /&gt;
&lt;br /&gt;
===Timeline===&lt;br /&gt;
Since 1 July 2025 all accounting entities registered as e-invoice recipients in the commercial register are entitled to receive e-invoices by default.&lt;br /&gt;
&lt;br /&gt;
===Dolibarr support===&lt;br /&gt;
To generate invoices in this format, you may need to install the module: &amp;lt;nowiki&amp;gt;https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
===Legislation and current status===&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Estonia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Finland=&lt;br /&gt;
==Format==&lt;br /&gt;
UBL 2.1 and Cross-Industry Invoice (CII)&amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt; or national formats such as Finvoice 3.0 and TEAPPSXML 3.0 (provided their compliance with the European Standard) or Peppol BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
However, under the eInvoicing Act 241/2019, companies with an annual turnover exceeding EUR 10,000 are entitled to request EN-compliant eInvoices from their suppliers.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Legislation and current status&lt;br /&gt;
&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Finland&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Partial&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factur-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually onto this platform, or to use a third-party service for submission directly from Dolibarr, for example by using:&lt;br /&gt;
&lt;br /&gt;
*The [[Module Chorus|Chorus Pro Module]] - Subscription from EasyaSolution.&lt;br /&gt;
*The EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
*To develop your own code to interface with Chorus, there is a small tuto on the french forum: https://www.dolibarr.fr/forum/t/connexion-api-chorus-pro-environnement-de-test-qualif/46738&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
*Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
*Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing:  Starting from 2/2/2026 with a grace period of gradual implementation until 31/3/2026 all companies with an annual turnover exceeding 1000000,00 euros.&lt;br /&gt;
&lt;br /&gt;
Starting from 1/10/2026 with a grace period of gradual implementation until 31/12/2026 for all entities/companies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Digital delivery note: From 1/4/2025 for companies with a turnover exceeding 200000€ and from 1/10/2025 compulsory for all legal entities&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
E-reporting is implemented through Independent Authority for Public Revenue (IAPR) MyDATA platform with constant API changes&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;s&amp;gt;For Dolibarr versions 13.0.0 - 18.0.x download *https://github.com/evansgl/dolibarr-mydata/releases/tag/1.8&amp;lt;/s&amp;gt;&lt;br /&gt;
*&amp;lt;s&amp;gt;For Dolibarr versions 19.0.0 -21.0.0 use &amp;quot;dolibarr-19 branch&amp;quot; *https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19&amp;lt;/s&amp;gt;&lt;br /&gt;
*For Dolibarr version 22.0.x download from [https://www.dolibarr.gr/foroum/mydata-diathesimo-module/page-50.html#4245 here]&lt;br /&gt;
*For Dolibarr version 23.0.0+ we move to e-invoicing module still under heavy development&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Ireland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
No Business-to-Government (B2G) eInvoicing mandate exists, but since June 2019, all public sector entities are required to receive and process structured eInvoices compliant with the European standard (EN 16931)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Ireland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2019, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
There are two solutions:&lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;Fatturazione elettronica &amp;amp; Professionisti Smart&amp;quot; module: https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html&lt;br /&gt;
*The &amp;quot;Fatture Elettroniche ITA&amp;quot; module available from the site https://doliplatform.com/fatturazione-elettronica/ (Italian Dolibarr Preferred Partner Diciannove Soc. Coop. )&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*https://www.fatturapa.gov.it/en/index.html&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Latvia=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing starting from 2028&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Latvia*&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Lithuania=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
mandatory eInvoicing targeted for 1 January 2028.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Lithuania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
While there&#039;s no specific mention of Dolibarr support for Luxembourg e-invoicing, users can likely use the Peppol XML module available for other countries:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
CFDI XML&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Mexican electronic format, you need to install a CFDI XML module.&lt;br /&gt;
&lt;br /&gt;
*Sources of such a module are available here: https://github.com/avadnc/cfdixml&lt;br /&gt;
&lt;br /&gt;
*You can find a ready to deploy module file here: https://www.dolistore.com/product.php?id=354&amp;amp;title=mexico-cfdi&amp;amp;l=fr&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Norway=&lt;br /&gt;
==Format==&lt;br /&gt;
EHF/Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Norway&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Poland (KSeF)=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Poland plans to make business-to-business (B2B) e-Invoicing mandatory from 2026.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use one of the module to synchronise Dolibarr invoices with Peppol [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol available on DoliStore]:&lt;br /&gt;
&lt;br /&gt;
You can also have a look at this KSeF dedicated modue: https://github.com/InPoint-Automation/Dolibarr-KSeF-Module&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
More information on page: https://ksef.mf.gov.pl/&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Poland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Portugal=&lt;br /&gt;
==Format==&lt;br /&gt;
OASIS UBL CIUS-PT and CEFACT CII CIUS-PT&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Portugal&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Romania (e-Factura)=&lt;br /&gt;
==Format==&lt;br /&gt;
RO_CIUS  ensuring alignment with the broader European e-invoicing standard EN 16931.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
A dedicated module called QInvoice exists here: https://www.dolistore.com/product.php?id=2494&lt;br /&gt;
&lt;br /&gt;
It integrates Dolibarr with SPV/ANAF for e-Invoice, covering the full flow—authorization, submission, vendor download, statuses, and logs. It follows UBL 2.1 / CIUS-RO rules, including proper storno mapping (negative quantity, positive unit price).&lt;br /&gt;
&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Romania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Slovakia=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3&lt;br /&gt;
==Timeline==&lt;br /&gt;
Slovakia intends to introduce the mandatory B2B e-invoicing. Based on the mandatory e-invoicing, there will be on-line electronic reporting from January 2027, for domestic transactions (transactions with the place of supply within the territory of the Slovakia) and for taxable persons established in Slovakia. Cross-border B2B reporting (for intra EU transactions), based on e-invoicing, is going to be introduced from 1 July 2030.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovakia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Slovenia=&lt;br /&gt;
==Format==&lt;br /&gt;
The national e-SLOG standard (version 2.0) is compliant with the EN 16931.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovenia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Spain (FacturaE - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain is called FacturaE (European standard EN 16931). VeriFactu is the system and network to send and validate invoices.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
B2B: The Law 18/2022 amendment mandates that all B2B transactions must be conducted using eInvoices. Businesses with annual revenues of EUR 8 million or more must comply within one year, while others have a two-year compliance period but it has not been officially issued yet.&lt;br /&gt;
&lt;br /&gt;
Effective on 1 January 2026, the VERIFACTU system will become mandatory for all companies that are not subject to the SII Reporting mandate. This will require these companies to use certified accounting software and obtain invoice clearance for all their transactions.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
One of the following module is required:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module LeyAntiFraude y VeriFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To be compliant with the Faturae y VeryFactu system, you need to install an external module.&lt;br /&gt;
&lt;br /&gt;
See the following page for the liste of available modules: [[Law SIF for the AEAT In Spain]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: As the law is evolving frequently and may depends on your business, you MUST check with your book keeper or your laywer that this suits completely the law and the need of your own business.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Sweden=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Sweden&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The &amp;quot;red payment slip&amp;quot; (called BV) and an &amp;quot;orange payment slip&amp;quot; (called BVR) is no more required after 2022.&lt;br /&gt;
&lt;br /&gt;
QR-Bill is expected for PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer since the 20th june 2020.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To obtain such a swiss QR invoice section on your PDF:&lt;br /&gt;
&lt;br /&gt;
*If you know how to download a module from a git repository, you can also install the module provided here https://github.com/sinabe/dolibarr-swissqr (More information: https://sinabe.ch/facture-qr-suisse-dans-dolibarr/). It is a free module with the development repository available publicly.&lt;br /&gt;
*You can also install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html (as a paying module, you may also benefit a support from author)&lt;br /&gt;
*The last option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but the installation of an external PHP library will be requested at the first generation of the PDF.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Tunisia (TEIF - El Fatoora)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
TTN (Tunisie TradeNet) and standard UBL 2.1 / TEIF.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
To complete...&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
A module exists to generate the XML file for tunisia e-invoicing.&lt;br /&gt;
See https://github.com/kambac80/tunisiaelinv&lt;br /&gt;
&lt;br /&gt;
You must then sign the file using TTN and your certificat TunTrust (Digigo ou clé USB) to send it to the portal El Fatoora.&lt;br /&gt;
&lt;br /&gt;
=United Kingdom=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed).&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed).&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following modules may also able to generate invoices and send the invoice on the Peppol Network. See [https://www.dolistore.com/index.php?controller=search&amp;amp;orderby=position&amp;amp;orderway=desc&amp;amp;website=marketplace&amp;amp;search_query=peppol full list available on DoliStore]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Other / Resources=&lt;br /&gt;
More resources can be found: https://www.tx2.fr/en/2024/01/15/electronic-invoicing-europe-regulations-obligations/&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=64228</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=64228"/>
		<updated>2025-09-16T13:16:44Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* Timeline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
&amp;lt;seo metak=&amp;quot;einvoice, ereporting&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page presents a description of the rules and solutions for Electronic Invoicing (&#039;&#039;&#039;e-invoicing, e-billing&#039;&#039;&#039;) and Invoice and VAT reporting (&#039;&#039;&#039;e-reporting&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions to read, generate and/or send e-invoice depend on your country...&lt;br /&gt;
&lt;br /&gt;
If your country is not in this list, feel free to develop your own interface module and publish it on any git source repository or packaged as a zip (for the price of your choice) on dolistore.com. But you can also do it as an alternative of an existing solution if a module already exists and does not match your need...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
Note: Belgium already offers a platform called Mercurius, where you can send manually classic invoice to get a Peppol invoice.&lt;br /&gt;
&lt;br /&gt;
A peppol file can be validated here: https://ecosio.com/en/peppol-and-xml-document-validator/#&lt;br /&gt;
&lt;br /&gt;
To know if a peppol file has been published on the peppol network, you can follow this tutorial:&lt;br /&gt;
https://openpeppol.atlassian.net/wiki/spaces/Belgium/pages/624689399/Ma+facture+a-t-elle+t+bien+re+ue+par+le+client+Quel+est+son+statut&lt;br /&gt;
&lt;br /&gt;
=Colombia=&lt;br /&gt;
==Format==&lt;br /&gt;
Factura Electronica Colombia DIAN&lt;br /&gt;
&lt;br /&gt;
...To complete...&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
An old module is available here: https://www.dolistore.com/product.php?id=1205&amp;amp;title=factura-electronica-colombia-dian&amp;amp;l=en&lt;br /&gt;
We have not got enough feedback to know it this module is still valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Croatia=&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
There are no current Business-to-Business (B2B) or Business-to-Consumer (B2C) eInvoicing mandates. However, a B2B mandate is under public consultation and is expected to take effect on 1 January 2026. Near real-time reporting is expected to begin in 2026.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Croatia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Denmark=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3.0 and OIOUBL 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
No mandate for B2B einvoicing yet, but under the 2022 Bookkeeping Act, businesses must ensure their systems are capable of sending and receiving eInvoices, including through Peppol and NemHandel&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Denmark&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Estonia=&lt;br /&gt;
&lt;br /&gt;
===Format===&lt;br /&gt;
Peppol &lt;br /&gt;
&lt;br /&gt;
===Timeline===&lt;br /&gt;
Since 1 July 2025 all accounting entities registered as e-invoice recipients in the commercial register are entitled to receive e-invoices by default.&lt;br /&gt;
&lt;br /&gt;
===Dolibarr support===&lt;br /&gt;
To generate invoices in this format, you may need to install the module: &amp;lt;nowiki&amp;gt;https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: &amp;lt;nowiki&amp;gt;https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client&amp;lt;/nowiki&amp;gt; (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
===Legislation and current status===&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Estonia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Finland=&lt;br /&gt;
==Format==&lt;br /&gt;
UBL 2.1 and Cross-Industry Invoice (CII)&amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt; or national formats such as Finvoice 3.0 and TEAPPSXML 3.0 (provided their compliance with the European Standard) or Peppol BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
However, under the eInvoicing Act 241/2019, companies with an annual turnover exceeding EUR 10,000 are entitled to request EN-compliant eInvoices from their suppliers.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Legislation and current status&lt;br /&gt;
&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Finland&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Partial&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factur-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually onto this platform, or to use a third-party service for submission directly from Dolibarr, for example by using:&lt;br /&gt;
&lt;br /&gt;
*The [[Module Chorus|Chorus Pro Module]] - Subscription from EasyaSolution.&lt;br /&gt;
*The EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
*To develop your own code to interface with Chorus, there is a small tuto on the french forum: https://www.dolibarr.fr/forum/t/connexion-api-chorus-pro-environnement-de-test-qualif/46738&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
*Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
*Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing:  Starting from 2/2/2026 with a grace period of gradual implementation until 31/3/2026 all companies with an annual turnover exceeding 1000000,00 euros.&lt;br /&gt;
&lt;br /&gt;
Starting from 1/10/2026 with a grace period of gradual implementation until 31/12/2026 for all entities/companies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Digital delivery note: From 1/4/2025 for companies with a turnover exceeding 200000€ and from 1/10/2025 compulsory for all legal entities&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
E-reporting is implemented by Independent Authority for Public Revenue (IAPR) MyDATA platform&lt;br /&gt;
&lt;br /&gt;
*For Dolibarr versions 13.0.0 - 18.0.4 download *https://github.com/evansgl/dolibarr-mydata/releases/tag/1.8&lt;br /&gt;
*For Dolibarr versions 19.0.0+ use &amp;quot;dolibarr-19 branch&amp;quot; *https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Ireland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
No Business-to-Government (B2G) eInvoicing mandate exists, but since June 2019, all public sector entities are required to receive and process structured eInvoices compliant with the European standard (EN 16931)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Ireland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2019, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
There are two solutions:&lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;Fatturazione elettronica &amp;amp; Professionisti Smart&amp;quot; module: https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html&lt;br /&gt;
*The &amp;quot;Fatture Elettroniche ITA&amp;quot; module available from the site https://doliplatform.com/fatturazione-elettronica/ (Italian Dolibarr Preferred Partner Diciannove Soc. Coop. )&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*https://www.fatturapa.gov.it/en/index.html&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Latvia=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing starting from 2028&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Latvia*&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Lithuania=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
mandatory eInvoicing targeted for 1 January 2028.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Lithuania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
While there&#039;s no specific mention of Dolibarr support for Luxembourg e-invoicing, users can likely use the Peppol XML module available for other countries:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
CFDI XML&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Mexican electronic format, you need to install a CFDI XML module.&lt;br /&gt;
&lt;br /&gt;
*Sources of such a module are available here: https://github.com/avadnc/cfdixml&lt;br /&gt;
&lt;br /&gt;
*You can find a ready to deploy module file here: https://www.dolistore.com/product.php?id=354&amp;amp;title=mexico-cfdi&amp;amp;l=fr&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Norway=&lt;br /&gt;
==Format==&lt;br /&gt;
EHF/Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Norway&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Poland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
Poland plans to make business-to-business (B2B) e-Invoicing mandatory from 2026.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Poland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Portugal=&lt;br /&gt;
==Format==&lt;br /&gt;
OASIS UBL CIUS-PT and CEFACT CII CIUS-PT&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Portugal&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Romania=&lt;br /&gt;
==Format==&lt;br /&gt;
RO_CIUS  ensuring alignment with the broader European e-invoicing standard EN 16931.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Romania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Slovakia=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3&lt;br /&gt;
==Timeline==&lt;br /&gt;
Slovakia intends to introduce the mandatory B2B e-invoicing. Based on the mandatory e-invoicing, there will be on-line electronic reporting from January 2027, for domestic transactions (transactions with the place of supply within the territory of the Slovakia) and for taxable persons established in Slovakia. Cross-border B2B reporting (for intra EU transactions), based on e-invoicing, is going to be introduced from 1 July 2030.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovakia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Slovenia=&lt;br /&gt;
==Format==&lt;br /&gt;
The national e-SLOG standard (version 2.0) is compliant with the EN 16931.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovenia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Spain (FacturaE - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain is called FacturaE (European standard EN 16931). VeriFactu is the system and network to send and validate invoices.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
B2B: The Law 18/2022 amendment mandates that all B2B transactions must be conducted using eInvoices. Businesses with annual revenues of EUR 8 million or more must comply within one year, while others have a two-year compliance period but it has not been officially issued yet.&lt;br /&gt;
&lt;br /&gt;
Effective on 1 January 2026, the VERIFACTU system will become mandatory for all companies that are not subject to the SII Reporting mandate. This will require these companies to use certified accounting software and obtain invoice clearance for all their transactions.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
One of the following module is required:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module DoliFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A module called 2FacturaE exists to generated invoices using the invoice in the format expected (https://www.2byte.es/index.php/productos/modulo-2facturae). It was enough for spain.&lt;br /&gt;
&lt;br /&gt;
But this is no more true: In 2025, you must also now have a software that keep tracking of recording payment and invoices into an unalterable way.&lt;br /&gt;
For this you need now the module DoliFactu (https://dolifactu.es/producto/modulo-antifraude-dolibarr/).&lt;br /&gt;
&lt;br /&gt;
Note also that there is also a ready to use hosting service called DoliFactu.es that includes this module by default in its offer.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module LeyAntiFraudeYVeriFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Another solution to be ready and compliant with the VeryFactu system is to install the external module called &amp;quot;Ley antifraude y VeriFactu&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can get the module here: https://www.dolistore.com/fr/modules/2259-Ley-antifraude-y-VeriFactu.html?search_query=verifactu&amp;amp;results=1&lt;br /&gt;
&lt;br /&gt;
Note: As the law is evolving frequently and may depends on your business, you MUST check with your book keeper or your laywer that this suits completely the law and the need of your own business.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Sweden=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Sweden&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The &amp;quot;red payment slip&amp;quot; (called BV) and an &amp;quot;orange payment slip&amp;quot; (called BVR) is no more required after 2022.&lt;br /&gt;
&lt;br /&gt;
QR-Bill is expected for PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer since the 20th june 2020.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To obtain such a section:&lt;br /&gt;
&lt;br /&gt;
*You can install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html&lt;br /&gt;
*The other option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but the installation of an external PHP library will be requested at the first generation of the PDF.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=United Kingdom=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed).&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed).&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Other / Resources=&lt;br /&gt;
More resources can be found: https://www.tx2.fr/en/2024/01/15/electronic-invoicing-europe-regulations-obligations/&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63815</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63815"/>
		<updated>2025-08-05T19:23:10Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
&amp;lt;seo metak=&amp;quot;einvoice, ereporting&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page presents a description of the rules and solutions for electronic invoicing (&#039;&#039;&#039;e-invoicing, e-billing&#039;&#039;&#039;) and &#039;&#039;&#039;VAT Real-Time Reporting&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions to read, generate and/or send e-invoice depends on your country...so you must you MUST check with your Accountant / book keeper or your laywer that following solutions comply with local laws and business needs.&lt;br /&gt;
&lt;br /&gt;
If your country is not in this list feel free to &lt;br /&gt;
&lt;br /&gt;
*add relevant information&lt;br /&gt;
*test or ask for support from following module developers&lt;br /&gt;
&lt;br /&gt;
*develop your own interface module and publish it on any git source repository or packaged as a zip (for the price of your choice) on dolistore.com or&lt;br /&gt;
&lt;br /&gt;
*fork any of the free solutions and develop your own interface&lt;br /&gt;
&lt;br /&gt;
===Dolibarr support===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable mw-collapsible&amp;quot;&lt;br /&gt;
!Country&lt;br /&gt;
!Format&lt;br /&gt;
!Module&lt;br /&gt;
!Peppol access point providers or country specific platforms&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|Eu countries&lt;br /&gt;
|Peppol&lt;br /&gt;
|[https://www.dolistore.com/product.php?title=Peppol-XML---facture-electronique&amp;amp;extid=1585# Peppol XML / UBL]&lt;br /&gt;
|[https://e-invoice.be/ e-invoice]&amp;lt;code&amp;gt;[https://www.scrada.be/en/ Scrada](Belgium), [https://www.iopole.com/ IOPOLE](France)&amp;lt;/code&amp;gt;&lt;br /&gt;
|Module generates Peppol XML / BIS Billing format invoices &lt;br /&gt;
valid in Europe&lt;br /&gt;
|-&lt;br /&gt;
|Belgium, France  *&lt;br /&gt;
|Peppol&lt;br /&gt;
|[https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client Peppol Storecove]&lt;br /&gt;
|[https://www.storecove.com Storecove]&lt;br /&gt;
|*Citation needed for supported countries &lt;br /&gt;
except France and Belgium&lt;br /&gt;
|-&lt;br /&gt;
|Colombia&lt;br /&gt;
|UBL 2.1&lt;br /&gt;
|[https://www.dolistore.com/product.php?id=1205&amp;amp;title=factura-electronica-colombia-dian&amp;amp;l=en Factura Electronica Colombia DIAN]&lt;br /&gt;
|&lt;br /&gt;
|Not enough feedback to know it this module is still valid.&lt;br /&gt;
|-&lt;br /&gt;
|Colombia&lt;br /&gt;
|UBL 2.1&lt;br /&gt;
|https://nortserver.com/dolibarr.php&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|France, Germany&lt;br /&gt;
|FacturX&lt;br /&gt;
|[https://www.dolistore.com/product.php?title=FacturX---Facture---lectronique--Chorus----&amp;amp;extid=1511# FacturX]&lt;br /&gt;
|&lt;br /&gt;
|This module, or a modified or Dolibarrized version of the module&lt;br /&gt;
will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
|-&lt;br /&gt;
|France&lt;br /&gt;
|&lt;br /&gt;
|[https://www.dolistore.com/product.php?title=Chorus-Pro&amp;amp;extid=1184# Demat 4 Dolibarr]&lt;br /&gt;
|Chorus-Pro&lt;br /&gt;
|The module requires a subscription to be operational&lt;br /&gt;
|-&lt;br /&gt;
|Greece&lt;br /&gt;
|&lt;br /&gt;
|[https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19 Dolibarr-mydata]&lt;br /&gt;
|myDATA&lt;br /&gt;
|VAT Real-Time Reporting only&lt;br /&gt;
|-&lt;br /&gt;
|Italy&lt;br /&gt;
|FatturaPA&lt;br /&gt;
|[https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html Fatturazione elettronica &amp;amp; Professionisti Smart]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Italy&lt;br /&gt;
|FatturaPA&lt;br /&gt;
|[https://doliplatform.com/fatturazione-elettronica/ Fatture Elettroniche ITA]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Mexico&lt;br /&gt;
|CFDI XML&lt;br /&gt;
|[https://github.com/avadnc/cfdixml cfdixml]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Mexico&lt;br /&gt;
|CFDI XML&lt;br /&gt;
|[https://www.dolistore.com/product.php?id=354&amp;amp;title=mexico-cfdi# Mexico CFDI]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Spain&lt;br /&gt;
|FacturaE&lt;br /&gt;
|[https://www.2byte.es/index.php/productos/modulo-2facturae 2FacturaE]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Spain&lt;br /&gt;
|&lt;br /&gt;
|[https://dolifactu.es/producto/modulo-antifraude-dolibarr/ VeriFactu]&lt;br /&gt;
|VeriFactu&lt;br /&gt;
|For compliance with the Spanish Anti fraud Law&lt;br /&gt;
|-&lt;br /&gt;
|Spain&lt;br /&gt;
|&lt;br /&gt;
|[https://www.dolistore.com/product.php?title=Ley-antifraude-y-VeriFactu&amp;amp;extid=2259# Ley antifraude]&lt;br /&gt;
|VeriFactu&lt;br /&gt;
|For compliance with the Spanish Anti fraud Law&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Colombia=&lt;br /&gt;
==Format==&lt;br /&gt;
UBL V2.1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Legislation and current status&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: N/A&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Croatia=&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
There are no current Business-to-Business (B2B) or Business-to-Consumer (B2C) eInvoicing mandates. However, a B2B mandate is under public consultation and is expected to take effect on 1 January 2026. Near real-time reporting is expected to begin in 2026.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Croatia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Denmark=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3.0 and OIOUBL 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
No mandate for B2B einvoicing yet, but under the 2022 Bookkeeping Act, businesses must ensure their systems are capable of sending and receiving eInvoices, including through Peppol and NemHandel&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Denmark&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Estonia=&lt;br /&gt;
&lt;br /&gt;
===Format===&lt;br /&gt;
Peppol &lt;br /&gt;
&lt;br /&gt;
===Timeline===&lt;br /&gt;
Since 1 July 2025 all accounting entities registered as e-invoice recipients in the commercial register are entitled to receive e-invoices by default.&lt;br /&gt;
&lt;br /&gt;
===Legislation and current status===&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Estonia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Finland=&lt;br /&gt;
==Format==&lt;br /&gt;
UBL 2.1 and Cross-Industry Invoice (CII)&amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt; or national formats such as Finvoice 3.0 and TEAPPSXML 3.0 (provided their compliance with the European Standard) or Peppol BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
However, under the eInvoicing Act 241/2019, companies with an annual turnover exceeding EUR 10,000 are entitled to request EN-compliant eInvoices from their suppliers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Legislation and current status&lt;br /&gt;
&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Finland&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Partial&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factum-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually onto this platform, or to use a third-party service for submission directly from Dolibarr, for example by using:&lt;br /&gt;
&lt;br /&gt;
*The [[Module Chorus|Chorus Pro Module]] - Subscription from EasyaSolution.&lt;br /&gt;
*The EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
*To develop your own code to interface with Chorus, there is a small tuto on the french forum: https://www.dolibarr.fr/forum/t/connexion-api-chorus-pro-environnement-de-test-qualif/46738&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
*Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
*Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing: From 1/7/2025 all companies are required to issue and receive their invoices in electronic format&lt;br /&gt;
&lt;br /&gt;
Digital delivery note: From 1/4/2025 for companies with a turnover exceeding 200000€ and from 1/10/2025 compulsory for all legal entities&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Ireland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
No Business-to-Government (B2G) eInvoicing mandate exists, but since June 2019, all public sector entities are required to receive and process structured eInvoices compliant with the European standard (EN 16931)&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Ireland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2019, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*https://www.fatturapa.gov.it/en/index.html&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Latvia=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing starting from 2028&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Latvia*&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Lithuania=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
mandatory eInvoicing targeted for 1 January 2028.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Lithuania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
CFDI XML&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Norway=&lt;br /&gt;
==Format==&lt;br /&gt;
EHF/Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Norway&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Poland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
Poland plans to make business-to-business (B2B) e-Invoicing mandatory from 2026.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Poland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Portugal=&lt;br /&gt;
==Format==&lt;br /&gt;
OASIS UBL CIUS-PT and CEFACT CII CIUS-PT&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Portugal&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Romania=&lt;br /&gt;
==Format==&lt;br /&gt;
RO_CIUS  ensuring alignment with the broader European e-invoicing standard EN 16931.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Romania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Slovakia=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3&lt;br /&gt;
==Timeline==&lt;br /&gt;
Slovakia intends to introduce the mandatory B2B e-invoicing. Based on the mandatory e-invoicing, there will be on-line electronic reporting from January 2027, for domestic transactions (transactions with the place of supply within the territory of the Slovakia) and for taxable persons established in Slovakia. Cross-border B2B reporting (for intra EU transactions), based on e-invoicing, is going to be introduced from 1 July 2030.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovakia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Slovenia=&lt;br /&gt;
==Format==&lt;br /&gt;
The national e-SLOG standard (version 2.0) is compliant with the EN 16931.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovenia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Spain (FacturaE - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain is called FacturaE (European standard EN 16931). VeriFactu is the system and network to send and validate invoices.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
B2B: The Law 18/2022 amendment mandates that all B2B transactions must be conducted using eInvoices. Businesses with annual revenues of EUR 8 million or more must comply within one year, while others have a two-year compliance period but it has not been officially issued yet.&lt;br /&gt;
&lt;br /&gt;
Effective on 1 January 2026, the VERIFACTU system will become mandatory for all companies that are not subject to the SII Reporting mandate. This will require these companies to use certified accounting software and obtain invoice clearance for all their transactions.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Sweden=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Sweden&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The &amp;quot;red payment slip&amp;quot; (called BV) and an &amp;quot;orange payment slip&amp;quot; (called BVR) is no more required after 2022.&lt;br /&gt;
&lt;br /&gt;
QR-Bill is expected for PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer since the 20th june 2020.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To obtain such a section:&lt;br /&gt;
&lt;br /&gt;
*You can install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html&lt;br /&gt;
*The other option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but the installation of an external PHP library will be requested at the first generation of the PDF.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=United Kingdom=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed).&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Other / Resources=&lt;br /&gt;
More resources can be found: https://www.tx2.fr/en/2024/01/15/electronic-invoicing-europe-regulations-obligations/&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63814</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63814"/>
		<updated>2025-08-05T17:57:18Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
&amp;lt;seo metak=&amp;quot;einvoice, ereporting&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page presents a description of the rules and solutions for electronic invoicing (&#039;&#039;&#039;e-invoicing, e-billing&#039;&#039;&#039;) and &#039;&#039;&#039;VAT Real-Time Reporting&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions to read, generate and/or send e-invoice depends on your country...so you must you MUST check with your Accountant / book keeper or your laywer that following solutions comply with local laws and business needs.&lt;br /&gt;
&lt;br /&gt;
If your country is not in this list feel free to &lt;br /&gt;
&lt;br /&gt;
*add relevant information&lt;br /&gt;
*test or ask for support from following module developers&lt;br /&gt;
&lt;br /&gt;
*develop your own interface module and publish it on any git source repository or packaged as a zip (for the price of your choice) on dolistore.com or&lt;br /&gt;
&lt;br /&gt;
*clone any of the free solutions and develop your own interface&lt;br /&gt;
&lt;br /&gt;
===Dolibarr support===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable mw-collapsible&amp;quot;&lt;br /&gt;
!Country&lt;br /&gt;
!Format&lt;br /&gt;
!Module&lt;br /&gt;
!Peppol access point providers or country specific platforms&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|Eu countries&lt;br /&gt;
|Peppol&lt;br /&gt;
|[https://www.dolistore.com/product.php?title=Peppol-XML---facture-electronique&amp;amp;extid=1585# Peppol XML / UBL]&lt;br /&gt;
|[https://e-invoice.be/ e-invoice]&amp;lt;code&amp;gt;[https://www.scrada.be/en/ Scrada](Belgium), [https://www.iopole.com/ IOPOLE](France)&amp;lt;/code&amp;gt;&lt;br /&gt;
|Module generates Peppol XML / BIS Billing format invoices &lt;br /&gt;
valid in Europe&lt;br /&gt;
|-&lt;br /&gt;
|Belgium, France  *&lt;br /&gt;
|Peppol&lt;br /&gt;
|[https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client Peppol Storecove]&lt;br /&gt;
|[https://www.storecove.com Storecove]&lt;br /&gt;
|*Citation needed for supported countries &lt;br /&gt;
except France and Belgium&lt;br /&gt;
|-&lt;br /&gt;
|Colombia&lt;br /&gt;
|UBL 2.1&lt;br /&gt;
|[https://www.dolistore.com/product.php?id=1205&amp;amp;title=factura-electronica-colombia-dian&amp;amp;l=en Factura Electronica Colombia DIAN]&lt;br /&gt;
|&lt;br /&gt;
|Not enough feedback to know it this module is still valid.&lt;br /&gt;
|-&lt;br /&gt;
|Colombia&lt;br /&gt;
|UBL 2.1&lt;br /&gt;
|https://nortserver.com/dolibarr.php&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|France, Germany&lt;br /&gt;
|FacturX&lt;br /&gt;
|[https://www.dolistore.com/product.php?title=FacturX---Facture---lectronique--Chorus----&amp;amp;extid=1511# FacturX]&lt;br /&gt;
|&lt;br /&gt;
|This module, or a modified or Dolibarrized version of the module&lt;br /&gt;
will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
|-&lt;br /&gt;
|France&lt;br /&gt;
|&lt;br /&gt;
|[https://www.dolistore.com/product.php?title=Chorus-Pro&amp;amp;extid=1184# Demat 4 Dolibarr]&lt;br /&gt;
|Chorus-Pro&lt;br /&gt;
|The module requires a subscription to be operational&lt;br /&gt;
|-&lt;br /&gt;
|Greece&lt;br /&gt;
|&lt;br /&gt;
|[https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19 Dolibarr-mydata]&lt;br /&gt;
|myDATA&lt;br /&gt;
|VAT Real-Time Reporting only&lt;br /&gt;
|-&lt;br /&gt;
|Italy&lt;br /&gt;
|FatturaPA&lt;br /&gt;
|[https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html Fatturazione elettronica &amp;amp; Professionisti Smart]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Italy&lt;br /&gt;
|FatturaPA&lt;br /&gt;
|[https://doliplatform.com/fatturazione-elettronica/ Fatture Elettroniche ITA]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Mexico&lt;br /&gt;
|CFDI XML&lt;br /&gt;
|[https://github.com/avadnc/cfdixml cfdixml]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Mexico&lt;br /&gt;
|CFDI XML&lt;br /&gt;
|[https://www.dolistore.com/product.php?id=354&amp;amp;title=mexico-cfdi# Mexico CFDI]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Spain&lt;br /&gt;
|FacturaE&lt;br /&gt;
|[https://www.2byte.es/index.php/productos/modulo-2facturae 2FacturaE]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Spain&lt;br /&gt;
|&lt;br /&gt;
|[https://dolifactu.es/producto/modulo-antifraude-dolibarr/ VeriFactu]&lt;br /&gt;
|VeriFactu&lt;br /&gt;
|For compliance with the Spanish Anti fraud Law&lt;br /&gt;
|-&lt;br /&gt;
|Spain&lt;br /&gt;
|&lt;br /&gt;
|[https://www.dolistore.com/product.php?title=Ley-antifraude-y-VeriFactu&amp;amp;extid=2259# Ley antifraude]&lt;br /&gt;
|VeriFactu&lt;br /&gt;
|For compliance with the Spanish Anti fraud Law&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Colombia=&lt;br /&gt;
==Format==&lt;br /&gt;
UBL V2.1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Legislation and current status&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: N/A&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Croatia=&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
There are no current Business-to-Business (B2B) or Business-to-Consumer (B2C) eInvoicing mandates. However, a B2B mandate is under public consultation and is expected to take effect on 1 January 2026. Near real-time reporting is expected to begin in 2026.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Croatia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Denmark=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3.0 and OIOUBL 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
No mandate for B2B einvoicing yet, but under the 2022 Bookkeeping Act, businesses must ensure their systems are capable of sending and receiving eInvoices, including through Peppol and NemHandel&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Denmark&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Estonia=&lt;br /&gt;
&lt;br /&gt;
===Format===&lt;br /&gt;
Peppol &lt;br /&gt;
&lt;br /&gt;
===Timeline===&lt;br /&gt;
Since 1 July 2025 all accounting entities registered as e-invoice recipients in the commercial register are entitled to receive e-invoices by default.&lt;br /&gt;
&lt;br /&gt;
===Legislation and current status===&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Estonia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Finland=&lt;br /&gt;
==Format==&lt;br /&gt;
UBL 2.1 and Cross-Industry Invoice (CII)&amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt; or national formats such as Finvoice 3.0 and TEAPPSXML 3.0 (provided their compliance with the European Standard) or Peppol BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
However, under the eInvoicing Act 241/2019, companies with an annual turnover exceeding EUR 10,000 are entitled to request EN-compliant eInvoices from their suppliers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Legislation and current status&lt;br /&gt;
&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Finland&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Partial&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factum-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually onto this platform, or to use a third-party service for submission directly from Dolibarr, for example by using:&lt;br /&gt;
&lt;br /&gt;
*The [[Module Chorus|Chorus Pro Module]] - Subscription from EasyaSolution.&lt;br /&gt;
*The EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
*To develop your own code to interface with Chorus, there is a small tuto on the french forum: https://www.dolibarr.fr/forum/t/connexion-api-chorus-pro-environnement-de-test-qualif/46738&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
*Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
*Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing: From 1/7/2025 all companies are required to issue and receive their invoices in electronic format&lt;br /&gt;
&lt;br /&gt;
Digital delivery note: From 1/4/2025 for companies with a turnover exceeding 200000€ and from 1/10/2025 compulsory for all legal entities&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Ireland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
No Business-to-Government (B2G) eInvoicing mandate exists, but since June 2019, all public sector entities are required to receive and process structured eInvoices compliant with the European standard (EN 16931)&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Ireland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2019, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*https://www.fatturapa.gov.it/en/index.html&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Latvia=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing starting from 2028&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Latvia*&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Lithuania=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
mandatory eInvoicing targeted for 1 January 2028.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Lithuania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
CFDI XML&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Norway=&lt;br /&gt;
==Format==&lt;br /&gt;
EHF/Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Norway&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Poland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
Poland plans to make business-to-business (B2B) e-Invoicing mandatory from 2026.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Poland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Portugal=&lt;br /&gt;
==Format==&lt;br /&gt;
OASIS UBL CIUS-PT and CEFACT CII CIUS-PT&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Portugal&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Romania=&lt;br /&gt;
==Format==&lt;br /&gt;
RO_CIUS  ensuring alignment with the broader European e-invoicing standard EN 16931.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Romania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Slovakia=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3&lt;br /&gt;
==Timeline==&lt;br /&gt;
Slovakia intends to introduce the mandatory B2B e-invoicing. Based on the mandatory e-invoicing, there will be on-line electronic reporting from January 2027, for domestic transactions (transactions with the place of supply within the territory of the Slovakia) and for taxable persons established in Slovakia. Cross-border B2B reporting (for intra EU transactions), based on e-invoicing, is going to be introduced from 1 July 2030.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovakia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Slovenia=&lt;br /&gt;
==Format==&lt;br /&gt;
The national e-SLOG standard (version 2.0) is compliant with the EN 16931.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovenia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Spain (FacturaE - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain is called FacturaE (European standard EN 16931). VeriFactu is the system and network to send and validate invoices.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
B2B: The Law 18/2022 amendment mandates that all B2B transactions must be conducted using eInvoices. Businesses with annual revenues of EUR 8 million or more must comply within one year, while others have a two-year compliance period but it has not been officially issued yet.&lt;br /&gt;
&lt;br /&gt;
Effective on 1 January 2026, the VERIFACTU system will become mandatory for all companies that are not subject to the SII Reporting mandate. This will require these companies to use certified accounting software and obtain invoice clearance for all their transactions.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Sweden=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Sweden&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The &amp;quot;red payment slip&amp;quot; (called BV) and an &amp;quot;orange payment slip&amp;quot; (called BVR) is no more required after 2022.&lt;br /&gt;
&lt;br /&gt;
QR-Bill is expected for PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer since the 20th june 2020.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To obtain such a section:&lt;br /&gt;
&lt;br /&gt;
*You can install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html&lt;br /&gt;
*The other option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but the installation of an external PHP library will be requested at the first generation of the PDF.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=United Kingdom=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed).&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Legislation and current status ==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Other / Resources=&lt;br /&gt;
More resources can be found: https://www.tx2.fr/en/2024/01/15/electronic-invoicing-europe-regulations-obligations/&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63813</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63813"/>
		<updated>2025-08-05T17:54:38Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
&amp;lt;seo metak=&amp;quot;einvoice, ereporting&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page presents a description of the rules and solutions for electronic invoicing (&#039;&#039;&#039;e-invoicing, e-billing&#039;&#039;&#039;) and &#039;&#039;&#039;VAT Real-Time Reporting&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions to read, generate and/or send e-invoice depends on your country...so you must you MUST check with your Accountant / book keeper or your laywer that following solutions comply with local laws and business needs.&lt;br /&gt;
&lt;br /&gt;
If your country is not in this list feel free to &lt;br /&gt;
&lt;br /&gt;
*add relevant information&lt;br /&gt;
*test or ask for support from following module developers&lt;br /&gt;
&lt;br /&gt;
*develop your own interface module and publish it on any git source repository or packaged as a zip (for the price of your choice) on dolistore.com or&lt;br /&gt;
&lt;br /&gt;
*clone any of the free solutions and develop your own interface&lt;br /&gt;
&lt;br /&gt;
===Dolibarr support===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable mw-collapsible&amp;quot;&lt;br /&gt;
!Country&lt;br /&gt;
!Format&lt;br /&gt;
!Module&lt;br /&gt;
!Peppol access point providers or country specific platforms&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|Eu countries&lt;br /&gt;
|Peppol&lt;br /&gt;
|[https://www.dolistore.com/product.php?title=Peppol-XML---facture-electronique&amp;amp;extid=1585# Peppol XML / UBL]&lt;br /&gt;
|[https://e-invoice.be/ e-invoice]&amp;lt;code&amp;gt;[https://www.scrada.be/en/ Scrada](Belgium), [https://www.iopole.com/ IOPOLE](France)&amp;lt;/code&amp;gt;&lt;br /&gt;
|Module generates Peppol XML / BIS Billing format invoices &lt;br /&gt;
valid in Europe&lt;br /&gt;
|-&lt;br /&gt;
|Belgium, France  *&lt;br /&gt;
|Peppol&lt;br /&gt;
|[https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client Peppol Storecove]&lt;br /&gt;
|[https://www.storecove.com Storecove]&lt;br /&gt;
|*Citation needed for supported countries &lt;br /&gt;
except France and Belgium&lt;br /&gt;
|-&lt;br /&gt;
|Colombia&lt;br /&gt;
|UBL 2.1&lt;br /&gt;
|[https://www.dolistore.com/product.php?id=1205&amp;amp;title=factura-electronica-colombia-dian&amp;amp;l=en Factura Electronica Colombia DIAN]&lt;br /&gt;
|&lt;br /&gt;
|Not enough feedback to know it this module is still valid.&lt;br /&gt;
|-&lt;br /&gt;
|Colombia&lt;br /&gt;
|UBL 2.1&lt;br /&gt;
|https://nortserver.com/dolibarr.php&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|France, Germany&lt;br /&gt;
|FacturX&lt;br /&gt;
|[https://www.dolistore.com/product.php?title=FacturX---Facture---lectronique--Chorus----&amp;amp;extid=1511# FacturX]&lt;br /&gt;
|&lt;br /&gt;
|This module, or a modified or Dolibarrized version of the module&lt;br /&gt;
will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
|-&lt;br /&gt;
|France&lt;br /&gt;
|&lt;br /&gt;
|[https://www.dolistore.com/product.php?title=Chorus-Pro&amp;amp;extid=1184# Demat 4 Dolibarr]&lt;br /&gt;
|Chorus-Pro&lt;br /&gt;
|The module requires a subscription to be operational&lt;br /&gt;
|-&lt;br /&gt;
|Greece&lt;br /&gt;
|&lt;br /&gt;
|[https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19 Dolibarr-mydata]&lt;br /&gt;
|myDATA&lt;br /&gt;
|VAT Real-Time Reporting only&lt;br /&gt;
|-&lt;br /&gt;
|Italy&lt;br /&gt;
|FatturaPA&lt;br /&gt;
|[https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html Fatturazione elettronica &amp;amp; Professionisti Smart]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Italy&lt;br /&gt;
|FatturaPA&lt;br /&gt;
|[https://doliplatform.com/fatturazione-elettronica/ Fatture Elettroniche ITA]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Mexico&lt;br /&gt;
|CFDI XML&lt;br /&gt;
|[https://github.com/avadnc/cfdixml cfdixml]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Mexico&lt;br /&gt;
|CFDI XML&lt;br /&gt;
|[https://www.dolistore.com/product.php?id=354&amp;amp;title=mexico-cfdi# Mexico CFDI]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Spain&lt;br /&gt;
|FacturaE&lt;br /&gt;
|[https://www.2byte.es/index.php/productos/modulo-2facturae 2FacturaE]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Spain&lt;br /&gt;
|&lt;br /&gt;
|[https://dolifactu.es/producto/modulo-antifraude-dolibarr/ VeriFactu]&lt;br /&gt;
|VeriFactu&lt;br /&gt;
|For compliance with the Spanish Anti fraud Law&lt;br /&gt;
|-&lt;br /&gt;
|Spain&lt;br /&gt;
|&lt;br /&gt;
|[https://www.dolistore.com/product.php?title=Ley-antifraude-y-VeriFactu&amp;amp;extid=2259# Ley antifraude]&lt;br /&gt;
|VeriFactu&lt;br /&gt;
|For compliance with the Spanish Anti fraud Law&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Colombia=&lt;br /&gt;
==Format==&lt;br /&gt;
UBL V2.1&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
An old module is available here: https://www.dolistore.com/product.php?id=1205&amp;amp;title=factura-electronica-colombia-dian&amp;amp;l=en&lt;br /&gt;
We have not got enough feedback to know it this module is still valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Croatia=&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
There are no current Business-to-Business (B2B) or Business-to-Consumer (B2C) eInvoicing mandates. However, a B2B mandate is under public consultation and is expected to take effect on 1 January 2026. Near real-time reporting is expected to begin in 2026.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Croatia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Denmark=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3.0 and OIOUBL 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
No mandate for B2B einvoicing yet, but under the 2022 Bookkeeping Act, businesses must ensure their systems are capable of sending and receiving eInvoices, including through Peppol and NemHandel&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Denmark&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Estonia=&lt;br /&gt;
&lt;br /&gt;
===Format===&lt;br /&gt;
Peppol &lt;br /&gt;
&lt;br /&gt;
===Timeline===&lt;br /&gt;
Since 1 July 2025 all accounting entities registered as e-invoice recipients in the commercial register are entitled to receive e-invoices by default.&lt;br /&gt;
&lt;br /&gt;
===Legislation and current status===&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Estonia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Finland=&lt;br /&gt;
==Format==&lt;br /&gt;
UBL 2.1 and Cross-Industry Invoice (CII)&amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt; or national formats such as Finvoice 3.0 and TEAPPSXML 3.0 (provided their compliance with the European Standard) or Peppol BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
However, under the eInvoicing Act 241/2019, companies with an annual turnover exceeding EUR 10,000 are entitled to request EN-compliant eInvoices from their suppliers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Legislation and current status&lt;br /&gt;
&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Finland&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Partial&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factum-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually onto this platform, or to use a third-party service for submission directly from Dolibarr, for example by using:&lt;br /&gt;
&lt;br /&gt;
*The [[Module Chorus|Chorus Pro Module]] - Subscription from EasyaSolution.&lt;br /&gt;
*The EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
*To develop your own code to interface with Chorus, there is a small tuto on the french forum: https://www.dolibarr.fr/forum/t/connexion-api-chorus-pro-environnement-de-test-qualif/46738&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
*Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
*Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing: From 1/7/2025 all companies are required to issue and receive their invoices in electronic format&lt;br /&gt;
&lt;br /&gt;
Digital delivery note: From 1/4/2025 for companies with a turnover exceeding 200000€ and from 1/10/2025 compulsory for all legal entities&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Ireland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
No Business-to-Government (B2G) eInvoicing mandate exists, but since June 2019, all public sector entities are required to receive and process structured eInvoices compliant with the European standard (EN 16931)&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Ireland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2019, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*https://www.fatturapa.gov.it/en/index.html&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Latvia=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing starting from 2028&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Latvia*&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Lithuania=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
mandatory eInvoicing targeted for 1 January 2028.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Lithuania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
CFDI XML&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Norway=&lt;br /&gt;
==Format==&lt;br /&gt;
EHF/Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Norway&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Poland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
Poland plans to make business-to-business (B2B) e-Invoicing mandatory from 2026.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Poland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Portugal=&lt;br /&gt;
==Format==&lt;br /&gt;
OASIS UBL CIUS-PT and CEFACT CII CIUS-PT&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Portugal&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Romania=&lt;br /&gt;
==Format==&lt;br /&gt;
RO_CIUS  ensuring alignment with the broader European e-invoicing standard EN 16931.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Romania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Slovakia=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3&lt;br /&gt;
==Timeline==&lt;br /&gt;
Slovakia intends to introduce the mandatory B2B e-invoicing. Based on the mandatory e-invoicing, there will be on-line electronic reporting from January 2027, for domestic transactions (transactions with the place of supply within the territory of the Slovakia) and for taxable persons established in Slovakia. Cross-border B2B reporting (for intra EU transactions), based on e-invoicing, is going to be introduced from 1 July 2030.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovakia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Slovenia=&lt;br /&gt;
==Format==&lt;br /&gt;
The national e-SLOG standard (version 2.0) is compliant with the EN 16931.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovenia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Spain (FacturaE - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain is called FacturaE (European standard EN 16931). VeriFactu is the system and network to send and validate invoices.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
B2B: The Law 18/2022 amendment mandates that all B2B transactions must be conducted using eInvoices. Businesses with annual revenues of EUR 8 million or more must comply within one year, while others have a two-year compliance period but it has not been officially issued yet.&lt;br /&gt;
&lt;br /&gt;
Effective on 1 January 2026, the VERIFACTU system will become mandatory for all companies that are not subject to the SII Reporting mandate. This will require these companies to use certified accounting software and obtain invoice clearance for all their transactions.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Sweden=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Sweden&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The &amp;quot;red payment slip&amp;quot; (called BV) and an &amp;quot;orange payment slip&amp;quot; (called BVR) is no more required after 2022.&lt;br /&gt;
&lt;br /&gt;
QR-Bill is expected for PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer since the 20th june 2020.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To obtain such a section:&lt;br /&gt;
&lt;br /&gt;
*You can install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html&lt;br /&gt;
*The other option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but the installation of an external PHP library will be requested at the first generation of the PDF.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=United Kingdom=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed).&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed).&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Other / Resources=&lt;br /&gt;
More resources can be found: https://www.tx2.fr/en/2024/01/15/electronic-invoicing-europe-regulations-obligations/&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63812</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63812"/>
		<updated>2025-08-05T17:53:17Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* Dolibarr support */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
&amp;lt;seo metak=&amp;quot;einvoice, ereporting&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page presents a description of the rules and solutions for electronic invoicing (&#039;&#039;&#039;e-invoicing, e-billing&#039;&#039;&#039;) and &#039;&#039;&#039;VAT Real-Time Reporting&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions to read, generate and/or send e-invoice depends on your country...so you must you MUST check with your Accountant / book keeper or your laywer that following solutions comply with local laws and business needs.&lt;br /&gt;
&lt;br /&gt;
If your country is not in this list feel free to &lt;br /&gt;
&lt;br /&gt;
*add relevant information&lt;br /&gt;
*test or ask for support from following module developers&lt;br /&gt;
&lt;br /&gt;
*develop your own interface module and publish it on any git source repository or packaged as a zip (for the price of your choice) on dolistore.com or&lt;br /&gt;
&lt;br /&gt;
*clone any of the free solutions develop your own interface&lt;br /&gt;
&lt;br /&gt;
===Dolibarr support===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable mw-collapsible&amp;quot;&lt;br /&gt;
!Country&lt;br /&gt;
!Format&lt;br /&gt;
!Module&lt;br /&gt;
!Peppol access point providers or country specific platforms&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|Eu countries&lt;br /&gt;
|Peppol&lt;br /&gt;
|[https://www.dolistore.com/product.php?title=Peppol-XML---facture-electronique&amp;amp;extid=1585# Peppol XML / UBL]&lt;br /&gt;
|[https://e-invoice.be/ e-invoice]&amp;lt;code&amp;gt;[https://www.scrada.be/en/ Scrada](Belgium), [https://www.iopole.com/ IOPOLE](France)&amp;lt;/code&amp;gt;&lt;br /&gt;
|Module generates Peppol XML / BIS Billing format invoices &lt;br /&gt;
valid in Europe&lt;br /&gt;
|-&lt;br /&gt;
|Belgium, France  *&lt;br /&gt;
|Peppol&lt;br /&gt;
|[https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client Peppol Storecove]&lt;br /&gt;
|[https://www.storecove.com Storecove]&lt;br /&gt;
|*Citation needed for supported countries &lt;br /&gt;
except France and Belgium&lt;br /&gt;
|-&lt;br /&gt;
|Colombia&lt;br /&gt;
|UBL 2.1&lt;br /&gt;
|[https://www.dolistore.com/product.php?id=1205&amp;amp;title=factura-electronica-colombia-dian&amp;amp;l=en Factura Electronica Colombia DIAN]&lt;br /&gt;
|&lt;br /&gt;
|Not enough feedback to know it this module is still valid.&lt;br /&gt;
|-&lt;br /&gt;
|Colombia&lt;br /&gt;
|UBL 2.1&lt;br /&gt;
|https://nortserver.com/dolibarr.php&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|France, Germany&lt;br /&gt;
|FacturX&lt;br /&gt;
|[https://www.dolistore.com/product.php?title=FacturX---Facture---lectronique--Chorus----&amp;amp;extid=1511# FacturX]&lt;br /&gt;
|&lt;br /&gt;
|This module, or a modified or Dolibarrized version of the module&lt;br /&gt;
will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
|-&lt;br /&gt;
|France&lt;br /&gt;
|&lt;br /&gt;
|[https://www.dolistore.com/product.php?title=Chorus-Pro&amp;amp;extid=1184# Demat 4 Dolibarr]&lt;br /&gt;
|Chorus-Pro&lt;br /&gt;
|The module requires a subscription to be operational&lt;br /&gt;
|-&lt;br /&gt;
|Greece&lt;br /&gt;
|&lt;br /&gt;
|[https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19 Dolibarr-mydata]&lt;br /&gt;
|myDATA&lt;br /&gt;
|VAT Real-Time Reporting only&lt;br /&gt;
|-&lt;br /&gt;
|Italy&lt;br /&gt;
|FatturaPA&lt;br /&gt;
|[https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html Fatturazione elettronica &amp;amp; Professionisti Smart]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Italy&lt;br /&gt;
|FatturaPA&lt;br /&gt;
|[https://doliplatform.com/fatturazione-elettronica/ Fatture Elettroniche ITA]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Mexico&lt;br /&gt;
|CFDI XML&lt;br /&gt;
|[https://github.com/avadnc/cfdixml cfdixml]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Mexico&lt;br /&gt;
|CFDI XML&lt;br /&gt;
|[https://www.dolistore.com/product.php?id=354&amp;amp;title=mexico-cfdi# Mexico CFDI]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Spain&lt;br /&gt;
|FacturaE&lt;br /&gt;
|[https://www.2byte.es/index.php/productos/modulo-2facturae 2FacturaE]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Spain&lt;br /&gt;
|&lt;br /&gt;
|[https://dolifactu.es/producto/modulo-antifraude-dolibarr/ VeriFactu]&lt;br /&gt;
|VeriFactu&lt;br /&gt;
|For compliance with the Spanish Anti fraud Law&lt;br /&gt;
|-&lt;br /&gt;
|Spain&lt;br /&gt;
|&lt;br /&gt;
|[https://www.dolistore.com/product.php?title=Ley-antifraude-y-VeriFactu&amp;amp;extid=2259# Ley antifraude]&lt;br /&gt;
|VeriFactu&lt;br /&gt;
|For compliance with the Spanish Anti fraud Law&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Colombia=&lt;br /&gt;
==Format==&lt;br /&gt;
UBL V2.1&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
An old module is available here: https://www.dolistore.com/product.php?id=1205&amp;amp;title=factura-electronica-colombia-dian&amp;amp;l=en&lt;br /&gt;
We have not got enough feedback to know it this module is still valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Croatia=&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
There are no current Business-to-Business (B2B) or Business-to-Consumer (B2C) eInvoicing mandates. However, a B2B mandate is under public consultation and is expected to take effect on 1 January 2026. Near real-time reporting is expected to begin in 2026.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Croatia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Denmark=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3.0 and OIOUBL 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
No mandate for B2B einvoicing yet, but under the 2022 Bookkeeping Act, businesses must ensure their systems are capable of sending and receiving eInvoices, including through Peppol and NemHandel&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Denmark&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Estonia=&lt;br /&gt;
&lt;br /&gt;
===Format===&lt;br /&gt;
Peppol &lt;br /&gt;
&lt;br /&gt;
===Timeline===&lt;br /&gt;
Since 1 July 2025 all accounting entities registered as e-invoice recipients in the commercial register are entitled to receive e-invoices by default.&lt;br /&gt;
&lt;br /&gt;
===Legislation and current status===&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Estonia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Finland=&lt;br /&gt;
==Format==&lt;br /&gt;
UBL 2.1 and Cross-Industry Invoice (CII)&amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt; or national formats such as Finvoice 3.0 and TEAPPSXML 3.0 (provided their compliance with the European Standard) or Peppol BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
However, under the eInvoicing Act 241/2019, companies with an annual turnover exceeding EUR 10,000 are entitled to request EN-compliant eInvoices from their suppliers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Legislation and current status&lt;br /&gt;
&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Finland&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Partial&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factum-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually onto this platform, or to use a third-party service for submission directly from Dolibarr, for example by using:&lt;br /&gt;
&lt;br /&gt;
*The [[Module Chorus|Chorus Pro Module]] - Subscription from EasyaSolution.&lt;br /&gt;
*The EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
*To develop your own code to interface with Chorus, there is a small tuto on the french forum: https://www.dolibarr.fr/forum/t/connexion-api-chorus-pro-environnement-de-test-qualif/46738&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
*Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
*Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing: From 1/7/2025 all companies are required to issue and receive their invoices in electronic format&lt;br /&gt;
&lt;br /&gt;
Digital delivery note: From 1/4/2025 for companies with a turnover exceeding 200000€ and from 1/10/2025 compulsory for all legal entities&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Ireland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
No Business-to-Government (B2G) eInvoicing mandate exists, but since June 2019, all public sector entities are required to receive and process structured eInvoices compliant with the European standard (EN 16931)&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Ireland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2019, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*https://www.fatturapa.gov.it/en/index.html&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Latvia=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing starting from 2028&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Latvia*&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Lithuania=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
mandatory eInvoicing targeted for 1 January 2028.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Lithuania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
CFDI XML&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Norway=&lt;br /&gt;
==Format==&lt;br /&gt;
EHF/Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Norway&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Poland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
Poland plans to make business-to-business (B2B) e-Invoicing mandatory from 2026.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Poland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Portugal=&lt;br /&gt;
==Format==&lt;br /&gt;
OASIS UBL CIUS-PT and CEFACT CII CIUS-PT&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Portugal&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Romania=&lt;br /&gt;
==Format==&lt;br /&gt;
RO_CIUS  ensuring alignment with the broader European e-invoicing standard EN 16931.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Romania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Slovakia=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3&lt;br /&gt;
==Timeline==&lt;br /&gt;
Slovakia intends to introduce the mandatory B2B e-invoicing. Based on the mandatory e-invoicing, there will be on-line electronic reporting from January 2027, for domestic transactions (transactions with the place of supply within the territory of the Slovakia) and for taxable persons established in Slovakia. Cross-border B2B reporting (for intra EU transactions), based on e-invoicing, is going to be introduced from 1 July 2030.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovakia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Slovenia=&lt;br /&gt;
==Format==&lt;br /&gt;
The national e-SLOG standard (version 2.0) is compliant with the EN 16931.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovenia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Spain (FacturaE - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain is called FacturaE (European standard EN 16931). VeriFactu is the system and network to send and validate invoices.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
B2B: The Law 18/2022 amendment mandates that all B2B transactions must be conducted using eInvoices. Businesses with annual revenues of EUR 8 million or more must comply within one year, while others have a two-year compliance period but it has not been officially issued yet.&lt;br /&gt;
&lt;br /&gt;
Effective on 1 January 2026, the VERIFACTU system will become mandatory for all companies that are not subject to the SII Reporting mandate. This will require these companies to use certified accounting software and obtain invoice clearance for all their transactions.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Sweden=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Sweden&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The &amp;quot;red payment slip&amp;quot; (called BV) and an &amp;quot;orange payment slip&amp;quot; (called BVR) is no more required after 2022.&lt;br /&gt;
&lt;br /&gt;
QR-Bill is expected for PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer since the 20th june 2020.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To obtain such a section:&lt;br /&gt;
&lt;br /&gt;
*You can install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html&lt;br /&gt;
*The other option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but the installation of an external PHP library will be requested at the first generation of the PDF.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=United Kingdom=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed).&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed).&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Other / Resources=&lt;br /&gt;
More resources can be found: https://www.tx2.fr/en/2024/01/15/electronic-invoicing-europe-regulations-obligations/&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63811</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63811"/>
		<updated>2025-08-05T17:51:19Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* Dolibarr support */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
&amp;lt;seo metak=&amp;quot;einvoice, ereporting&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page presents a description of the rules and solutions for electronic invoicing (&#039;&#039;&#039;e-invoicing, e-billing&#039;&#039;&#039;) and &#039;&#039;&#039;VAT Real-Time Reporting&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions to read, generate and/or send e-invoice depends on your country...so you must you MUST check with your Accountant / book keeper or your laywer that following solutions comply with local laws and business needs.&lt;br /&gt;
&lt;br /&gt;
If your country is not in this list feel free to &lt;br /&gt;
&lt;br /&gt;
*add relevant information&lt;br /&gt;
*test or ask for support from following module developers&lt;br /&gt;
&lt;br /&gt;
*develop your own interface module and publish it on any git source repository or packaged as a zip (for the price of your choice) on dolistore.com or&lt;br /&gt;
&lt;br /&gt;
*clone any of the free solutions develop your own interface&lt;br /&gt;
&lt;br /&gt;
===Dolibarr support===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable mw-collapsible&amp;quot;&lt;br /&gt;
!Country&lt;br /&gt;
!Format&lt;br /&gt;
!Module&lt;br /&gt;
!Peppol access point providers or country specific platforms&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|Eu countries&lt;br /&gt;
|Peppol&lt;br /&gt;
|[https://www.dolistore.com/product.php?title=Peppol-XML---facture-electronique&amp;amp;extid=1585# Peppol XML / UBL]&lt;br /&gt;
|[https://e-invoice.be/ e-invoice]&amp;lt;code&amp;gt;[https://www.scrada.be/en/ Scrada](Belgium), [https://www.iopole.com/ IOPOLE](France)&amp;lt;/code&amp;gt;&lt;br /&gt;
|Module generates Peppol XML / BIS Billing format invoices &lt;br /&gt;
valid in Europe&lt;br /&gt;
|-&lt;br /&gt;
|Belgium, France  *&lt;br /&gt;
|Peppol&lt;br /&gt;
|[https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client Peppol Storecove]&lt;br /&gt;
|[https://www.storecove.com Storecove]&lt;br /&gt;
|*Citation needed for supported countries &lt;br /&gt;
except France and Belgium&lt;br /&gt;
|-&lt;br /&gt;
|Colombia&lt;br /&gt;
|UBL 2.1&lt;br /&gt;
|[https://www.dolistore.com/product.php?id=1205&amp;amp;title=factura-electronica-colombia-dian&amp;amp;l=en Factura Electronica Colombia DIAN]&lt;br /&gt;
|&lt;br /&gt;
|Not got enough feedback to know it this module is still valid.&lt;br /&gt;
|-&lt;br /&gt;
|Colombia&lt;br /&gt;
|UBL 2.1&lt;br /&gt;
|https://nortserver.com/dolibarr.php&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|France, Germany&lt;br /&gt;
|FacturX&lt;br /&gt;
|[https://www.dolistore.com/product.php?title=FacturX---Facture---lectronique--Chorus----&amp;amp;extid=1511# FacturX]&lt;br /&gt;
|&lt;br /&gt;
|This module, or a modified or Dolibarrized version of the module&lt;br /&gt;
will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
|-&lt;br /&gt;
|France&lt;br /&gt;
|&lt;br /&gt;
|[https://www.dolistore.com/product.php?title=Chorus-Pro&amp;amp;extid=1184# Demat 4 Dolibarr]&lt;br /&gt;
|Chorus-Pro&lt;br /&gt;
|The module requires a subscription to be operational&lt;br /&gt;
|-&lt;br /&gt;
|Greece&lt;br /&gt;
|&lt;br /&gt;
|[https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19 Dolibarr-mydata]&lt;br /&gt;
|myDATA&lt;br /&gt;
|VAT Real-Time Reporting only&lt;br /&gt;
|-&lt;br /&gt;
|Italy&lt;br /&gt;
|FatturaPA&lt;br /&gt;
|[https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html Fatturazione elettronica &amp;amp; Professionisti Smart]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Italy&lt;br /&gt;
|FatturaPA&lt;br /&gt;
|[https://doliplatform.com/fatturazione-elettronica/ Fatture Elettroniche ITA]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Mexico&lt;br /&gt;
|CFDI XML&lt;br /&gt;
|[https://github.com/avadnc/cfdixml cfdixml]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Mexico&lt;br /&gt;
|CFDI XML&lt;br /&gt;
|[https://www.dolistore.com/product.php?id=354&amp;amp;title=mexico-cfdi# Mexico CFDI]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Spain&lt;br /&gt;
|FacturaE&lt;br /&gt;
|[https://www.2byte.es/index.php/productos/modulo-2facturae 2FacturaE]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Spain&lt;br /&gt;
|&lt;br /&gt;
|[https://dolifactu.es/producto/modulo-antifraude-dolibarr/ VeriFactu]&lt;br /&gt;
|VeriFactu&lt;br /&gt;
|compliance with the Spanish Antifraud Law&lt;br /&gt;
|-&lt;br /&gt;
|Spain&lt;br /&gt;
|&lt;br /&gt;
|[https://www.dolistore.com/product.php?title=Ley-antifraude-y-VeriFactu&amp;amp;extid=2259# Ley antifraude]&lt;br /&gt;
|VeriFactu&lt;br /&gt;
|compliance with the Spanish Antifraud Law&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Colombia=&lt;br /&gt;
==Format==&lt;br /&gt;
UBL V2.1&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
An old module is available here: https://www.dolistore.com/product.php?id=1205&amp;amp;title=factura-electronica-colombia-dian&amp;amp;l=en&lt;br /&gt;
We have not got enough feedback to know it this module is still valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Croatia=&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
There are no current Business-to-Business (B2B) or Business-to-Consumer (B2C) eInvoicing mandates. However, a B2B mandate is under public consultation and is expected to take effect on 1 January 2026. Near real-time reporting is expected to begin in 2026.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Croatia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Denmark=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3.0 and OIOUBL 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
No mandate for B2B einvoicing yet, but under the 2022 Bookkeeping Act, businesses must ensure their systems are capable of sending and receiving eInvoices, including through Peppol and NemHandel&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Denmark&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Estonia=&lt;br /&gt;
&lt;br /&gt;
===Format===&lt;br /&gt;
Peppol &lt;br /&gt;
&lt;br /&gt;
===Timeline===&lt;br /&gt;
Since 1 July 2025 all accounting entities registered as e-invoice recipients in the commercial register are entitled to receive e-invoices by default.&lt;br /&gt;
&lt;br /&gt;
===Legislation and current status===&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Estonia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Finland=&lt;br /&gt;
==Format==&lt;br /&gt;
UBL 2.1 and Cross-Industry Invoice (CII)&amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt; or national formats such as Finvoice 3.0 and TEAPPSXML 3.0 (provided their compliance with the European Standard) or Peppol BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
However, under the eInvoicing Act 241/2019, companies with an annual turnover exceeding EUR 10,000 are entitled to request EN-compliant eInvoices from their suppliers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Legislation and current status&lt;br /&gt;
&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Finland&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Partial&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factum-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually onto this platform, or to use a third-party service for submission directly from Dolibarr, for example by using:&lt;br /&gt;
&lt;br /&gt;
*The [[Module Chorus|Chorus Pro Module]] - Subscription from EasyaSolution.&lt;br /&gt;
*The EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
*To develop your own code to interface with Chorus, there is a small tuto on the french forum: https://www.dolibarr.fr/forum/t/connexion-api-chorus-pro-environnement-de-test-qualif/46738&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
*Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
*Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing: From 1/7/2025 all companies are required to issue and receive their invoices in electronic format&lt;br /&gt;
&lt;br /&gt;
Digital delivery note: From 1/4/2025 for companies with a turnover exceeding 200000€ and from 1/10/2025 compulsory for all legal entities&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Ireland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
No Business-to-Government (B2G) eInvoicing mandate exists, but since June 2019, all public sector entities are required to receive and process structured eInvoices compliant with the European standard (EN 16931)&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Ireland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2019, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*https://www.fatturapa.gov.it/en/index.html&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Latvia=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing starting from 2028&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Latvia*&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Lithuania=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
mandatory eInvoicing targeted for 1 January 2028.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Lithuania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
CFDI XML&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Norway=&lt;br /&gt;
==Format==&lt;br /&gt;
EHF/Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Norway&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Poland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
Poland plans to make business-to-business (B2B) e-Invoicing mandatory from 2026.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Poland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Portugal=&lt;br /&gt;
==Format==&lt;br /&gt;
OASIS UBL CIUS-PT and CEFACT CII CIUS-PT&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Portugal&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Romania=&lt;br /&gt;
==Format==&lt;br /&gt;
RO_CIUS  ensuring alignment with the broader European e-invoicing standard EN 16931.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Romania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Slovakia=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3&lt;br /&gt;
==Timeline==&lt;br /&gt;
Slovakia intends to introduce the mandatory B2B e-invoicing. Based on the mandatory e-invoicing, there will be on-line electronic reporting from January 2027, for domestic transactions (transactions with the place of supply within the territory of the Slovakia) and for taxable persons established in Slovakia. Cross-border B2B reporting (for intra EU transactions), based on e-invoicing, is going to be introduced from 1 July 2030.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovakia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Slovenia=&lt;br /&gt;
==Format==&lt;br /&gt;
The national e-SLOG standard (version 2.0) is compliant with the EN 16931.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovenia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Spain (FacturaE - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain is called FacturaE (European standard EN 16931). VeriFactu is the system and network to send and validate invoices.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
B2B: The Law 18/2022 amendment mandates that all B2B transactions must be conducted using eInvoices. Businesses with annual revenues of EUR 8 million or more must comply within one year, while others have a two-year compliance period but it has not been officially issued yet.&lt;br /&gt;
&lt;br /&gt;
Effective on 1 January 2026, the VERIFACTU system will become mandatory for all companies that are not subject to the SII Reporting mandate. This will require these companies to use certified accounting software and obtain invoice clearance for all their transactions.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Sweden=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Sweden&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The &amp;quot;red payment slip&amp;quot; (called BV) and an &amp;quot;orange payment slip&amp;quot; (called BVR) is no more required after 2022.&lt;br /&gt;
&lt;br /&gt;
QR-Bill is expected for PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer since the 20th june 2020.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To obtain such a section:&lt;br /&gt;
&lt;br /&gt;
*You can install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html&lt;br /&gt;
*The other option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but the installation of an external PHP library will be requested at the first generation of the PDF.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=United Kingdom=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed).&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed).&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Other / Resources=&lt;br /&gt;
More resources can be found: https://www.tx2.fr/en/2024/01/15/electronic-invoicing-europe-regulations-obligations/&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63810</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63810"/>
		<updated>2025-08-05T17:46:41Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
&amp;lt;seo metak=&amp;quot;einvoice, ereporting&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page presents a description of the rules and solutions for electronic invoicing (&#039;&#039;&#039;e-invoicing, e-billing&#039;&#039;&#039;) and &#039;&#039;&#039;VAT Real-Time Reporting&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions to read, generate and/or send e-invoice depends on your country...so you must you MUST check with your Accountant / book keeper or your laywer that following solutions comply with local laws and business needs.&lt;br /&gt;
&lt;br /&gt;
If your country is not in this list feel free to &lt;br /&gt;
&lt;br /&gt;
* add relevant information &lt;br /&gt;
* test or ask for support from following module developers&lt;br /&gt;
&lt;br /&gt;
* develop your own interface module and publish it on any git source repository or packaged as a zip (for the price of your choice) on dolistore.com or&lt;br /&gt;
&lt;br /&gt;
* clone any of the free solutions develop your own interface&lt;br /&gt;
&lt;br /&gt;
=== Dolibarr support ===&lt;br /&gt;
{| class=&amp;quot;wikitable sortable mw-collapsible&amp;quot;&lt;br /&gt;
!Country&lt;br /&gt;
!Format&lt;br /&gt;
!Module&lt;br /&gt;
!Peppol access point providers or country specific platforms&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|Peppol&lt;br /&gt;
|[https://www.dolistore.com/product.php?title=Peppol-XML---facture-electronique&amp;amp;extid=1585# Peppol XML / UBL]&lt;br /&gt;
|[https://e-invoice.be/ e-invoice]&amp;lt;code&amp;gt;[https://www.scrada.be/en/ Scrada](Belgium), [https://www.iopole.com/ IOPOLE](France)&amp;lt;/code&amp;gt;&lt;br /&gt;
|Module generates Peppol XML / BIS Billing format invoices &lt;br /&gt;
valid in Europe&lt;br /&gt;
|-&lt;br /&gt;
|France, Belgium *&lt;br /&gt;
|Peppol&lt;br /&gt;
|[https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client Peppol Storecove]&lt;br /&gt;
|[https://www.storecove.com Storecove] &lt;br /&gt;
|*Citation needed for supported countries &lt;br /&gt;
except France and Belgium&lt;br /&gt;
|-&lt;br /&gt;
|Colombia&lt;br /&gt;
|UBL 2.1&lt;br /&gt;
|[https://www.dolistore.com/product.php?id=1205&amp;amp;title=factura-electronica-colombia-dian&amp;amp;l=en Factura Electronica Colombia DIAN]&lt;br /&gt;
|&lt;br /&gt;
|Not got enough feedback to know it this module is still valid.&lt;br /&gt;
|-&lt;br /&gt;
|Colombia&lt;br /&gt;
|UBL 2.1&lt;br /&gt;
|https://nortserver.com/dolibarr.php&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|France, Germany&lt;br /&gt;
|FacturX&lt;br /&gt;
|[https://www.dolistore.com/product.php?title=FacturX---Facture---lectronique--Chorus----&amp;amp;extid=1511# FacturX]&lt;br /&gt;
|&lt;br /&gt;
|This module, or a modified or Dolibarrized version of the module&lt;br /&gt;
will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
|-&lt;br /&gt;
|France&lt;br /&gt;
|&lt;br /&gt;
|[https://www.dolistore.com/product.php?title=Chorus-Pro&amp;amp;extid=1184# Demat 4 Dolibarr]&lt;br /&gt;
|Chorus-Pro&lt;br /&gt;
|The module requires a subscription to be operational&lt;br /&gt;
|-&lt;br /&gt;
|Greece&lt;br /&gt;
|&lt;br /&gt;
|[https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19 Dolibarr-mydata]&lt;br /&gt;
|myDATA&lt;br /&gt;
|VAT Real-Time Reporting only&lt;br /&gt;
|-&lt;br /&gt;
|Italy&lt;br /&gt;
|FatturaPA&lt;br /&gt;
|[https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html Fatturazione elettronica &amp;amp; Professionisti Smart]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Italy&lt;br /&gt;
|FatturaPA&lt;br /&gt;
|[https://doliplatform.com/fatturazione-elettronica/ Fatture Elettroniche ITA]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Mexico&lt;br /&gt;
|CFDI XML&lt;br /&gt;
|[https://github.com/avadnc/cfdixml cfdixml]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Mexico&lt;br /&gt;
|CFDI XML&lt;br /&gt;
|[https://www.dolistore.com/product.php?id=354&amp;amp;title=mexico-cfdi# Mexico CFDI]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Spain&lt;br /&gt;
|FacturaE&lt;br /&gt;
|[https://www.2byte.es/index.php/productos/modulo-2facturae 2FacturaE]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Spain&lt;br /&gt;
|&lt;br /&gt;
|[https://dolifactu.es/producto/modulo-antifraude-dolibarr/ VeriFactu]&lt;br /&gt;
|VeriFactu&lt;br /&gt;
|compliance with the Spanish Antifraud Law&lt;br /&gt;
|-&lt;br /&gt;
|Spain&lt;br /&gt;
|&lt;br /&gt;
|[https://www.dolistore.com/product.php?title=Ley-antifraude-y-VeriFactu&amp;amp;extid=2259# Ley antifraude]&lt;br /&gt;
|VeriFactu&lt;br /&gt;
|compliance with the Spanish Antifraud Law&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Colombia=&lt;br /&gt;
==Format==&lt;br /&gt;
UBL V2.1&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
An old module is available here: https://www.dolistore.com/product.php?id=1205&amp;amp;title=factura-electronica-colombia-dian&amp;amp;l=en&lt;br /&gt;
We have not got enough feedback to know it this module is still valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Croatia=&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
There are no current Business-to-Business (B2B) or Business-to-Consumer (B2C) eInvoicing mandates. However, a B2B mandate is under public consultation and is expected to take effect on 1 January 2026. Near real-time reporting is expected to begin in 2026.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Croatia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Denmark=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3.0 and OIOUBL 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
No mandate for B2B einvoicing yet, but under the 2022 Bookkeeping Act, businesses must ensure their systems are capable of sending and receiving eInvoices, including through Peppol and NemHandel&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Denmark&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Estonia=&lt;br /&gt;
&lt;br /&gt;
===Format===&lt;br /&gt;
Peppol &lt;br /&gt;
&lt;br /&gt;
===Timeline===&lt;br /&gt;
Since 1 July 2025 all accounting entities registered as e-invoice recipients in the commercial register are entitled to receive e-invoices by default.&lt;br /&gt;
&lt;br /&gt;
===Legislation and current status===&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Estonia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Finland=&lt;br /&gt;
==Format==&lt;br /&gt;
UBL 2.1 and Cross-Industry Invoice (CII)&amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt; or national formats such as Finvoice 3.0 and TEAPPSXML 3.0 (provided their compliance with the European Standard) or Peppol BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
However, under the eInvoicing Act 241/2019, companies with an annual turnover exceeding EUR 10,000 are entitled to request EN-compliant eInvoices from their suppliers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Legislation and current status&lt;br /&gt;
&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Finland&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Partial&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factum-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually onto this platform, or to use a third-party service for submission directly from Dolibarr, for example by using:&lt;br /&gt;
&lt;br /&gt;
*The [[Module Chorus|Chorus Pro Module]] - Subscription from EasyaSolution.&lt;br /&gt;
*The EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
*To develop your own code to interface with Chorus, there is a small tuto on the french forum: https://www.dolibarr.fr/forum/t/connexion-api-chorus-pro-environnement-de-test-qualif/46738&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
*Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
*Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing: From 1/7/2025 all companies are required to issue and receive their invoices in electronic format&lt;br /&gt;
&lt;br /&gt;
Digital delivery note: From 1/4/2025 for companies with a turnover exceeding 200000€ and from 1/10/2025 compulsory for all legal entities&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Ireland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
No Business-to-Government (B2G) eInvoicing mandate exists, but since June 2019, all public sector entities are required to receive and process structured eInvoices compliant with the European standard (EN 16931)&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Ireland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2019, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*https://www.fatturapa.gov.it/en/index.html&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Latvia=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing starting from 2028&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Latvia*&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Lithuania=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
mandatory eInvoicing targeted for 1 January 2028.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Lithuania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
CFDI XML&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Norway=&lt;br /&gt;
==Format==&lt;br /&gt;
EHF/Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Norway&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Poland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
Poland plans to make business-to-business (B2B) e-Invoicing mandatory from 2026.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Poland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Portugal=&lt;br /&gt;
==Format==&lt;br /&gt;
OASIS UBL CIUS-PT and CEFACT CII CIUS-PT&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Portugal&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Romania=&lt;br /&gt;
==Format==&lt;br /&gt;
RO_CIUS  ensuring alignment with the broader European e-invoicing standard EN 16931.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Romania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Slovakia=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3&lt;br /&gt;
==Timeline==&lt;br /&gt;
Slovakia intends to introduce the mandatory B2B e-invoicing. Based on the mandatory e-invoicing, there will be on-line electronic reporting from January 2027, for domestic transactions (transactions with the place of supply within the territory of the Slovakia) and for taxable persons established in Slovakia. Cross-border B2B reporting (for intra EU transactions), based on e-invoicing, is going to be introduced from 1 July 2030.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovakia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Slovenia=&lt;br /&gt;
==Format==&lt;br /&gt;
The national e-SLOG standard (version 2.0) is compliant with the EN 16931.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovenia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Spain (FacturaE - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain is called FacturaE (European standard EN 16931). VeriFactu is the system and network to send and validate invoices.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
B2B: The Law 18/2022 amendment mandates that all B2B transactions must be conducted using eInvoices. Businesses with annual revenues of EUR 8 million or more must comply within one year, while others have a two-year compliance period but it has not been officially issued yet.&lt;br /&gt;
&lt;br /&gt;
Effective on 1 January 2026, the VERIFACTU system will become mandatory for all companies that are not subject to the SII Reporting mandate. This will require these companies to use certified accounting software and obtain invoice clearance for all their transactions.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Sweden=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Sweden&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The &amp;quot;red payment slip&amp;quot; (called BV) and an &amp;quot;orange payment slip&amp;quot; (called BVR) is no more required after 2022.&lt;br /&gt;
&lt;br /&gt;
QR-Bill is expected for PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer since the 20th june 2020.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To obtain such a section:&lt;br /&gt;
&lt;br /&gt;
*You can install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html&lt;br /&gt;
*The other option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but the installation of an external PHP library will be requested at the first generation of the PDF.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=United Kingdom=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed).&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed).&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Other / Resources=&lt;br /&gt;
More resources can be found: https://www.tx2.fr/en/2024/01/15/electronic-invoicing-europe-regulations-obligations/&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63809</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63809"/>
		<updated>2025-08-05T13:45:48Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
&amp;lt;seo metak=&amp;quot;einvoice, ereporting&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page presents a description of the rules and solutions for electronic invoicing (&#039;&#039;&#039;e-invoicing, e-billing&#039;&#039;&#039;) and &#039;&#039;&#039;e-reporting&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions to read, generate and/or send e-invoice depend on your country...&lt;br /&gt;
&lt;br /&gt;
If your country is not in this list, feel free to develop your own interface module and publish it on any git source repository or packaged as a zip (for the price of your choice) on dolistore.com. But you can also do it as an alternative of an existing solution if a module already exists and does not match your need...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
Note: Belgium already offers a platform called Mercurius, where you can send manually classic invoice to get a Peppol invoice.&lt;br /&gt;
&lt;br /&gt;
A peppol file can be validated here: https://ecosio.com/en/peppol-and-xml-document-validator/#&lt;br /&gt;
&lt;br /&gt;
To know if a peppol file has been published on the peppol network, you can follow this tutorial:&lt;br /&gt;
https://openpeppol.atlassian.net/wiki/spaces/Belgium/pages/624689399/Ma+facture+a-t-elle+t+bien+re+ue+par+le+client+Quel+est+son+statut&lt;br /&gt;
&lt;br /&gt;
=Colombia=&lt;br /&gt;
==Format==&lt;br /&gt;
Factura Electronica Colombia DIAN&lt;br /&gt;
&lt;br /&gt;
...To complete...&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
An old module is available here: https://www.dolistore.com/product.php?id=1205&amp;amp;title=factura-electronica-colombia-dian&amp;amp;l=en&lt;br /&gt;
We have not got enough feedback to know it this module is still valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Croatia=&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
There are no current Business-to-Business (B2B) or Business-to-Consumer (B2C) eInvoicing mandates. However, a B2B mandate is under public consultation and is expected to take effect on 1 January 2026. Near real-time reporting is expected to begin in 2026.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Croatia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Denmark=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3.0 and OIOUBL 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
No mandate for B2B einvoicing yet, but under the 2022 Bookkeeping Act, businesses must ensure their systems are capable of sending and receiving eInvoices, including through Peppol and NemHandel&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Denmark&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Estonia=&lt;br /&gt;
&lt;br /&gt;
===Format===&lt;br /&gt;
Peppol &lt;br /&gt;
&lt;br /&gt;
===Timeline===&lt;br /&gt;
Since 1 July 2025 all accounting entities registered as e-invoice recipients in the commercial register are entitled to receive e-invoices by default.&lt;br /&gt;
&lt;br /&gt;
===Dolibarr support===&lt;br /&gt;
To generate invoices in this format, you may need to install the module: &amp;lt;nowiki&amp;gt;https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: &amp;lt;nowiki&amp;gt;https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client&amp;lt;/nowiki&amp;gt; (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
===Legislation and current status===&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Estonia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Finland=&lt;br /&gt;
==Format==&lt;br /&gt;
UBL 2.1 and Cross-Industry Invoice (CII)&amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt; or national formats such as Finvoice 3.0 and TEAPPSXML 3.0 (provided their compliance with the European Standard) or Peppol BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
However, under the eInvoicing Act 241/2019, companies with an annual turnover exceeding EUR 10,000 are entitled to request EN-compliant eInvoices from their suppliers.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Legislation and current status&lt;br /&gt;
&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Finland&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Partial&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factur-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually onto this platform, or to use a third-party service for submission directly from Dolibarr, for example by using:&lt;br /&gt;
&lt;br /&gt;
*The [[Module Chorus|Chorus Pro Module]] - Subscription from EasyaSolution.&lt;br /&gt;
*The EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
*To develop your own code to interface with Chorus, there is a small tuto on the french forum: https://www.dolibarr.fr/forum/t/connexion-api-chorus-pro-environnement-de-test-qualif/46738&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
*Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
*Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing: From 1/7/2025 all companies are required to issue and receive their invoices in electronic format&lt;br /&gt;
&lt;br /&gt;
Digital delivery note: From 1/4/2025 for companies with a turnover exceeding 200000€ and from 1/10/2025 compulsory for all legal entities&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
E-reporting is implemented by Independent Authority for Public Revenue (IAPR) MyDATA platform&lt;br /&gt;
&lt;br /&gt;
*For Dolibarr versions 13.0.0 - 18.0.4 download *https://github.com/evansgl/dolibarr-mydata/releases/tag/1.8&lt;br /&gt;
*For Dolibarr versions 19.0.0+ use &amp;quot;dolibarr-19 branch&amp;quot; *https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Ireland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
No Business-to-Government (B2G) eInvoicing mandate exists, but since June 2019, all public sector entities are required to receive and process structured eInvoices compliant with the European standard (EN 16931)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Ireland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2019, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
There are two solutions:&lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;Fatturazione elettronica &amp;amp; Professionisti Smart&amp;quot; module: https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html&lt;br /&gt;
*The &amp;quot;Fatture Elettroniche ITA&amp;quot; module available from the site https://doliplatform.com/fatturazione-elettronica/ (Italian Dolibarr Preferred Partner Diciannove Soc. Coop. )&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*https://www.fatturapa.gov.it/en/index.html&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Latvia=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing starting from 2028&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Latvia*&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Lithuania=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
mandatory eInvoicing targeted for 1 January 2028.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Lithuania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
While there&#039;s no specific mention of Dolibarr support for Luxembourg e-invoicing, users can likely use the Peppol XML module available for other countries:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
CFDI XML&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Mexican electronic format, you need to install a CFDI XML module.&lt;br /&gt;
&lt;br /&gt;
*Sources of such a module are available here: https://github.com/avadnc/cfdixml&lt;br /&gt;
&lt;br /&gt;
*You can find a ready to deploy module file here: https://www.dolistore.com/product.php?id=354&amp;amp;title=mexico-cfdi&amp;amp;l=fr&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Norway=&lt;br /&gt;
==Format==&lt;br /&gt;
EHF/Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Norway&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Poland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
Poland plans to make business-to-business (B2B) e-Invoicing mandatory from 2026.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Poland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Portugal=&lt;br /&gt;
==Format==&lt;br /&gt;
OASIS UBL CIUS-PT and CEFACT CII CIUS-PT&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Portugal&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Romania=&lt;br /&gt;
==Format==&lt;br /&gt;
RO_CIUS  ensuring alignment with the broader European e-invoicing standard EN 16931.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Romania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Slovakia=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3&lt;br /&gt;
==Timeline==&lt;br /&gt;
Slovakia intends to introduce the mandatory B2B e-invoicing. Based on the mandatory e-invoicing, there will be on-line electronic reporting from January 2027, for domestic transactions (transactions with the place of supply within the territory of the Slovakia) and for taxable persons established in Slovakia. Cross-border B2B reporting (for intra EU transactions), based on e-invoicing, is going to be introduced from 1 July 2030.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovakia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Slovenia=&lt;br /&gt;
==Format==&lt;br /&gt;
The national e-SLOG standard (version 2.0) is compliant with the EN 16931.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovenia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Spain (FacturaE - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain is called FacturaE (European standard EN 16931). VeriFactu is the system and network to send and validate invoices.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
B2B: The Law 18/2022 amendment mandates that all B2B transactions must be conducted using eInvoices. Businesses with annual revenues of EUR 8 million or more must comply within one year, while others have a two-year compliance period but it has not been officially issued yet.&lt;br /&gt;
&lt;br /&gt;
Effective on 1 January 2026, the VERIFACTU system will become mandatory for all companies that are not subject to the SII Reporting mandate. This will require these companies to use certified accounting software and obtain invoice clearance for all their transactions.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
One of the following module is required:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module DoliFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A module called 2FacturaE exists to generated invoices using the invoice in the format expected (https://www.2byte.es/index.php/productos/modulo-2facturae). It was enough for spain.&lt;br /&gt;
&lt;br /&gt;
But this is no more true: In 2025, you must also now have a software that keep tracking of recording payment and invoices into an unalterable way.&lt;br /&gt;
For this you need now the module DoliFactu (https://dolifactu.es/producto/modulo-antifraude-dolibarr/).&lt;br /&gt;
&lt;br /&gt;
Note also that there is also a ready to use hosting service called DoliFactu.es that includes this module by default in its offer.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module LeyAntiFraudeYVeriFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Another solution to be ready and compliant with the VeryFactu system is to install the external module called &amp;quot;Ley antifraude y VeriFactu&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can get the module here: https://www.dolistore.com/fr/modules/2259-Ley-antifraude-y-VeriFactu.html?search_query=verifactu&amp;amp;results=1&lt;br /&gt;
&lt;br /&gt;
Note: As the law is evolving frequently and may depends on your business, you MUST check with your book keeper or your laywer that this suits completely the law and the need of your own business.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Sweden=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Sweden&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The &amp;quot;red payment slip&amp;quot; (called BV) and an &amp;quot;orange payment slip&amp;quot; (called BVR) is no more required after 2022.&lt;br /&gt;
&lt;br /&gt;
QR-Bill is expected for PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer since the 20th june 2020.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To obtain such a section:&lt;br /&gt;
&lt;br /&gt;
*You can install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html&lt;br /&gt;
*The other option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but the installation of an external PHP library will be requested at the first generation of the PDF.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=United Kingdom=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed).&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed).&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Other / Resources=&lt;br /&gt;
More resources can be found: https://www.tx2.fr/en/2024/01/15/electronic-invoicing-europe-regulations-obligations/&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63808</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63808"/>
		<updated>2025-08-05T13:42:23Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* Format */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
&amp;lt;seo metak=&amp;quot;einvoice, ereporting&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page presents a description of the rules and solutions for electronic invoicing (&#039;&#039;&#039;e-invoicing, e-billing&#039;&#039;&#039;) and &#039;&#039;&#039;e-reporting&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions to read, generate and/or send e-invoice depend on your country...&lt;br /&gt;
&lt;br /&gt;
If your country is not in this list, fee free to develop your own interface module and publish it on any git source repository or packaged as a zip (for the price of your choice) on dolistore.com. But you can also do it as an laternative of an exsiting solution if a module already exists and does not match your need...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
Note: Belgium already offers a platform called Mercurius, where you can send manually classic invoice to get a Peppol invoice.&lt;br /&gt;
&lt;br /&gt;
A peppol file can be validated here: https://ecosio.com/en/peppol-and-xml-document-validator/#&lt;br /&gt;
&lt;br /&gt;
To know if a peppol file has been published on the peppol network, you can follow this tutorial:&lt;br /&gt;
https://openpeppol.atlassian.net/wiki/spaces/Belgium/pages/624689399/Ma+facture+a-t-elle+t+bien+re+ue+par+le+client+Quel+est+son+statut&lt;br /&gt;
&lt;br /&gt;
=Colombia=&lt;br /&gt;
==Format==&lt;br /&gt;
Factura Electronica Colombia DIAN&lt;br /&gt;
&lt;br /&gt;
...To complete...&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
An old module is available here: https://www.dolistore.com/product.php?id=1205&amp;amp;title=factura-electronica-colombia-dian&amp;amp;l=en&lt;br /&gt;
We have not got enough feedback to know it this module is still valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Croatia=&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
There are no current Business-to-Business (B2B) or Business-to-Consumer (B2C) eInvoicing mandates. However, a B2B mandate is under public consultation and is expected to take effect on 1 January 2026. Near real-time reporting is expected to begin in 2026.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Croatia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Denmark=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3.0 and OIOUBL 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
No mandate for B2B einvoicing yet, but under the 2022 Bookkeeping Act, businesses must ensure their systems are capable of sending and receiving eInvoices, including through Peppol and NemHandel&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Denmark&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Estonia=&lt;br /&gt;
&lt;br /&gt;
===Format===&lt;br /&gt;
Peppol &lt;br /&gt;
&lt;br /&gt;
===Timeline===&lt;br /&gt;
Since 1 July 2025 all accounting entities registered as e-invoice recipients in the commercial register are entitled to receive e-invoices by default.&lt;br /&gt;
&lt;br /&gt;
===Dolibarr support===&lt;br /&gt;
To generate invoices in this format, you may need to install the module: &amp;lt;nowiki&amp;gt;https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: &amp;lt;nowiki&amp;gt;https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client&amp;lt;/nowiki&amp;gt; (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
===Legislation and current status===&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Estonia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Finland=&lt;br /&gt;
==Format==&lt;br /&gt;
UBL 2.1 and Cross-Industry Invoice (CII)&amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt; or national formats such as Finvoice 3.0 and TEAPPSXML 3.0 (provided their compliance with the European Standard) or Peppol BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
However, under the eInvoicing Act 241/2019, companies with an annual turnover exceeding EUR 10,000 are entitled to request EN-compliant eInvoices from their suppliers.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Legislation and current status&lt;br /&gt;
&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Finland&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Partial&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factur-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually onto this platform, or to use a third-party service for submission directly from Dolibarr, for example by using:&lt;br /&gt;
&lt;br /&gt;
*The [[Module Chorus|Chorus Pro Module]] - Subscription from EasyaSolution.&lt;br /&gt;
*The EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
*To develop your own code to interface with Chorus, there is a small tuto on the french forum: https://www.dolibarr.fr/forum/t/connexion-api-chorus-pro-environnement-de-test-qualif/46738&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
*Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
*Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing: From 1/7/2025 all companies are required to issue and receive their invoices in electronic format&lt;br /&gt;
&lt;br /&gt;
Digital delivery note: From 1/4/2025 for companies with a turnover exceeding 200000€ and from 1/10/2025 compulsory for all legal entities&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
E-reporting is implemented by Independent Authority for Public Revenue (IAPR) MyDATA platform&lt;br /&gt;
&lt;br /&gt;
*For Dolibarr versions 13.0.0 - 18.0.4 download *https://github.com/evansgl/dolibarr-mydata/releases/tag/1.8&lt;br /&gt;
*For Dolibarr versions 19.0.0+ use &amp;quot;dolibarr-19 branch&amp;quot; *https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Ireland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
No Business-to-Government (B2G) eInvoicing mandate exists, but since June 2019, all public sector entities are required to receive and process structured eInvoices compliant with the European standard (EN 16931)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Ireland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2019, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
There are two solutions:&lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;Fatturazione elettronica &amp;amp; Professionisti Smart&amp;quot; module: https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html&lt;br /&gt;
*The &amp;quot;Fatture Elettroniche ITA&amp;quot; module available from the site https://doliplatform.com/fatturazione-elettronica/ (Italian Dolibarr Preferred Partner Diciannove Soc. Coop. )&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*https://www.fatturapa.gov.it/en/index.html&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Latvia=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing starting from 2028&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Latvia*&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Lithuania=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
mandatory eInvoicing targeted for 1 January 2028.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Lithuania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
While there&#039;s no specific mention of Dolibarr support for Luxembourg e-invoicing, users can likely use the Peppol XML module available for other countries:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
CFDI XML&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Mexican electronic format, you need to install a CFDI XML module.&lt;br /&gt;
&lt;br /&gt;
*Sources of such a module are available here: https://github.com/avadnc/cfdixml&lt;br /&gt;
&lt;br /&gt;
*You can find a ready to deploy module file here: https://www.dolistore.com/product.php?id=354&amp;amp;title=mexico-cfdi&amp;amp;l=fr&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Norway=&lt;br /&gt;
==Format==&lt;br /&gt;
EHF/Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Norway&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Poland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
Poland plans to make business-to-business (B2B) e-Invoicing mandatory from 2026.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Poland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Portugal=&lt;br /&gt;
==Format==&lt;br /&gt;
OASIS UBL CIUS-PT and CEFACT CII CIUS-PT&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Portugal&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Romania=&lt;br /&gt;
==Format==&lt;br /&gt;
RO_CIUS  ensuring alignment with the broader European e-invoicing standard EN 16931.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Romania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Slovakia=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3&lt;br /&gt;
==Timeline==&lt;br /&gt;
Slovakia intends to introduce the mandatory B2B e-invoicing. Based on the mandatory e-invoicing, there will be on-line electronic reporting from January 2027, for domestic transactions (transactions with the place of supply within the territory of the Slovakia) and for taxable persons established in Slovakia. Cross-border B2B reporting (for intra EU transactions), based on e-invoicing, is going to be introduced from 1 July 2030.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovakia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Slovenia=&lt;br /&gt;
==Format==&lt;br /&gt;
The national e-SLOG standard (version 2.0) is compliant with the EN 16931.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovenia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Spain (FacturaE - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain is called FacturaE (European standard EN 16931). VeriFactu is the system and network to send and validate invoices.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
B2B: The Law 18/2022 amendment mandates that all B2B transactions must be conducted using eInvoices. Businesses with annual revenues of EUR 8 million or more must comply within one year, while others have a two-year compliance period but it has not been officially issued yet.&lt;br /&gt;
&lt;br /&gt;
Effective on 1 January 2026, the VERIFACTU system will become mandatory for all companies that are not subject to the SII Reporting mandate. This will require these companies to use certified accounting software and obtain invoice clearance for all their transactions.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
One of the following module is required:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module DoliFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A module called 2FacturaE exists to generated invoices using the invoice in the format expected (https://www.2byte.es/index.php/productos/modulo-2facturae). It was enough for spain.&lt;br /&gt;
&lt;br /&gt;
But this is no more true: In 2025, you must also now have a software that keep tracking of recording payment and invoices into an unalterable way.&lt;br /&gt;
For this you need now the module DoliFactu (https://dolifactu.es/producto/modulo-antifraude-dolibarr/).&lt;br /&gt;
&lt;br /&gt;
Note also that there is also a ready to use hosting service called DoliFactu.es that includes this module by default in its offer.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module LeyAntiFraudeYVeriFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Another solution to be ready and compliant with the VeryFactu system is to install the external module called &amp;quot;Ley antifraude y VeriFactu&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can get the module here: https://www.dolistore.com/fr/modules/2259-Ley-antifraude-y-VeriFactu.html?search_query=verifactu&amp;amp;results=1&lt;br /&gt;
&lt;br /&gt;
Note: As the law is evolving frequently and may depends on your business, you MUST check with your book keeper or your laywer that this suits completely the law and the need of your own business.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Sweden=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Sweden&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The &amp;quot;red payment slip&amp;quot; (called BV) and an &amp;quot;orange payment slip&amp;quot; (called BVR) is no more required after 2022.&lt;br /&gt;
&lt;br /&gt;
QR-Bill is expected for PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer since the 20th june 2020.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To obtain such a section:&lt;br /&gt;
&lt;br /&gt;
*You can install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html&lt;br /&gt;
*The other option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but the installation of an external PHP library will be requested at the first generation of the PDF.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=United Kingdom=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed).&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed).&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Other / Resources=&lt;br /&gt;
More resources can be found: https://www.tx2.fr/en/2024/01/15/electronic-invoicing-europe-regulations-obligations/&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63807</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63807"/>
		<updated>2025-08-05T13:41:41Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* Format */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
&amp;lt;seo metak=&amp;quot;einvoice, ereporting&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page presents a description of the rules and solutions for electronic invoicing (&#039;&#039;&#039;e-invoicing, e-billing&#039;&#039;&#039;) and &#039;&#039;&#039;e-reporting&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions to read, generate and/or send e-invoice depend on your country...&lt;br /&gt;
&lt;br /&gt;
If your country is not in this list, fee free to develop your own interface module and publish it on any git source repository or packaged as a zip (for the price of your choice) on dolistore.com. But you can also do it as an laternative of an exsiting solution if a module already exists and does not match your need...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
Note: Belgium already offers a platform called Mercurius, where you can send manually classic invoice to get a Peppol invoice.&lt;br /&gt;
&lt;br /&gt;
A peppol file can be validated here: https://ecosio.com/en/peppol-and-xml-document-validator/#&lt;br /&gt;
&lt;br /&gt;
To know if a peppol file has been published on the peppol network, you can follow this tutorial:&lt;br /&gt;
https://openpeppol.atlassian.net/wiki/spaces/Belgium/pages/624689399/Ma+facture+a-t-elle+t+bien+re+ue+par+le+client+Quel+est+son+statut&lt;br /&gt;
&lt;br /&gt;
=Colombia=&lt;br /&gt;
==Format==&lt;br /&gt;
Factura Electronica Colombia DIAN&lt;br /&gt;
&lt;br /&gt;
...To complete...&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
An old module is available here: https://www.dolistore.com/product.php?id=1205&amp;amp;title=factura-electronica-colombia-dian&amp;amp;l=en&lt;br /&gt;
We have not got enough feedback to know it this module is still valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Croatia=&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
There are no current Business-to-Business (B2B) or Business-to-Consumer (B2C) eInvoicing mandates. However, a B2B mandate is under public consultation and is expected to take effect on 1 January 2026. Near real-time reporting is expected to begin in 2026.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Croatia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Denmark=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3.0 and OIOUBL 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
No mandate for B2B einvoicing yet, but under the 2022 Bookkeeping Act, businesses must ensure their systems are capable of sending and receiving eInvoices, including through Peppol and NemHandel&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Denmark&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Estonia=&lt;br /&gt;
&lt;br /&gt;
===Format===&lt;br /&gt;
Peppol &lt;br /&gt;
&lt;br /&gt;
===Timeline===&lt;br /&gt;
Since 1 July 2025 all accounting entities registered as e-invoice recipients in the commercial register are entitled to receive e-invoices by default.&lt;br /&gt;
&lt;br /&gt;
===Dolibarr support===&lt;br /&gt;
To generate invoices in this format, you may need to install the module: &amp;lt;nowiki&amp;gt;https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: &amp;lt;nowiki&amp;gt;https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client&amp;lt;/nowiki&amp;gt; (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
===Legislation and current status===&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Estonia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Finland=&lt;br /&gt;
==Format==&lt;br /&gt;
UBL 2.1 and Cross-Industry Invoice (CII)&amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt; or national formats such as Finvoice 3.0 and TEAPPSXML 3.0 (provided their compliance with the European Standard) or Peppol BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
However, under the eInvoicing Act 241/2019, companies with an annual turnover exceeding EUR 10,000 are entitled to request EN-compliant eInvoices from their suppliers.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Legislation and current status&lt;br /&gt;
&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Finland&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Partial&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factur-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually onto this platform, or to use a third-party service for submission directly from Dolibarr, for example by using:&lt;br /&gt;
&lt;br /&gt;
*The [[Module Chorus|Chorus Pro Module]] - Subscription from EasyaSolution.&lt;br /&gt;
*The EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
*To develop your own code to interface with Chorus, there is a small tuto on the french forum: https://www.dolibarr.fr/forum/t/connexion-api-chorus-pro-environnement-de-test-qualif/46738&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
*Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
*Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing: From 1/7/2025 all companies are required to issue and receive their invoices in electronic format&lt;br /&gt;
&lt;br /&gt;
Digital delivery note: From 1/4/2025 for companies with a turnover exceeding 200000€ and from 1/10/2025 compulsory for all legal entities&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
E-reporting is implemented by Independent Authority for Public Revenue (IAPR) MyDATA platform&lt;br /&gt;
&lt;br /&gt;
*For Dolibarr versions 13.0.0 - 18.0.4 download *https://github.com/evansgl/dolibarr-mydata/releases/tag/1.8&lt;br /&gt;
*For Dolibarr versions 19.0.0+ use &amp;quot;dolibarr-19 branch&amp;quot; *https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Ireland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
No Business-to-Government (B2G) eInvoicing mandate exists, but since June 2019, all public sector entities are required to receive and process structured eInvoices compliant with the European standard (EN 16931)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Ireland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2019, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
There are two solutions:&lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;Fatturazione elettronica &amp;amp; Professionisti Smart&amp;quot; module: https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html&lt;br /&gt;
*The &amp;quot;Fatture Elettroniche ITA&amp;quot; module available from the site https://doliplatform.com/fatturazione-elettronica/ (Italian Dolibarr Preferred Partner Diciannove Soc. Coop. )&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*https://www.fatturapa.gov.it/en/index.html&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Latvia=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing starting from 2028&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Latvia*&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Lithuania=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
mandatory eInvoicing targeted for 1 January 2028.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Lithuania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
While there&#039;s no specific mention of Dolibarr support for Luxembourg e-invoicing, users can likely use the Peppol XML module available for other countries:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
CFDI XML&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Mexican electronic format, you need to install a CFDI XML module.&lt;br /&gt;
&lt;br /&gt;
*Sources of such a module are available here: https://github.com/avadnc/cfdixml&lt;br /&gt;
&lt;br /&gt;
*You can find a ready to deploy module file here: https://www.dolistore.com/product.php?id=354&amp;amp;title=mexico-cfdi&amp;amp;l=fr&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Norway=&lt;br /&gt;
==Format==&lt;br /&gt;
EHF/Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Norway&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Poland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
Poland plans to make business-to-business (B2B) e-Invoicing mandatory from 2026.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Poland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Portugal=&lt;br /&gt;
==Format==&lt;br /&gt;
OASIS UBL CIUS-PT and CEFACT CII CIUS-PT&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Portugal&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Romania=&lt;br /&gt;
==Format==&lt;br /&gt;
RO_CIUS  ensuring alignment with the broader European e-invoicing standard EN 16931.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Romania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Slovakia=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3&lt;br /&gt;
==Timeline==&lt;br /&gt;
Slovakia intends to introduce the mandatory B2B e-invoicing. Based on the mandatory e-invoicing, there will be on-line electronic reporting from January 2027, for domestic transactions (transactions with the place of supply within the territory of the Slovakia) and for taxable persons established in Slovakia. Cross-border B2B reporting (for intra EU transactions), based on e-invoicing, is going to be introduced from 1 July 2030.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovakia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Slovenia=&lt;br /&gt;
==Format==&lt;br /&gt;
The national e-SLOG standard (version 2.0) is compliant with the EN 16931.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovenia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Spain (FacturaE - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain is called FacturaE (European standard EN 16931). VeriFactu is the system and network to send and validate invoices.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
B2B: The Law 18/2022 amendment mandates that all B2B transactions must be conducted using eInvoices. Businesses with annual revenues of EUR 8 million or more must comply within one year, while others have a two-year compliance period but it has not been officially issued yet.&lt;br /&gt;
&lt;br /&gt;
Effective on 1 January 2026, the VERIFACTU system will become mandatory for all companies that are not subject to the SII Reporting mandate. This will require these companies to use certified accounting software and obtain invoice clearance for all their transactions.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
One of the following module is required:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module DoliFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A module called 2FacturaE exists to generated invoices using the invoice in the format expected (https://www.2byte.es/index.php/productos/modulo-2facturae). It was enough for spain.&lt;br /&gt;
&lt;br /&gt;
But this is no more true: In 2025, you must also now have a software that keep tracking of recording payment and invoices into an unalterable way.&lt;br /&gt;
For this you need now the module DoliFactu (https://dolifactu.es/producto/modulo-antifraude-dolibarr/).&lt;br /&gt;
&lt;br /&gt;
Note also that there is also a ready to use hosting service called DoliFactu.es that includes this module by default in its offer.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module LeyAntiFraudeYVeriFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Another solution to be ready and compliant with the VeryFactu system is to install the external module called &amp;quot;Ley antifraude y VeriFactu&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can get the module here: https://www.dolistore.com/fr/modules/2259-Ley-antifraude-y-VeriFactu.html?search_query=verifactu&amp;amp;results=1&lt;br /&gt;
&lt;br /&gt;
Note: As the law is evolving frequently and may depends on your business, you MUST check with your book keeper or your laywer that this suits completely the law and the need of your own business.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Sweden=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Sweden&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The &amp;quot;red payment slip&amp;quot; (called BV) and an &amp;quot;orange payment slip&amp;quot; (called BVR) is no more required after 2022.&lt;br /&gt;
&lt;br /&gt;
QR-Bill is expected for PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer since the 20th june 2020.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To obtain such a section:&lt;br /&gt;
&lt;br /&gt;
*You can install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html&lt;br /&gt;
*The other option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but the installation of an external PHP library will be requested at the first generation of the PDF.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=United Kingdom=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed).&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed).&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Other / Resources=&lt;br /&gt;
More resources can be found: https://www.tx2.fr/en/2024/01/15/electronic-invoicing-europe-regulations-obligations/&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63806</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63806"/>
		<updated>2025-08-05T13:40:54Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
&amp;lt;seo metak=&amp;quot;einvoice, ereporting&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page presents a description of the rules and solutions for electronic invoicing (&#039;&#039;&#039;e-invoicing, e-billing&#039;&#039;&#039;) and &#039;&#039;&#039;e-reporting&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions to read, generate and/or send e-invoice depend on your country...&lt;br /&gt;
&lt;br /&gt;
If your country is not in this list, fee free to develop your own interface module and publish it on any git source repository or packaged as a zip (for the price of your choice) on dolistore.com. But you can also do it as an laternative of an exsiting solution if a module already exists and does not match your need...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
Note: Belgium already offers a platform called Mercurius, where you can send manually classic invoice to get a Peppol invoice.&lt;br /&gt;
&lt;br /&gt;
A peppol file can be validated here: https://ecosio.com/en/peppol-and-xml-document-validator/#&lt;br /&gt;
&lt;br /&gt;
To know if a peppol file has been published on the peppol network, you can follow this tutorial:&lt;br /&gt;
https://openpeppol.atlassian.net/wiki/spaces/Belgium/pages/624689399/Ma+facture+a-t-elle+t+bien+re+ue+par+le+client+Quel+est+son+statut&lt;br /&gt;
&lt;br /&gt;
=Colombia=&lt;br /&gt;
==Format==&lt;br /&gt;
Factura Electronica Colombia DIAN&lt;br /&gt;
&lt;br /&gt;
...To complete...&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
An old module is available here: https://www.dolistore.com/product.php?id=1205&amp;amp;title=factura-electronica-colombia-dian&amp;amp;l=en&lt;br /&gt;
We have not got enough feedback to know it this module is still valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Croatia=&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
There are no current Business-to-Business (B2B) or Business-to-Consumer (B2C) eInvoicing mandates. However, a B2B mandate is under public consultation and is expected to take effect on 1 January 2026. Near real-time reporting is expected to begin in 2026.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Croatia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Denmark=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3.0 and OIOUBL 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
No mandate for B2B einvoicing yet, but under the 2022 Bookkeeping Act, businesses must ensure their systems are capable of sending and receiving eInvoices, including through Peppol and NemHandel&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Denmark&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Estonia=&lt;br /&gt;
&lt;br /&gt;
===Format===&lt;br /&gt;
Peppol &lt;br /&gt;
&lt;br /&gt;
===Timeline===&lt;br /&gt;
Since 1 July 2025 all accounting entities registered as e-invoice recipients in the commercial register are entitled to receive e-invoices by default.&lt;br /&gt;
&lt;br /&gt;
===Dolibarr support===&lt;br /&gt;
To generate invoices in this format, you may need to install the module: &amp;lt;nowiki&amp;gt;https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: &amp;lt;nowiki&amp;gt;https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client&amp;lt;/nowiki&amp;gt; (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
===Legislation and current status===&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Estonia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Finland=&lt;br /&gt;
==Format==&lt;br /&gt;
UBL 2.1 and Cross-Industry Invoice (CII)&amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt; or national formats such as Finvoice 3.0 and TEAPPSXML 3.0 (provided their compliance with the European Standard) or Peppol BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
However, under the eInvoicing Act 241/2019, companies with an annual turnover exceeding EUR 10,000 are entitled to request EN-compliant eInvoices from their suppliers.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Legislation and current status&lt;br /&gt;
&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Finland&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Partial&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factur-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually onto this platform, or to use a third-party service for submission directly from Dolibarr, for example by using:&lt;br /&gt;
&lt;br /&gt;
*The [[Module Chorus|Chorus Pro Module]] - Subscription from EasyaSolution.&lt;br /&gt;
*The EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
*To develop your own code to interface with Chorus, there is a small tuto on the french forum: https://www.dolibarr.fr/forum/t/connexion-api-chorus-pro-environnement-de-test-qualif/46738&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
*Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
*Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing: From 1/7/2025 all companies are required to issue and receive their invoices in electronic format&lt;br /&gt;
&lt;br /&gt;
Digital delivery note: From 1/4/2025 for companies with a turnover exceeding 200000€ and from 1/10/2025 compulsory for all legal entities&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
E-reporting is implemented by Independent Authority for Public Revenue (IAPR) MyDATA platform&lt;br /&gt;
&lt;br /&gt;
*For Dolibarr versions 13.0.0 - 18.0.4 download *https://github.com/evansgl/dolibarr-mydata/releases/tag/1.8&lt;br /&gt;
*For Dolibarr versions 19.0.0+ use &amp;quot;dolibarr-19 branch&amp;quot; *https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Ireland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
No Business-to-Government (B2G) eInvoicing mandate exists, but since June 2019, all public sector entities are required to receive and process structured eInvoices compliant with the European standard (EN 16931)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Ireland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2019, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
There are two solutions:&lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;Fatturazione elettronica &amp;amp; Professionisti Smart&amp;quot; module: https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html&lt;br /&gt;
*The &amp;quot;Fatture Elettroniche ITA&amp;quot; module available from the site https://doliplatform.com/fatturazione-elettronica/ (Italian Dolibarr Preferred Partner Diciannove Soc. Coop. )&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*https://www.fatturapa.gov.it/en/index.html&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Latvia=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing starting from 2028&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Latvia*&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Lithuania=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
mandatory eInvoicing targeted for 1 January 2028.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Lithuania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
While there&#039;s no specific mention of Dolibarr support for Luxembourg e-invoicing, users can likely use the Peppol XML module available for other countries:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
CFDI XML&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Mexican electronic format, you need to install a CFDI XML module.&lt;br /&gt;
&lt;br /&gt;
*Sources of such a module are available here: https://github.com/avadnc/cfdixml&lt;br /&gt;
&lt;br /&gt;
*You can find a ready to deploy module file here: https://www.dolistore.com/product.php?id=354&amp;amp;title=mexico-cfdi&amp;amp;l=fr&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Norway=&lt;br /&gt;
==Format==&lt;br /&gt;
EHF/Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Norway&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Poland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
Poland plans to make business-to-business (B2B) e-Invoicing mandatory from 2026.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Poland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Portugal=&lt;br /&gt;
==Format==&lt;br /&gt;
OASIS UBL CIUS-PT and CEFACT CII CIUS-PT&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Portugal&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Romania=&lt;br /&gt;
==Format==&lt;br /&gt;
RO_CIUS  ensuring alignment with the broader European e-invoicing standard EN 16931.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Romania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Slovakia=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3&lt;br /&gt;
==Timeline==&lt;br /&gt;
Slovakia intends to introduce the mandatory B2B e-invoicing. Based on the mandatory e-invoicing, there will be on-line electronic reporting from January 2027, for domestic transactions (transactions with the place of supply within the territory of the Slovakia) and for taxable persons established in Slovakia. Cross-border B2B reporting (for intra EU transactions), based on e-invoicing, is going to be introduced from 1 July 2030.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovakia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Slovenia=&lt;br /&gt;
==Format==&lt;br /&gt;
The national e-SLOG standard (version 2.0) is compliant with the EN 16931.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the following module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Slovenia&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Spain (FacturaE - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain is called FacturaE (European standard EN 16931). VeriFactu is the system and network to send and validate invoices.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
B2B: The Law 18/2022 amendment mandates that all B2B transactions must be conducted using eInvoices. Businesses with annual revenues of EUR 8 million or more must comply within one year, while others have a two-year compliance period but it has not been officially issued yet&lt;br /&gt;
Effective on 1 January 2026, the VERIFACTU system will become mandatory for all companies that are not subject to the SII Reporting mandate. This will require these companies to use certified accounting software and obtain invoice clearance for all their transactions.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
One of the following module is required:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module DoliFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A module called 2FacturaE exists to generated invoices using the invoice in the format expected (https://www.2byte.es/index.php/productos/modulo-2facturae). It was enough for spain.&lt;br /&gt;
&lt;br /&gt;
But this is no more true: In 2025, you must also now have a software that keep tracking of recording payment and invoices into an unalterable way.&lt;br /&gt;
For this you need now the module DoliFactu (https://dolifactu.es/producto/modulo-antifraude-dolibarr/).&lt;br /&gt;
&lt;br /&gt;
Note also that there is also a ready to use hosting service called DoliFactu.es that includes this module by default in its offer.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module LeyAntiFraudeYVeriFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Another solution to be ready and compliant with the VeryFactu system is to install the external module called &amp;quot;Ley antifraude y VeriFactu&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can get the module here: https://www.dolistore.com/fr/modules/2259-Ley-antifraude-y-VeriFactu.html?search_query=verifactu&amp;amp;results=1&lt;br /&gt;
&lt;br /&gt;
Note: As the law is evolving frequently and may depends on your business, you MUST check with your book keeper or your laywer that this suits completely the law and the need of your own business.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Sweden=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS Billing 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Sweden&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The &amp;quot;red payment slip&amp;quot; (called BV) and an &amp;quot;orange payment slip&amp;quot; (called BVR) is no more required after 2022.&lt;br /&gt;
&lt;br /&gt;
QR-Bill is expected for PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer since the 20th june 2020.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To obtain such a section:&lt;br /&gt;
&lt;br /&gt;
*You can install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html&lt;br /&gt;
*The other option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but the installation of an external PHP library will be requested at the first generation of the PDF.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=United Kingdom=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed).&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed).&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Other / Resources=&lt;br /&gt;
More resources can be found: https://www.tx2.fr/en/2024/01/15/electronic-invoicing-europe-regulations-obligations/&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63805</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63805"/>
		<updated>2025-08-05T12:55:28Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
&amp;lt;seo metak=&amp;quot;einvoice, ereporting&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page presents a description of the rules and solutions for electronic invoicing (&#039;&#039;&#039;e-invoicing, e-billing&#039;&#039;&#039;) and &#039;&#039;&#039;e-reporting&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions to read, generate and/or send e-invoice depend on your country...&lt;br /&gt;
&lt;br /&gt;
If your country is not in this list, fee free to develop your own interface module and publish it on any git source repository or packaged as a zip (for the price of your choice) on dolistore.com. But you can also do it as an laternative of an exsiting solution if a module already exists and does not match your need...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
Note: Belgium already offers a platform called Mercurius, where you can send manually classic invoice to get a Peppol invoice.&lt;br /&gt;
&lt;br /&gt;
A peppol file can be validated here: https://ecosio.com/en/peppol-and-xml-document-validator/#&lt;br /&gt;
&lt;br /&gt;
To know if a peppol file has been published on the peppol network, you can follow this tutorial:&lt;br /&gt;
https://openpeppol.atlassian.net/wiki/spaces/Belgium/pages/624689399/Ma+facture+a-t-elle+t+bien+re+ue+par+le+client+Quel+est+son+statut&lt;br /&gt;
&lt;br /&gt;
=Colombia=&lt;br /&gt;
==Format==&lt;br /&gt;
Factura Electronica Colombia DIAN&lt;br /&gt;
&lt;br /&gt;
...To complete...&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
An old module is available here: https://www.dolistore.com/product.php?id=1205&amp;amp;title=factura-electronica-colombia-dian&amp;amp;l=en&lt;br /&gt;
We have not got enough feedback to know it this module is still valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Croatia=&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
There are no current Business-to-Business (B2B) or Business-to-Consumer (B2C) eInvoicing mandates. However, a B2B mandate is under public consultation and is expected to take effect on 1 January 2026. Near real-time reporting is expected to begin in 2026.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Croatia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Denmark=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3.0 and OIOUBL 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
No mandate for B2B einvoicing yet, but under the 2022 Bookkeeping Act, businesses must ensure their systems are capable of sending and receiving eInvoices, including through Peppol and NemHandel&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Denmark&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Estonia=&lt;br /&gt;
&lt;br /&gt;
===Format===&lt;br /&gt;
Peppol &lt;br /&gt;
&lt;br /&gt;
===Timeline===&lt;br /&gt;
Since 1 July 2025 all accounting entities registered as e-invoice recipients in the commercial register are entitled to receive e-invoices by default.&lt;br /&gt;
&lt;br /&gt;
===Dolibarr support===&lt;br /&gt;
To generate invoices in this format, you may need to install the module: &amp;lt;nowiki&amp;gt;https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: &amp;lt;nowiki&amp;gt;https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client&amp;lt;/nowiki&amp;gt; (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
===Legislation and current status===&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Estonia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Finland=&lt;br /&gt;
==Format==&lt;br /&gt;
UBL 2.1 and Cross-Industry Invoice (CII)&amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt; or national formats such as Finvoice 3.0 and TEAPPSXML 3.0 (provided their compliance with the European Standard) or Peppol BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
However, under the eInvoicing Act 241/2019, companies with an annual turnover exceeding EUR 10,000 are entitled to request EN-compliant eInvoices from their suppliers.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Legislation and current status&lt;br /&gt;
&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Finland&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Partial&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factur-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually onto this platform, or to use a third-party service for submission directly from Dolibarr, for example by using:&lt;br /&gt;
&lt;br /&gt;
*The [[Module Chorus|Chorus Pro Module]] - Subscription from EasyaSolution.&lt;br /&gt;
*The EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
*To develop your own code to interface with Chorus, there is a small tuto on the french forum: https://www.dolibarr.fr/forum/t/connexion-api-chorus-pro-environnement-de-test-qualif/46738&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
*Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
*Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing: From 1/7/2025 all companies are required to issue and receive their invoices in electronic format&lt;br /&gt;
&lt;br /&gt;
Digital delivery note: From 1/4/2025 for companies with a turnover exceeding 200000€ and from 1/10/2025 compulsory for all legal entities&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
E-reporting is implemented by Independent Authority for Public Revenue (IAPR) MyDATA platform&lt;br /&gt;
&lt;br /&gt;
*For Dolibarr versions 13.0.0 - 18.0.4 download *https://github.com/evansgl/dolibarr-mydata/releases/tag/1.8&lt;br /&gt;
*For Dolibarr versions 19.0.0+ use &amp;quot;dolibarr-19 branch&amp;quot; *https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Ireland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
No Business-to-Government (B2G) eInvoicing mandate exists, but since June 2019, all public sector entities are required to receive and process structured eInvoices compliant with the European standard (EN 16931)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Ireland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2019, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
There are two solutions:&lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;Fatturazione elettronica &amp;amp; Professionisti Smart&amp;quot; module: https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html&lt;br /&gt;
*The &amp;quot;Fatture Elettroniche ITA&amp;quot; module available from the site https://doliplatform.com/fatturazione-elettronica/ (Italian Dolibarr Preferred Partner Diciannove Soc. Coop. )&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*https://www.fatturapa.gov.it/en/index.html&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Latvia=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing starting from 2028&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Latvia*&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Lithuania=&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
mandatory eInvoicing targeted for 1 January 2028.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Lithuania&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
While there&#039;s no specific mention of Dolibarr support for Luxembourg e-invoicing, users can likely use the Peppol XML module available for other countries:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
CFDI XML&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Mexican electronic format, you need to install a CFDI XML module.&lt;br /&gt;
&lt;br /&gt;
*Sources of such a module are available here: https://github.com/avadnc/cfdixml&lt;br /&gt;
&lt;br /&gt;
*You can find a ready to deploy module file here: https://www.dolistore.com/product.php?id=354&amp;amp;title=mexico-cfdi&amp;amp;l=fr&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Norway=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol.&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Poland=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Romania must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Already required (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the follwing module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
=Romania=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Romania must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Already required (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the follwing module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Sweden=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Spain (FacturaE - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain is called FacturaE (European standard EN 16931). VeriFactu is the system and network to send and validate invoices.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
One of the following module is required:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module DoliFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A module called 2FacturaE exists to generated invoices using the invoice in the format expected (https://www.2byte.es/index.php/productos/modulo-2facturae). It was enough for spain.&lt;br /&gt;
&lt;br /&gt;
But this is no more true: In 2025, you must also now have a software that keep tracking of recording payment and invoices into an unalterable way.&lt;br /&gt;
For this you need now the module DoliFactu (https://dolifactu.es/producto/modulo-antifraude-dolibarr/).&lt;br /&gt;
&lt;br /&gt;
Note also that there is also a ready to use hosting service called DoliFactu.es that includes this module by default in its offer.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module LeyAntiFraudeYVeriFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Another solution to be ready and compliant with the VeryFactu system is to install the external module called &amp;quot;Ley antifraude y VeriFactu&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can get the module here: https://www.dolistore.com/fr/modules/2259-Ley-antifraude-y-VeriFactu.html?search_query=verifactu&amp;amp;results=1&lt;br /&gt;
&lt;br /&gt;
Note: As the law is evolving frequently and may depends on your business, you MUST check with your book keeper or your laywer that this suits completely the law and the need of your own business.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: N/A&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*VAT Real-Time Reporting: N/A&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The &amp;quot;red payment slip&amp;quot; (called BV) and an &amp;quot;orange payment slip&amp;quot; (called BVR) is no more required after 2022.&lt;br /&gt;
&lt;br /&gt;
QR-Bill is expected for PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer since the 20th june 2020.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To obtain such a section:&lt;br /&gt;
&lt;br /&gt;
*You can install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html&lt;br /&gt;
*The other option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but the installation of an external PHP library will be requested at the first generation of the PDF.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=United Kingdom=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed).&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed).&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Other / Resources=&lt;br /&gt;
More resources can be found: https://www.tx2.fr/en/2024/01/15/electronic-invoicing-europe-regulations-obligations/&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63804</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63804"/>
		<updated>2025-08-04T23:00:03Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
&amp;lt;seo metak=&amp;quot;einvoice, ereporting&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page presents a description of the rules and solutions for electronic invoicing (&#039;&#039;&#039;e-invoicing, e-billing&#039;&#039;&#039;) and &#039;&#039;&#039;e-reporting&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions to read, generate and/or send e-invoice depend on your country...&lt;br /&gt;
&lt;br /&gt;
If your country is not in this list, fee free to develop your own interface module and publish it on any git source repository or packaged as a zip (for the price of your choice) on dolistore.com. But you can also do it as an laternative of an exsiting solution if a module already exists and does not match your need...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
Note: Belgium already offers a platform called Mercurius, where you can send manually classic invoice to get a Peppol invoice.&lt;br /&gt;
&lt;br /&gt;
A peppol file can be validated here: https://ecosio.com/en/peppol-and-xml-document-validator/#&lt;br /&gt;
&lt;br /&gt;
To know if a peppol file has been published on the peppol network, you can follow this tutorial: https://openpeppol.atlassian.net/wiki/spaces/Belgium/pages/624689399/Ma+facture+a-t-elle+t+bien+re+ue+par+le+client+Quel+est+son+statut&lt;br /&gt;
&lt;br /&gt;
=Colombia=&lt;br /&gt;
==Format==&lt;br /&gt;
Factura Electronica Colombia DIAN&lt;br /&gt;
&lt;br /&gt;
...To complete...&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
An old module is available here: https://www.dolistore.com/product.php?id=1205&amp;amp;title=factura-electronica-colombia-dian&amp;amp;l=en&lt;br /&gt;
We have not got enough feedback to know it this module is still valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Croatia=&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
There are no current Business-to-Business (B2B) or Business-to-Consumer (B2C) eInvoicing mandates. However, a B2B mandate is under public consultation and is expected to take effect on 1 January 2026. Near real-time reporting is expected to begin in 2026.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Croatia&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Denmark=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3.0 and OIOUBL 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
No mandate for B2B einvoicing yet, but under the 2022 Bookkeeping Act, businesses must ensure their systems are capable of sending and receiving eInvoices, including through Peppol and NemHandel&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Denmark&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Estonia =&lt;br /&gt;
&lt;br /&gt;
=== Format ===&lt;br /&gt;
Peppol &lt;br /&gt;
&lt;br /&gt;
=== Timeline ===&lt;br /&gt;
Since 1 July 2025 all accounting entities registered as e-invoice recipients in the commercial register are entitled to receive e-invoices by default.&lt;br /&gt;
&lt;br /&gt;
=== Dolibarr support ===&lt;br /&gt;
To generate invoices in this format, you may need to install the module: &amp;lt;nowiki&amp;gt;https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: &amp;lt;nowiki&amp;gt;https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client&amp;lt;/nowiki&amp;gt; (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
=== Legislation and current status ===&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Estonia&lt;br /&gt;
&lt;br /&gt;
* B2G: Yes&lt;br /&gt;
* B2B: Yes&lt;br /&gt;
* B2C: No&lt;br /&gt;
* VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Finland=&lt;br /&gt;
==Format==&lt;br /&gt;
UBL 2.1 and Cross-Industry Invoice (CII)&amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt; or national formats such as Finvoice 3.0 and TEAPPSXML 3.0 (provided their compliance with the European Standard) or Peppol BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
There is no business-to-business (B2B) mandate.&lt;br /&gt;
&lt;br /&gt;
However, under the eInvoicing Act 241/2019, companies with an annual turnover exceeding EUR 10,000 are entitled to request EN-compliant eInvoices from their suppliers.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Legislation and current status&lt;br /&gt;
&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Finland&lt;br /&gt;
&lt;br /&gt;
* B2G: Yes&lt;br /&gt;
* B2B: Partial&lt;br /&gt;
* B2C: No&lt;br /&gt;
* VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factur-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually onto this platform, or to use a third-party service for submission directly from Dolibarr, for example by using:&lt;br /&gt;
&lt;br /&gt;
*The [[Module Chorus|Chorus Pro Module]] - Subscription from EasyaSolution.&lt;br /&gt;
*The EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
*To develop your own code to interface with Chorus, there is a small tuto on the french forum: https://www.dolibarr.fr/forum/t/connexion-api-chorus-pro-environnement-de-test-qualif/46738&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
* B2B: Not yet&lt;br /&gt;
* B2C: No&lt;br /&gt;
* VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
*Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
*Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing: From 1/7/2025 all companies are required to issue and receive their invoices in electronic format&lt;br /&gt;
&lt;br /&gt;
Digital delivery note: From 1/4/2025 for companies with a turnover exceeding 200000€ and from 1/10/2025 compulsory for all legal entities&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
E-reporting is implemented by Independent Authority for Public Revenue (IAPR) MyDATA platform&lt;br /&gt;
&lt;br /&gt;
*For Dolibarr versions 13.0.0 - 18.0.4 download *https://github.com/evansgl/dolibarr-mydata/releases/tag/1.8&lt;br /&gt;
*For Dolibarr versions 19.0.0+ use &amp;quot;dolibarr-19 branch&amp;quot; *https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Ireland=&lt;br /&gt;
==Format==&lt;br /&gt;
PEPPOL BIS Billing 3.0.&lt;br /&gt;
==Timeline==&lt;br /&gt;
No Business-to-Government (B2G) eInvoicing mandate exists, but since June 2019, all public sector entities are required to receive and process structured eInvoices compliant with the European standard (EN 16931)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
== Legislation and current status ==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Ireland&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2C: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2019, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
There are two solutions:&lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;Fatturazione elettronica &amp;amp; Professionisti Smart&amp;quot; module: https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html&lt;br /&gt;
*The &amp;quot;Fatture Elettroniche ITA&amp;quot; module available from the site https://doliplatform.com/fatturazione-elettronica/ (Italian Dolibarr Preferred Partner Diciannove Soc. Coop. )&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*https://www.fatturapa.gov.it/en/index.html&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The obligation for economic operators to invoice electronically is staggered:&lt;br /&gt;
&lt;br /&gt;
*Large economic operators: from 18 May 2022&lt;br /&gt;
*Medium-sized economic operators: from 18 October 2022&lt;br /&gt;
*Small and newly established economic operators: from 18 March 2023&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
While there&#039;s no specific mention of Dolibarr support for Luxembourg e-invoicing, users can likely use the Peppol XML module available for other countries:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: Yes (mandatory as per the timeline above)&lt;br /&gt;
*VAT Real-Time Reporting: Not specifically mentioned&lt;br /&gt;
&lt;br /&gt;
The legal framework is based on:&lt;br /&gt;
&lt;br /&gt;
*Law of 13 December 2021 amending the Law of 16 May 2019 on electronic invoicing in public procurement and concession contracts&lt;br /&gt;
*Grand-Ducal Regulation of 13 December 2021 determining the common delivery network and alternative technical solutions for electronic invoicing&lt;br /&gt;
&lt;br /&gt;
Luxembourg has chosen the Peppol network as the common delivery network for automated receipt of electronic invoices. For economic operators unable to use Peppol, alternative non-automated solutions (online forms) are available through Guichet.lu.&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
CFDI XML&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Mexican electronic format, you need to install a CFDI XML module.&lt;br /&gt;
&lt;br /&gt;
*Sources of such a module are available here: https://github.com/avadnc/cfdixml&lt;br /&gt;
&lt;br /&gt;
*You can find a ready to deploy module file here: https://www.dolistore.com/product.php?id=354&amp;amp;title=mexico-cfdi&amp;amp;l=fr&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
=Netherlands (Peppol BIS Billing 3.0, NLCIUS)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in The Netherlands are NLCIUS (Dutch CIUS) and Peppol BIS Billing 3.0 with country-specific rules equal to NL CIUS.&lt;br /&gt;
Peppol BIS Billing 3.0 is now the preferred format but not mandatory.&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
N/A&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+The+Netherlands (NO VERIFICATION)&lt;br /&gt;
*B2G: N/A&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*VAT Real-Time Reporting: N/A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Norway=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol.&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Poland=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Romania must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Already required (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the follwing module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
=Romania=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Romania must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Already required (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the follwing module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Sweden=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Spain (FacturaE - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain is called FacturaE (European standard EN 16931). VeriFactu is the system and network to send and validate invoices.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
One of the following module is required:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module DoliFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A module called 2FacturaE exists to generated invoices using the invoice in the format expected (https://www.2byte.es/index.php/productos/modulo-2facturae). It was enough for spain.&lt;br /&gt;
&lt;br /&gt;
But this is no more true: In 2025, you must also now have a software that keep tracking of recording payment and invoices into an unalterable way.&lt;br /&gt;
For this you need now the module DoliFactu (https://dolifactu.es/producto/modulo-antifraude-dolibarr/).&lt;br /&gt;
&lt;br /&gt;
Note also that there is also a ready to use hosting service called DoliFactu.es that includes this module by default in its offer.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module LeyAntiFraudeYVeriFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Another solution to be ready and compliant with the VeryFactu system is to install the external module called &amp;quot;Ley antifraude y VeriFactu&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can get the module here: https://www.dolistore.com/fr/modules/2259-Ley-antifraude-y-VeriFactu.html?search_query=verifactu&amp;amp;results=1&lt;br /&gt;
&lt;br /&gt;
Note: As the law is evolving frequently and may depends on your business, you MUST check with your book keeper or your laywer that this suits completely the law and the need of your own business.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: N/A&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*VAT Real-Time Reporting: N/A&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The &amp;quot;red payment slip&amp;quot; (called BV) and an &amp;quot;orange payment slip&amp;quot; (called BVR) is no more required after 2022.&lt;br /&gt;
&lt;br /&gt;
QR-Bill is expected for PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer since the 20th june 2020.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To obtain such a section:&lt;br /&gt;
&lt;br /&gt;
*You can install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html&lt;br /&gt;
*The other option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but the installation of an external PHP library will be requested at the first generation of the PDF.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=United Kingdom=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed).&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed).&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Other / Resources=&lt;br /&gt;
More resources can be found: https://www.tx2.fr/en/2024/01/15/electronic-invoicing-europe-regulations-obligations/&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63803</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63803"/>
		<updated>2025-08-04T22:34:35Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
&amp;lt;seo metak=&amp;quot;einvoice, ereporting&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page presents a description of the rules and solutions for electronic invoicing (&#039;&#039;&#039;e-invoicing, e-billing&#039;&#039;&#039;) and &#039;&#039;&#039;e-reporting&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions to read, generate and/or send e-invoice depend on your country...&lt;br /&gt;
&lt;br /&gt;
If your country is not in this list, fee free to develop your own interface module and publish it on any git source repository or packaged as a zip (for the price of your choice) on dolistore.com. But you can also do it as an laternative of an exsiting solution if a module already exists and does not match your need...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2B: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
Note: Belgium already offers a platform called Mercurius, where you can send manually classic invoice to get a Peppol invoice.&lt;br /&gt;
&lt;br /&gt;
A peppol file can be validated here: https://ecosio.com/en/peppol-and-xml-document-validator/#&lt;br /&gt;
&lt;br /&gt;
To know if a peppol file has been published on the peppol network, you can follow this tutorial: https://openpeppol.atlassian.net/wiki/spaces/Belgium/pages/624689399/Ma+facture+a-t-elle+t+bien+re+ue+par+le+client+Quel+est+son+statut&lt;br /&gt;
&lt;br /&gt;
=Colombia=&lt;br /&gt;
==Format==&lt;br /&gt;
Factura Electronica Colombia DIAN&lt;br /&gt;
&lt;br /&gt;
...To complete...&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
An old module is available here: https://www.dolistore.com/product.php?id=1205&amp;amp;title=factura-electronica-colombia-dian&amp;amp;l=en&lt;br /&gt;
We have not got enough feedback to know it this module is still valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Croatia =&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
There are no current Business-to-Business (B2B) or Business-to-Consumer (B2C) eInvoicing mandates. However, a B2B mandate is under public consultation and is expected to take effect on 1 January 2026. Near real-time reporting is expected to begin in 2026.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Denmark&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2B: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Denmark=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3.0 and OIOUBL 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
No mandate for B2B einvoicing yet, but under the 2022 Bookkeeping Act, businesses must ensure their systems are capable of sending and receiving eInvoices, including through Peppol and NemHandel&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Denmark&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2B: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Finland=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factur-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually onto this platform, or to use a third-party service for submission directly from Dolibarr, for example by using:&lt;br /&gt;
&lt;br /&gt;
*The [[Module Chorus|Chorus Pro Module]] - Subscription from EasyaSolution.&lt;br /&gt;
*The EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
*To develop your own code to interface with Chorus, there is a small tuto on the french forum: https://www.dolibarr.fr/forum/t/connexion-api-chorus-pro-environnement-de-test-qualif/46738&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
*Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
*Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing: From 1/7/2025 all companies are required to issue and receive their invoices in electronic format&lt;br /&gt;
&lt;br /&gt;
Digital delivery note: From 1/4/2025 for companies with a turnover exceeding 200000€ and from 1/10/2025 compulsory for all legal entities&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
E-reporting is implemented by Independent Authority for Public Revenue (IAPR) MyDATA platform&lt;br /&gt;
&lt;br /&gt;
*For Dolibarr versions 13.0.0 - 18.0.4 download *https://github.com/evansgl/dolibarr-mydata/releases/tag/1.8&lt;br /&gt;
*For Dolibarr versions 19.0.0+ use &amp;quot;dolibarr-19 branch&amp;quot; *https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Only for companies with B2G transactions&lt;br /&gt;
*E-reporting: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2019, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
There are two solutions:&lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;Fatturazione elettronica &amp;amp; Professionisti Smart&amp;quot; module: https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html&lt;br /&gt;
*The &amp;quot;Fatture Elettroniche ITA&amp;quot; module available from the site https://doliplatform.com/fatturazione-elettronica/ (Italian Dolibarr Preferred Partner Diciannove Soc. Coop. )&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*https://www.fatturapa.gov.it/en/index.html&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Ireland=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Romania must follow Peppol.&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The obligation for economic operators to invoice electronically is staggered:&lt;br /&gt;
&lt;br /&gt;
*Large economic operators: from 18 May 2022&lt;br /&gt;
*Medium-sized economic operators: from 18 October 2022&lt;br /&gt;
*Small and newly established economic operators: from 18 March 2023&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
While there&#039;s no specific mention of Dolibarr support for Luxembourg e-invoicing, users can likely use the Peppol XML module available for other countries:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: Yes (mandatory as per the timeline above)&lt;br /&gt;
*VAT Real-Time Reporting: Not specifically mentioned&lt;br /&gt;
&lt;br /&gt;
The legal framework is based on:&lt;br /&gt;
&lt;br /&gt;
*Law of 13 December 2021 amending the Law of 16 May 2019 on electronic invoicing in public procurement and concession contracts&lt;br /&gt;
*Grand-Ducal Regulation of 13 December 2021 determining the common delivery network and alternative technical solutions for electronic invoicing&lt;br /&gt;
&lt;br /&gt;
Luxembourg has chosen the Peppol network as the common delivery network for automated receipt of electronic invoices. For economic operators unable to use Peppol, alternative non-automated solutions (online forms) are available through Guichet.lu.&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
CFDI XML&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Mexican electronic format, you need to install a CFDI XML module.&lt;br /&gt;
&lt;br /&gt;
*Sources of such a module are available here: https://github.com/avadnc/cfdixml&lt;br /&gt;
&lt;br /&gt;
*You can find a ready to deploy module file here: https://www.dolistore.com/product.php?id=354&amp;amp;title=mexico-cfdi&amp;amp;l=fr&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
=Netherlands (Peppol BIS Billing 3.0, NLCIUS)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in The Netherlands are NLCIUS (Dutch CIUS) and Peppol BIS Billing 3.0 with country-specific rules equal to NL CIUS.&lt;br /&gt;
Peppol BIS Billing 3.0 is now the preferred format but not mandatory.&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
N/A&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+The+Netherlands (NO VERIFICATION)&lt;br /&gt;
*B2G: N/A&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*VAT Real-Time Reporting: N/A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Norway=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol.&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Poland=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Romania must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Already required (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the follwing module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
=Romania=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Romania must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Already required (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the follwing module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Sweden=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Spain (FacturaE - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain is called FacturaE (European standard EN 16931). VeriFactu is the system and network to send and validate invoices.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
One of the following module is required:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module DoliFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A module called 2FacturaE exists to generated invoices using the invoice in the format expected (https://www.2byte.es/index.php/productos/modulo-2facturae). It was enough for spain.&lt;br /&gt;
&lt;br /&gt;
But this is no more true: In 2025, you must also now have a software that keep tracking of recording payment and invoices into an unalterable way.&lt;br /&gt;
For this you need now the module DoliFactu (https://dolifactu.es/producto/modulo-antifraude-dolibarr/).&lt;br /&gt;
&lt;br /&gt;
Note also that there is also a ready to use hosting service called DoliFactu.es that includes this module by default in its offer.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module LeyAntiFraudeYVeriFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Another solution to be ready and compliant with the VeryFactu system is to install the external module called &amp;quot;Ley antifraude y VeriFactu&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can get the module here: https://www.dolistore.com/fr/modules/2259-Ley-antifraude-y-VeriFactu.html?search_query=verifactu&amp;amp;results=1&lt;br /&gt;
&lt;br /&gt;
Note: As the law is evolving frequently and may depends on your business, you MUST check with your book keeper or your laywer that this suits completely the law and the need of your own business.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: N/A&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*VAT Real-Time Reporting: N/A&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The &amp;quot;red payment slip&amp;quot; (called BV) and an &amp;quot;orange payment slip&amp;quot; (called BVR) is no more required after 2022.&lt;br /&gt;
&lt;br /&gt;
QR-Bill is expected for PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer since the 20th june 2020.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To obtain such a section:&lt;br /&gt;
&lt;br /&gt;
*You can install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html&lt;br /&gt;
*The other option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but the installation of an external PHP library will be requested at the first generation of the PDF.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=United Kingdom=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed).&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed).&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Other / Resources=&lt;br /&gt;
More resources can be found: https://www.tx2.fr/en/2024/01/15/electronic-invoicing-europe-regulations-obligations/&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63802</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63802"/>
		<updated>2025-08-04T22:33:44Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
&amp;lt;seo metak=&amp;quot;einvoice, ereporting&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page presents a description of the rules and solutions for electronic invoicing (&#039;&#039;&#039;e-invoicing, e-billing&#039;&#039;&#039;) and &#039;&#039;&#039;e-reporting&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions to read, generate and/or send e-invoice depend on your country...&lt;br /&gt;
&lt;br /&gt;
If your country is not in this list, fee free to develop your own interface module and publish it on any git source repository or packaged as a zip (for the price of your choice) on dolistore.com. But you can also do it as an laternative of an exsiting solution if a module already exists and does not match your need...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2B: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
Note: Belgium already offers a platform called Mercurius, where you can send manually classic invoice to get a Peppol invoice.&lt;br /&gt;
&lt;br /&gt;
A peppol file can be validated here: https://ecosio.com/en/peppol-and-xml-document-validator/#&lt;br /&gt;
&lt;br /&gt;
To know if a peppol file has been published on the peppol network, you can follow this tutorial: https://openpeppol.atlassian.net/wiki/spaces/Belgium/pages/624689399/Ma+facture+a-t-elle+t+bien+re+ue+par+le+client+Quel+est+son+statut&lt;br /&gt;
&lt;br /&gt;
=Colombia=&lt;br /&gt;
==Format==&lt;br /&gt;
Factura Electronica Colombia DIAN&lt;br /&gt;
&lt;br /&gt;
...To complete...&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
An old module is available here: https://www.dolistore.com/product.php?id=1205&amp;amp;title=factura-electronica-colombia-dian&amp;amp;l=en&lt;br /&gt;
We have not got enough feedback to know it this module is still valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Croatia ==&lt;br /&gt;
&lt;br /&gt;
==Format==&lt;br /&gt;
Compliant with the European standard (EN 16931)&lt;br /&gt;
==Timeline==&lt;br /&gt;
There are no current Business-to-Business (B2B) or Business-to-Consumer (B2C) eInvoicing mandates. However, a B2B mandate is under public consultation and is expected to take effect on 1 January 2026. Near real-time reporting is expected to begin in 2026.&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Denmark&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2B: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Denmark=&lt;br /&gt;
==Format==&lt;br /&gt;
Peppol BIS 3.0 and OIOUBL 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
No mandate for B2B einvoicing yet, but under the 2022 Bookkeeping Act, businesses must ensure their systems are capable of sending and receiving eInvoices, including through Peppol and NemHandel&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Denmark&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2B: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Finland=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factur-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually onto this platform, or to use a third-party service for submission directly from Dolibarr, for example by using:&lt;br /&gt;
&lt;br /&gt;
*The [[Module Chorus|Chorus Pro Module]] - Subscription from EasyaSolution.&lt;br /&gt;
*The EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
*To develop your own code to interface with Chorus, there is a small tuto on the french forum: https://www.dolibarr.fr/forum/t/connexion-api-chorus-pro-environnement-de-test-qualif/46738&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
*Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
*Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing: From 1/7/2025 all companies are required to issue and receive their invoices in electronic format&lt;br /&gt;
&lt;br /&gt;
Digital delivery note: From 1/4/2025 for companies with a turnover exceeding 200000€ and from 1/10/2025 compulsory for all legal entities&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
E-reporting is implemented by Independent Authority for Public Revenue (IAPR) MyDATA platform&lt;br /&gt;
&lt;br /&gt;
*For Dolibarr versions 13.0.0 - 18.0.4 download *https://github.com/evansgl/dolibarr-mydata/releases/tag/1.8&lt;br /&gt;
*For Dolibarr versions 19.0.0+ use &amp;quot;dolibarr-19 branch&amp;quot; *https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Only for companies with B2G transactions&lt;br /&gt;
*E-reporting: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2019, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
There are two solutions:&lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;Fatturazione elettronica &amp;amp; Professionisti Smart&amp;quot; module: https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html&lt;br /&gt;
*The &amp;quot;Fatture Elettroniche ITA&amp;quot; module available from the site https://doliplatform.com/fatturazione-elettronica/ (Italian Dolibarr Preferred Partner Diciannove Soc. Coop. )&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*https://www.fatturapa.gov.it/en/index.html&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Ireland=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Romania must follow Peppol.&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The obligation for economic operators to invoice electronically is staggered:&lt;br /&gt;
&lt;br /&gt;
*Large economic operators: from 18 May 2022&lt;br /&gt;
*Medium-sized economic operators: from 18 October 2022&lt;br /&gt;
*Small and newly established economic operators: from 18 March 2023&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
While there&#039;s no specific mention of Dolibarr support for Luxembourg e-invoicing, users can likely use the Peppol XML module available for other countries:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: Yes (mandatory as per the timeline above)&lt;br /&gt;
*VAT Real-Time Reporting: Not specifically mentioned&lt;br /&gt;
&lt;br /&gt;
The legal framework is based on:&lt;br /&gt;
&lt;br /&gt;
*Law of 13 December 2021 amending the Law of 16 May 2019 on electronic invoicing in public procurement and concession contracts&lt;br /&gt;
*Grand-Ducal Regulation of 13 December 2021 determining the common delivery network and alternative technical solutions for electronic invoicing&lt;br /&gt;
&lt;br /&gt;
Luxembourg has chosen the Peppol network as the common delivery network for automated receipt of electronic invoices. For economic operators unable to use Peppol, alternative non-automated solutions (online forms) are available through Guichet.lu.&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
CFDI XML&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Mexican electronic format, you need to install a CFDI XML module.&lt;br /&gt;
&lt;br /&gt;
*Sources of such a module are available here: https://github.com/avadnc/cfdixml&lt;br /&gt;
&lt;br /&gt;
*You can find a ready to deploy module file here: https://www.dolistore.com/product.php?id=354&amp;amp;title=mexico-cfdi&amp;amp;l=fr&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
=Netherlands (Peppol BIS Billing 3.0, NLCIUS)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in The Netherlands are NLCIUS (Dutch CIUS) and Peppol BIS Billing 3.0 with country-specific rules equal to NL CIUS.&lt;br /&gt;
Peppol BIS Billing 3.0 is now the preferred format but not mandatory.&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
N/A&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+The+Netherlands (NO VERIFICATION)&lt;br /&gt;
*B2G: N/A&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*VAT Real-Time Reporting: N/A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Norway=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol.&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Poland=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Romania must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Already required (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the follwing module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
=Romania=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Romania must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Already required (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the follwing module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Sweden=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Spain (FacturaE - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain is called FacturaE (European standard EN 16931). VeriFactu is the system and network to send and validate invoices.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
One of the following module is required:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module DoliFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A module called 2FacturaE exists to generated invoices using the invoice in the format expected (https://www.2byte.es/index.php/productos/modulo-2facturae). It was enough for spain.&lt;br /&gt;
&lt;br /&gt;
But this is no more true: In 2025, you must also now have a software that keep tracking of recording payment and invoices into an unalterable way.&lt;br /&gt;
For this you need now the module DoliFactu (https://dolifactu.es/producto/modulo-antifraude-dolibarr/).&lt;br /&gt;
&lt;br /&gt;
Note also that there is also a ready to use hosting service called DoliFactu.es that includes this module by default in its offer.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module LeyAntiFraudeYVeriFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Another solution to be ready and compliant with the VeryFactu system is to install the external module called &amp;quot;Ley antifraude y VeriFactu&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can get the module here: https://www.dolistore.com/fr/modules/2259-Ley-antifraude-y-VeriFactu.html?search_query=verifactu&amp;amp;results=1&lt;br /&gt;
&lt;br /&gt;
Note: As the law is evolving frequently and may depends on your business, you MUST check with your book keeper or your laywer that this suits completely the law and the need of your own business.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: N/A&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*VAT Real-Time Reporting: N/A&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The &amp;quot;red payment slip&amp;quot; (called BV) and an &amp;quot;orange payment slip&amp;quot; (called BVR) is no more required after 2022.&lt;br /&gt;
&lt;br /&gt;
QR-Bill is expected for PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer since the 20th june 2020.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To obtain such a section:&lt;br /&gt;
&lt;br /&gt;
*You can install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html&lt;br /&gt;
*The other option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but the installation of an external PHP library will be requested at the first generation of the PDF.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=United Kingdom=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed).&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed).&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Other / Resources=&lt;br /&gt;
More resources can be found: https://www.tx2.fr/en/2024/01/15/electronic-invoicing-europe-regulations-obligations/&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63801</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63801"/>
		<updated>2025-08-04T22:18:19Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* Format */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
&amp;lt;seo metak=&amp;quot;einvoice, ereporting&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page presents a description of the rules and solutions for electronic invoicing (&#039;&#039;&#039;e-invoicing, e-billing&#039;&#039;&#039;) and &#039;&#039;&#039;e-reporting&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions to read, generate and/or send e-invoice depend on your country...&lt;br /&gt;
&lt;br /&gt;
If your country is not in this list, fee free to develop your own interface module and publish it on any git source repository or packaged as a zip (for the price of your choice) on dolistore.com. But you can also do it as an laternative of an exsiting solution if a module already exists and does not match your need...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2B: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
Note: Belgium already offers a platform called Mercurius, where you can send manually classic invoice to get a Peppol invoice.&lt;br /&gt;
&lt;br /&gt;
A peppol file can be validated here: https://ecosio.com/en/peppol-and-xml-document-validator/#&lt;br /&gt;
&lt;br /&gt;
To know if a peppol file has been published on the peppol network, you can follow this tutorial: https://openpeppol.atlassian.net/wiki/spaces/Belgium/pages/624689399/Ma+facture+a-t-elle+t+bien+re+ue+par+le+client+Quel+est+son+statut&lt;br /&gt;
&lt;br /&gt;
=Colombia=&lt;br /&gt;
==Format==&lt;br /&gt;
Factura Electronica Colombia DIAN&lt;br /&gt;
&lt;br /&gt;
...To complete...&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
An old module is available here: https://www.dolistore.com/product.php?id=1205&amp;amp;title=factura-electronica-colombia-dian&amp;amp;l=en&lt;br /&gt;
We have not got enough feedback to know it this module is still valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Denmark=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
No mandate for B2B einvoicing yet, but under the 2022 Bookkeeping Act, businesses must ensure their systems are capable of sending and receiving eInvoices, including through Peppol and NemHandel&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
== Legislation and current status ==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Denmark&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: No&lt;br /&gt;
*B2B: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Finland=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factur-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually onto this platform, or to use a third-party service for submission directly from Dolibarr, for example by using:&lt;br /&gt;
&lt;br /&gt;
*The [[Module Chorus|Chorus Pro Module]] - Subscription from EasyaSolution.&lt;br /&gt;
*The EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
*To develop your own code to interface with Chorus, there is a small tuto on the french forum: https://www.dolibarr.fr/forum/t/connexion-api-chorus-pro-environnement-de-test-qualif/46738&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
*Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
*Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing: From 1/7/2025 all companies are required to issue and receive their invoices in electronic format&lt;br /&gt;
&lt;br /&gt;
Digital delivery note: From 1/4/2025 for companies with a turnover exceeding 200000€ and from 1/10/2025 compulsory for all legal entities&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
E-reporting is implemented by Independent Authority for Public Revenue (IAPR) MyDATA platform&lt;br /&gt;
&lt;br /&gt;
*For Dolibarr versions 13.0.0 - 18.0.4 download *https://github.com/evansgl/dolibarr-mydata/releases/tag/1.8&lt;br /&gt;
*For Dolibarr versions 19.0.0+ use &amp;quot;dolibarr-19 branch&amp;quot; *https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Only for companies with B2G transactions&lt;br /&gt;
*E-reporting: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2019, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
There are two solutions:&lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;Fatturazione elettronica &amp;amp; Professionisti Smart&amp;quot; module: https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html&lt;br /&gt;
*The &amp;quot;Fatture Elettroniche ITA&amp;quot; module available from the site https://doliplatform.com/fatturazione-elettronica/ (Italian Dolibarr Preferred Partner Diciannove Soc. Coop. )&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*https://www.fatturapa.gov.it/en/index.html&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Ireland=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Romania must follow Peppol.&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The obligation for economic operators to invoice electronically is staggered:&lt;br /&gt;
&lt;br /&gt;
*Large economic operators: from 18 May 2022&lt;br /&gt;
*Medium-sized economic operators: from 18 October 2022&lt;br /&gt;
*Small and newly established economic operators: from 18 March 2023&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
While there&#039;s no specific mention of Dolibarr support for Luxembourg e-invoicing, users can likely use the Peppol XML module available for other countries:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: Yes (mandatory as per the timeline above)&lt;br /&gt;
*VAT Real-Time Reporting: Not specifically mentioned&lt;br /&gt;
&lt;br /&gt;
The legal framework is based on:&lt;br /&gt;
&lt;br /&gt;
*Law of 13 December 2021 amending the Law of 16 May 2019 on electronic invoicing in public procurement and concession contracts&lt;br /&gt;
*Grand-Ducal Regulation of 13 December 2021 determining the common delivery network and alternative technical solutions for electronic invoicing&lt;br /&gt;
&lt;br /&gt;
Luxembourg has chosen the Peppol network as the common delivery network for automated receipt of electronic invoices. For economic operators unable to use Peppol, alternative non-automated solutions (online forms) are available through Guichet.lu.&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
CFDI XML&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Mexican electronic format, you need to install a CFDI XML module.&lt;br /&gt;
&lt;br /&gt;
*Sources of such a module are available here: https://github.com/avadnc/cfdixml&lt;br /&gt;
&lt;br /&gt;
*You can find a ready to deploy module file here: https://www.dolistore.com/product.php?id=354&amp;amp;title=mexico-cfdi&amp;amp;l=fr&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
=Netherlands (Peppol BIS Billing 3.0, NLCIUS)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in The Netherlands are NLCIUS (Dutch CIUS) and Peppol BIS Billing 3.0 with country-specific rules equal to NL CIUS.&lt;br /&gt;
Peppol BIS Billing 3.0 is now the preferred format but not mandatory.&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
N/A&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+The+Netherlands (NO VERIFICATION)&lt;br /&gt;
*B2G: N/A&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*VAT Real-Time Reporting: N/A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Norway=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol.&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Poland=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Romania must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Already required (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the follwing module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
=Romania=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Romania must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Already required (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the follwing module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Sweden=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Spain (FacturaE - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain is called FacturaE (European standard EN 16931). VeriFactu is the system and network to send and validate invoices.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
One of the following module is required:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module DoliFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A module called 2FacturaE exists to generated invoices using the invoice in the format expected (https://www.2byte.es/index.php/productos/modulo-2facturae). It was enough for spain.&lt;br /&gt;
&lt;br /&gt;
But this is no more true: In 2025, you must also now have a software that keep tracking of recording payment and invoices into an unalterable way.&lt;br /&gt;
For this you need now the module DoliFactu (https://dolifactu.es/producto/modulo-antifraude-dolibarr/).&lt;br /&gt;
&lt;br /&gt;
Note also that there is also a ready to use hosting service called DoliFactu.es that includes this module by default in its offer.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module LeyAntiFraudeYVeriFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Another solution to be ready and compliant with the VeryFactu system is to install the external module called &amp;quot;Ley antifraude y VeriFactu&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can get the module here: https://www.dolistore.com/fr/modules/2259-Ley-antifraude-y-VeriFactu.html?search_query=verifactu&amp;amp;results=1&lt;br /&gt;
&lt;br /&gt;
Note: As the law is evolving frequently and may depends on your business, you MUST check with your book keeper or your laywer that this suits completely the law and the need of your own business.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: N/A&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*VAT Real-Time Reporting: N/A&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The &amp;quot;red payment slip&amp;quot; (called BV) and an &amp;quot;orange payment slip&amp;quot; (called BVR) is no more required after 2022.&lt;br /&gt;
&lt;br /&gt;
QR-Bill is expected for PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer since the 20th june 2020.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To obtain such a section:&lt;br /&gt;
&lt;br /&gt;
*You can install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html&lt;br /&gt;
*The other option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but the installation of an external PHP library will be requested at the first generation of the PDF.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=United Kingdom=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed).&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed).&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Other / Resources=&lt;br /&gt;
More resources can be found: https://www.tx2.fr/en/2024/01/15/electronic-invoicing-europe-regulations-obligations/&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63800</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63800"/>
		<updated>2025-08-04T21:44:54Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
&amp;lt;seo metak=&amp;quot;einvoice, ereporting&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page presents a description of the rules and solutions for electronic invoicing (&#039;&#039;&#039;e-invoicing, e-billing&#039;&#039;&#039;) and &#039;&#039;&#039;e-reporting&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions to read, generate and/or send e-invoice depend on your country...&lt;br /&gt;
&lt;br /&gt;
If your country is not in this list, fee free to develop your own interface module and publish it on any git source repository or packaged as a zip (for the price of your choice) on dolistore.com. But you can also do it as an laternative of an exsiting solution if a module already exists and does not match your need...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Austria=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Austria&lt;br /&gt;
&lt;br /&gt;
*B2G: No&lt;br /&gt;
*B2B: No&lt;br /&gt;
*VAT Real-Time Reporting: No&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*B2B: No&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
Note: Belgium already offers a platform called Mercurius, where you can send manually classic invoice to get a Peppol invoice.&lt;br /&gt;
&lt;br /&gt;
A peppol file can be validated here: https://ecosio.com/en/peppol-and-xml-document-validator/#&lt;br /&gt;
&lt;br /&gt;
To know if a peppol file has been published on the peppol network, you can follow this tutorial: https://openpeppol.atlassian.net/wiki/spaces/Belgium/pages/624689399/Ma+facture+a-t-elle+t+bien+re+ue+par+le+client+Quel+est+son+statut&lt;br /&gt;
&lt;br /&gt;
=Columbia=&lt;br /&gt;
==Format==&lt;br /&gt;
Factura Electronica Colombia DIAN&lt;br /&gt;
&lt;br /&gt;
...To complete...&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
An old module is available here: https://www.dolistore.com/product.php?id=1205&amp;amp;title=factura-electronica-colombia-dian&amp;amp;l=en&lt;br /&gt;
We have not enought feedback to know it this module is still valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Danemark=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Finland=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factur-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually onto this platform, or to use a third-party service for submission directly from Dolibarr, for example by using:&lt;br /&gt;
&lt;br /&gt;
*The [[Module Chorus|Chorus Pro Module]] - Subscription from EasyaSolution.&lt;br /&gt;
*The EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
*To develop your own code to interface with Chorus, there is a small tuto on the french forum: https://www.dolibarr.fr/forum/t/connexion-api-chorus-pro-environnement-de-test-qualif/46738&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
*Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
*Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*VAT Real-Time Reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing: From 1/7/2025 all companies are required to issue and receive their invoices in electronic format&lt;br /&gt;
&lt;br /&gt;
Digital delivery note: From 1/4/2025 for companies with a turnover exceeding 200000€ and from 1/10/2025 compulsory for all legal entities&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
E-reporting is implemented by Independent Authority for Public Revenue (IAPR) MyDATA platform&lt;br /&gt;
&lt;br /&gt;
*For Dolibarr versions 13.0.0 - 18.0.4 download *https://github.com/evansgl/dolibarr-mydata/releases/tag/1.8&lt;br /&gt;
*For Dolibarr versions 19.0.0+ use &amp;quot;dolibarr-19 branch&amp;quot; *https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Only for companies with B2G transactions&lt;br /&gt;
*E-reporting: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2019, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
There are two solutions:&lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;Fatturazione elettronica &amp;amp; Professionisti Smart&amp;quot; module: https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html&lt;br /&gt;
*The &amp;quot;Fatture Elettroniche ITA&amp;quot; module available from the site https://doliplatform.com/fatturazione-elettronica/ (Italian Dolibarr Preferred Partner Diciannove Soc. Coop. )&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*https://www.fatturapa.gov.it/en/index.html&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*VAT Real-Time Reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Ireland=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Romania must follow Peppol.&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The obligation for economic operators to invoice electronically is staggered:&lt;br /&gt;
&lt;br /&gt;
*Large economic operators: from 18 May 2022&lt;br /&gt;
*Medium-sized economic operators: from 18 October 2022&lt;br /&gt;
*Small and newly established economic operators: from 18 March 2023&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
While there&#039;s no specific mention of Dolibarr support for Luxembourg e-invoicing, users can likely use the Peppol XML module available for other countries:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: Yes (mandatory as per the timeline above)&lt;br /&gt;
*VAT Real-Time Reporting: Not specifically mentioned&lt;br /&gt;
&lt;br /&gt;
The legal framework is based on:&lt;br /&gt;
&lt;br /&gt;
*Law of 13 December 2021 amending the Law of 16 May 2019 on electronic invoicing in public procurement and concession contracts&lt;br /&gt;
*Grand-Ducal Regulation of 13 December 2021 determining the common delivery network and alternative technical solutions for electronic invoicing&lt;br /&gt;
&lt;br /&gt;
Luxembourg has chosen the Peppol network as the common delivery network for automated receipt of electronic invoices. For economic operators unable to use Peppol, alternative non-automated solutions (online forms) are available through Guichet.lu.&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
CFDI XML&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Mexican electronic format, you need to install a CFDI XML module.&lt;br /&gt;
&lt;br /&gt;
*Sources of such a module are available here: https://github.com/avadnc/cfdixml&lt;br /&gt;
&lt;br /&gt;
*You can find a ready to deploy module file here: https://www.dolistore.com/product.php?id=354&amp;amp;title=mexico-cfdi&amp;amp;l=fr&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
=Netherlands (Peppol BIS Billing 3.0, NLCIUS)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in The Netherlands are NLCIUS (Dutch CIUS) and Peppol BIS Billing 3.0 with country-specific rules equal to NL CIUS.&lt;br /&gt;
Peppol BIS Billing 3.0 is now the preferred format but not mandatory.&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
N/A&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+The+Netherlands (NO VERIFICATION)&lt;br /&gt;
*B2G: N/A&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*VAT Real-Time Reporting: N/A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Norway=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol.&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Poland=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Romania must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Already required (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the follwing module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
=Romania=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Romania must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Already required (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the follwing module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Sweden=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Spain (FacturaE - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain is called FacturaE (European standard EN 16931). VeriFactu is the system and network to send and validate invoices.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
One of the following module is required:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module DoliFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A module called 2FacturaE exists to generated invoices using the invoice in the format expected (https://www.2byte.es/index.php/productos/modulo-2facturae). It was enough for spain.&lt;br /&gt;
&lt;br /&gt;
But this is no more true: In 2025, you must also now have a software that keep tracking of recording payment and invoices into an unalterable way.&lt;br /&gt;
For this you need now the module DoliFactu (https://dolifactu.es/producto/modulo-antifraude-dolibarr/).&lt;br /&gt;
&lt;br /&gt;
Note also that there is also a ready to use hosting service called DoliFactu.es that includes this module by default in its offer.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module LeyAntiFraudeYVeriFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Another solution to be ready and compliant with the VeryFactu system is to install the external module called &amp;quot;Ley antifraude y VeriFactu&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can get the module here: https://www.dolistore.com/fr/modules/2259-Ley-antifraude-y-VeriFactu.html?search_query=verifactu&amp;amp;results=1&lt;br /&gt;
&lt;br /&gt;
Note: As the law is evolving frequently and may depends on your business, you MUST check with your book keeper or your laywer that this suits completely the law and the need of your own business.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: N/A&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*VAT Real-Time Reporting: N/A&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The &amp;quot;red payment slip&amp;quot; (called BV) and an &amp;quot;orange payment slip&amp;quot; (called BVR) is no more required after 2022.&lt;br /&gt;
&lt;br /&gt;
QR-Bill is expected for PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer since the 20th june 2020.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To obtain such a section:&lt;br /&gt;
&lt;br /&gt;
*You can install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html&lt;br /&gt;
*The other option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but the installation of an external PHP library will be requested at the first generation of the PDF.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=United Kingdom=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed).&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed).&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Other / Resources=&lt;br /&gt;
More resources can be found: https://www.tx2.fr/en/2024/01/15/electronic-invoicing-europe-regulations-obligations/&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63799</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=63799"/>
		<updated>2025-08-04T16:27:01Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* Legislation and current status */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
&amp;lt;seo metak=&amp;quot;einvoice, ereporting&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page presents a description of the rules and solutions for electronic invoicing (&#039;&#039;&#039;e-invoicing, e-billing&#039;&#039;&#039;) and &#039;&#039;&#039;e-reporting&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions to read, generate and/or send e-invoice depend on your country...&lt;br /&gt;
&lt;br /&gt;
If your country is not in this list, fee free to develop your own interface module and publish it on any git source repository or packaged as a zip (for the price of your choice) on dolistore.com. But you can also do it as an laternative of an exsiting solution if a module already exists and does not match your need...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Austria=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
== Legislation and current status ==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Austria&lt;br /&gt;
&lt;br /&gt;
*B2G: No&lt;br /&gt;
*B2B: No&lt;br /&gt;
*E-reporting: No&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*E-reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
Note: Belgium already offers a platform called Mercurius, where you can send manually classic invoice to get a Peppol invoice.&lt;br /&gt;
&lt;br /&gt;
A peppol file can be validated here: https://ecosio.com/en/peppol-and-xml-document-validator/#&lt;br /&gt;
&lt;br /&gt;
To know if a peppol file has been published on the peppol network, you can follow this tutorial: https://openpeppol.atlassian.net/wiki/spaces/Belgium/pages/624689399/Ma+facture+a-t-elle+t+bien+re+ue+par+le+client+Quel+est+son+statut&lt;br /&gt;
&lt;br /&gt;
=Columbia=&lt;br /&gt;
==Format==&lt;br /&gt;
Factura Electronica Colombia DIAN&lt;br /&gt;
&lt;br /&gt;
...To complete...&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
An old module is available here: https://www.dolistore.com/product.php?id=1205&amp;amp;title=factura-electronica-colombia-dian&amp;amp;l=en&lt;br /&gt;
We have not enought feedback to know it this module is still valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Danemark=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Finland=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factur-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually onto this platform, or to use a third-party service for submission directly from Dolibarr, for example by using:&lt;br /&gt;
&lt;br /&gt;
*The [[Module Chorus|Chorus Pro Module]] - Subscription from EasyaSolution.&lt;br /&gt;
*The EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
*To develop your own code to interface with Chorus, there is a small tuto on the french forum: https://www.dolibarr.fr/forum/t/connexion-api-chorus-pro-environnement-de-test-qualif/46738&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*E-reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
*Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
*Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*E-reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing: From 1/7/2025 all companies are required to issue and receive their invoices in electronic format&lt;br /&gt;
&lt;br /&gt;
Digital delivery note: From 1/4/2025 for companies with a turnover exceeding 200000€ and from 1/10/2025 compulsory for all legal entities&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
E-reporting is implemented by Independent Authority for Public Revenue (IAPR) MyDATA platform&lt;br /&gt;
&lt;br /&gt;
*For Dolibarr versions 13.0.0 - 18.0.4 download *https://github.com/evansgl/dolibarr-mydata/releases/tag/1.8&lt;br /&gt;
*For Dolibarr versions 19.0.0+ use &amp;quot;dolibarr-19 branch&amp;quot; *https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Only for companies with B2G transactions&lt;br /&gt;
*E-reporting: Yes&lt;br /&gt;
*Digital delivery note: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2019, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
There are two solutions:&lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;Fatturazione elettronica &amp;amp; Professionisti Smart&amp;quot; module: https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html&lt;br /&gt;
*The &amp;quot;Fatture Elettroniche ITA&amp;quot; module available from the site https://doliplatform.com/fatturazione-elettronica/ (Italian Dolibarr Preferred Partner Diciannove Soc. Coop. )&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*https://www.fatturapa.gov.it/en/index.html&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*B2C: Yes&lt;br /&gt;
*E-reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Ireland=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Romania must follow Peppol.&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The obligation for economic operators to invoice electronically is staggered:&lt;br /&gt;
&lt;br /&gt;
*Large economic operators: from 18 May 2022&lt;br /&gt;
*Medium-sized economic operators: from 18 October 2022&lt;br /&gt;
*Small and newly established economic operators: from 18 March 2023&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
While there&#039;s no specific mention of Dolibarr support for Luxembourg e-invoicing, users can likely use the Peppol XML module available for other countries:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: Yes (mandatory as per the timeline above)&lt;br /&gt;
*E-reporting: Not specifically mentioned&lt;br /&gt;
&lt;br /&gt;
The legal framework is based on:&lt;br /&gt;
&lt;br /&gt;
*Law of 13 December 2021 amending the Law of 16 May 2019 on electronic invoicing in public procurement and concession contracts&lt;br /&gt;
*Grand-Ducal Regulation of 13 December 2021 determining the common delivery network and alternative technical solutions for electronic invoicing&lt;br /&gt;
&lt;br /&gt;
Luxembourg has chosen the Peppol network as the common delivery network for automated receipt of electronic invoices. For economic operators unable to use Peppol, alternative non-automated solutions (online forms) are available through Guichet.lu.&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
CFDI XML&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Mexican electronic format, you need to install a CFDI XML module.&lt;br /&gt;
&lt;br /&gt;
*Sources of such a module are available here: https://github.com/avadnc/cfdixml&lt;br /&gt;
&lt;br /&gt;
*You can find a ready to deploy module file here: https://www.dolistore.com/product.php?id=354&amp;amp;title=mexico-cfdi&amp;amp;l=fr&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
=Netherlands (Peppol BIS Billing 3.0, NLCIUS)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in The Netherlands are NLCIUS (Dutch CIUS) and Peppol BIS Billing 3.0 with country-specific rules equal to NL CIUS.&lt;br /&gt;
Peppol BIS Billing 3.0 is now the preferred format but not mandatory.&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
N/A&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+The+Netherlands (NO VERIFICATION)&lt;br /&gt;
*B2G: N/A&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*E-reporting: N/A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Norway=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol.&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Poland=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Romania must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Already required (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the follwing module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client  (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
=Romania=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Romania must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Already required (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
You may try to use the follwing module to transfer your invoice on Peppol: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Sweden=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed)&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed)&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Spain (FacturaE - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain is called FacturaE (European standard EN 16931). VeriFactu is the system and network to send and validate invoices.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
One of the following module is required:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module DoliFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A module called 2FacturaE exists to generated invoices using the invoice in the format expected (https://www.2byte.es/index.php/productos/modulo-2facturae). It was enough for spain.&lt;br /&gt;
&lt;br /&gt;
But this is no more true: In 2025, you must also now have a software that keep tracking of recording payment and invoices into an unalterable way.&lt;br /&gt;
For this you need now the module DoliFactu (https://dolifactu.es/producto/modulo-antifraude-dolibarr/).&lt;br /&gt;
&lt;br /&gt;
Note also that there is also a ready to use hosting service called DoliFactu.es that includes this module by default in its offer.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Module LeyAntiFraudeYVeriFactu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Another solution to be ready and compliant with the VeryFactu system is to install the external module called &amp;quot;Ley antifraude y VeriFactu&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can get the module here: https://www.dolistore.com/fr/modules/2259-Ley-antifraude-y-VeriFactu.html?search_query=verifactu&amp;amp;results=1&lt;br /&gt;
&lt;br /&gt;
Note: As the law is evolving frequently and may depends on your business, you MUST check with your book keeper or your laywer that this suits completely the law and the need of your own business.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: N/A&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*E-reporting: N/A&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The &amp;quot;red payment slip&amp;quot; (called BV) and an &amp;quot;orange payment slip&amp;quot; (called BVR) is no more required after 2022.&lt;br /&gt;
&lt;br /&gt;
QR-Bill is expected for PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer since the 20th june 2020.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To obtain such a section:&lt;br /&gt;
&lt;br /&gt;
*You can install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html&lt;br /&gt;
*The other option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but the installation of an external PHP library will be requested at the first generation of the PDF.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=United Kingdom=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format must follow Peppol (to be confirmed).&lt;br /&gt;
==Timeline==&lt;br /&gt;
Using Peppol is mandatory for invoices sent to administration (to be confirmed).&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you may need to install the module: https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
The following module may also able to generate invoices but may also be able to send the invoice on the Peppol Network: https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client (to be confirmed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Other / Resources=&lt;br /&gt;
More resources can be found: https://www.tx2.fr/en/2024/01/15/electronic-invoicing-europe-regulations-obligations/&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62275</id>
		<title>Create a PDF document template</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62275"/>
		<updated>2025-01-23T23:55:14Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* Library for PDF manipulation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Créer_un_modèle_de_document_PDF]]&lt;br /&gt;
[[es:Crear_un_modelo_de_documento_PDF]]&lt;br /&gt;
[[zh:创建PDF模板]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
&lt;br /&gt;
This page describes how to create your own document-generation module (for proposals, invoices, etc...)&lt;br /&gt;
The tutorial uses Commercial Proposals as an example but the same process is used for any type of document.&lt;br /&gt;
&lt;br /&gt;
Building a PDF template requires some PHP knowledge.&lt;br /&gt;
An ODT template does not require PHP knowledge. To build an ODT template, see this page [[Create an ODT document template]]. &lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
&lt;br /&gt;
*Dolibarr: 3.0+&lt;br /&gt;
*Knowledge in PHP development&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Find a document template that is the closest to your requirements=&lt;br /&gt;
You may review the existing templates by going to the module setup area, the Commercial Proposals setup in this case, and then clicking on the &amp;quot;preview&amp;quot; logo.&lt;br /&gt;
Choose one that is the best match to your needs. In this example, we will use the template &amp;quot;azur&amp;quot; that corresponds to the file&lt;br /&gt;
pdf_propale_azur.modules.php&lt;br /&gt;
&lt;br /&gt;
All document models are in &#039;&#039;&#039;htdocs/core/modules&#039;&#039;&#039;, in subdirectories, for example&lt;br /&gt;
propale for commercial proposals&lt;br /&gt;
facture for invoices&lt;br /&gt;
commande for orders, etc... &lt;br /&gt;
and finally &#039;&#039;&#039;doc&#039;&#039;&#039; or &#039;&#039;&#039;pdf&#039;&#039;&#039;.&lt;br /&gt;
For instance, proposal templates will be located in &#039;&#039;&#039;...core/modules/propale/doc/&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The list of recommended PDF Models :&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Module&lt;br /&gt;
!PDF Model name&lt;br /&gt;
!Dolibarr min version&lt;br /&gt;
|-&lt;br /&gt;
|Shipping&lt;br /&gt;
|espadon&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Order&lt;br /&gt;
|eratosthene&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Invoice&lt;br /&gt;
|sponge&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Proposal/Quotation&lt;br /&gt;
|cyan&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Supplier order&lt;br /&gt;
|cornas&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Delivery&lt;br /&gt;
|storm&lt;br /&gt;
|V13&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Create a new template=&lt;br /&gt;
==For an existing core module==&lt;br /&gt;
Do not directly modify an existing template. &lt;br /&gt;
&lt;br /&gt;
Although it is possible to copy the file of the template used as example into a new name in same directory and edit it to change content it is strongly recommended not to modify any core file or structure(If you want to fix something use the project Github page to propose your changes).&lt;br /&gt;
&lt;br /&gt;
Instead use the [[https://wiki.dolibarr.org/index.php?title=Module_development#Module_creation_with_the_module_builder |Module Builder]] available from v12.0 to create your own module even for just a new template.&lt;br /&gt;
&lt;br /&gt;
For this example, we will call our new module &#039;mymodule&#039; and our template &#039;mycompanyblue&#039;, based on the existing template &#039;cyan&#039;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Copy and paste file pdf_cyan.modules.php into custom/mymodule/core/modules/propale/doc&lt;br /&gt;
*Rename the copy as pdf_mycompanyblue.modules.php&lt;br /&gt;
*Edit the file and make the following changes in the code:&lt;br /&gt;
&lt;br /&gt;
#&#039;class pdf_cyan extends ModelePDFPropales&#039; to &#039;class pdf_mycompanyblue extends ModelePDFPropales&#039;&lt;br /&gt;
#&#039;$this-&amp;gt;name = &amp;quot;cyan&amp;quot;;&#039; to &#039;$this-&amp;gt;name = &amp;quot;mycompanyblue&amp;quot;;&#039;.&lt;br /&gt;
#&#039;$this-&amp;gt;description = $langs-&amp;gt;trans(&#039;DocModelCyanDescription&#039;);&#039; to &#039;$this-&amp;gt;description = $langs-&amp;gt;trans(&#039;DocModelMycompanyblueDescription&#039;);&#039;.&lt;br /&gt;
#Save file.&lt;br /&gt;
&lt;br /&gt;
*Edit the file custom/mymodule/core/modules/modMymodule.class.php and make the following changes in the code:&lt;br /&gt;
&lt;br /&gt;
#&#039;models&#039; =&amp;gt; 0 to &#039;models&#039; =&amp;gt; 1&lt;br /&gt;
#Save file.&lt;br /&gt;
&lt;br /&gt;
*Activate your new module&lt;br /&gt;
&lt;br /&gt;
Now the template will be available in the list of models in the admin settings of proposal.&lt;br /&gt;
&lt;br /&gt;
Test this model (see previous section) before going further.&lt;br /&gt;
&lt;br /&gt;
==For a new module==&lt;br /&gt;
Just use the [[https://wiki.dolibarr.org/index.php?title=Module_development#Module_creation_with_the_module_builder |Module Builder]] AGAIN to create your module. When entering the name of a new object to create, you can also check a checkbox to say that you want to manage documents for such new object. In such a case, two templates will be automatically generated (one ODT template and one PDF template).&lt;br /&gt;
&lt;br /&gt;
The templates will be generated with path:&lt;br /&gt;
&lt;br /&gt;
*custom/mymodule/core/modules/doc/pdf_standard_myobject.class.php&lt;br /&gt;
*custom/mymodule/core/modules/doc/doc_generic_myobject_odt.class.php&lt;br /&gt;
&lt;br /&gt;
=Customize content of your new template=&lt;br /&gt;
Customize the new template:&lt;br /&gt;
&lt;br /&gt;
In file pdf_mycompanyblue.modules.php, look for the function &#039;_pagehead()&#039; function. It is the function that manages the display of the header.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;_pagefooter()&#039; function. It is the function that manages the display of the footer.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;write_file()&#039; function. It is the function that manages the display of the body of PDF.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Library for PDF manipulation==&lt;br /&gt;
The library used to create PDF documents in PHP is called TCPDF and can be found in htdocs/includes/tecnickcom/tcpdf/tcpdf.class.php. This class contains the methods used to generate different parts of documents.&lt;br /&gt;
&lt;br /&gt;
Templates instantiate the TCPDF class and use its methods combined with the specific data of the invoice, order etc.&lt;br /&gt;
&lt;br /&gt;
We can generally find the following calls into templates that generate PDF documents:&lt;br /&gt;
&lt;br /&gt;
*$pdf-&amp;gt;SetFont() - &#039;&#039;Define the font to use for the text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetXY() - &#039;&#039;Define position (X,Y) for next text that will be output onto page&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;MultiCell() - &#039;&#039;Draw a box containing text. Used to output any text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;GetY() - &#039;&#039;Return current Y position&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetDrawColor() - &#039;&#039;Set the color to use for new text to write - ie black (0,0,0) or white (255,255,255)&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;Rect() - &#039;&#039;Draw a rectangle whose top left corner coordinates are defined by two first parameters and bottom right corner is defined by two following parameters that are relative values&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Frame of scripts==&lt;br /&gt;
The PHP script used for generating PDF documents had the following methods (taking as example the model &amp;quot;crabe&amp;quot;) inside the class with the model&#039;s name:&lt;br /&gt;
&lt;br /&gt;
*pdf_crabe() - &#039;&#039;Creator of the object pdf&#039;&#039;&lt;br /&gt;
*write_pdf_file() - &#039;&#039;General method for generating the file. This method calls all the following ones after initializing some variables&#039;&#039;&lt;br /&gt;
*_pagehead() - &#039;&#039;Method for drawing the heading of the document, including in general the logo, the title of the document (and the date) as well as the frames of the issuer and the addressee of the document&#039;&#039;&lt;br /&gt;
*_tableau() - &#039;&#039;Method for drawing the details table (products, services,...)&#039;&#039;&lt;br /&gt;
*_tableau_info() - &#039;&#039;Method for drawing the table containing information list present in the bill&#039;&#039;&lt;br /&gt;
*_tableau_tot() - &#039;&#039;Method for drawing table of Totals&#039;&#039;&lt;br /&gt;
*_tableau_versement() - &#039;&#039;Method for drawing table of payment rules&#039;&#039;&lt;br /&gt;
*_pagefoot() - &#039;&#039;Method for drawing bottom of the page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Examples of customization==&lt;br /&gt;
===Insert a logo===&lt;br /&gt;
&lt;br /&gt;
*Add following instructions&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Image(&#039;\www\htdocs\dolibarr\document\societe\logo.jpg&#039;, 10, 5, 60.00);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With this example: 10=abscissa, 5=ordinate, 60=width of logo&lt;br /&gt;
&lt;br /&gt;
*If the logo is on or outside existing text, remove existing text by commenting the code that outputs the text or by changing its position.&lt;br /&gt;
&lt;br /&gt;
===Insert text===&lt;br /&gt;
Most common function to use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;setX(float a); // set current x position&lt;br /&gt;
$pdf-&amp;gt;setY(float b); // set current y position&lt;br /&gt;
$pdf-&amp;gt;setXY(float a,float b); // fixe les positions x et y courantes&lt;br /&gt;
$pdf-&amp;gt;SetTextColor(0,0,200); // fixe la couleur du texte&lt;br /&gt;
$pdf-&amp;gt;SetFont(&#039;Arial&#039;,&#039;B&#039;,14); // fixe la police, le type ( &#039;B&#039; pour gras, &#039;I&#039; pour italique, &#039;&#039; pour normal,...)&lt;br /&gt;
$pdf-&amp;gt;MultiCell(60, 8, &#039;Mon texte&amp;quot;, 0, &#039;L&#039;); // imprime &#039;Mon texte&#039; avec saut de ligne&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: Origin for setXY functions are the top left corner of page.&lt;br /&gt;
&lt;br /&gt;
===Add a PDF Annotation (comment)===&lt;br /&gt;
&#039;&#039;Left side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(102, 202, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Right side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(202, 102, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add Complementary Attribute (extrafiled)===&lt;br /&gt;
A dedicated page give you some advises how to integrate complementary attributes (extrafields) into PDF models of Dolibarr [[Add Extrafields on PDF Models]]&lt;br /&gt;
&lt;br /&gt;
==More information==&lt;br /&gt;
&lt;br /&gt;
*http://www.fpdf.org/?lang=en&lt;br /&gt;
*List of TCPDF&#039;s methods: tcpdf.org/doc/code/classTCPDF.html&lt;br /&gt;
&lt;br /&gt;
=Activate your new model=&lt;br /&gt;
In page Home =&amp;gt; Setup =&amp;gt; Modules =&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*activate your module&lt;br /&gt;
*eventually, set it as the default model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
&lt;br /&gt;
==Q: My PDF template doesn&#039;t understand foreign characters, it outputs them as ???==&lt;br /&gt;
&lt;br /&gt;
This is probably a font problem, the current font used for generating the PDF cannot handle the foreign characters you are trying to print. So just try to use another font.&lt;br /&gt;
&lt;br /&gt;
You will find the fonts used by Dolibarr to print PDF inside your Dolibarr folder.../includes/tecnickcom/tcpdf/fonts/&lt;br /&gt;
&lt;br /&gt;
To change the font used for generating PDF, you need to edit the &#039;main.lang&#039; file of the language you are using (you&#039;ll find the file in your Dolibarr.../langs/en_US/main.lang for instance if you use English)&lt;br /&gt;
&lt;br /&gt;
*Edit the main.lang file&lt;br /&gt;
*Locate the constant FONTFORPDF at the beginning of the file and change the value to FONTFORPDF=dejavusans for instance if you want to use dejavusans. Please note that sometimes FONTFORPDF may be missing, in this case you should add it at the beginning of the file.&lt;br /&gt;
*Save the file and try again to generate your PDF.&lt;br /&gt;
&lt;br /&gt;
If you are unlucky, you can try with more fonts, just go to the TCPDF website sourceforge.net/projects/tcpdf/files/ and download the latest zip package. Then extract only the &#039;fonts&#039; folder from the zip. Then copy the files in your Dolibarr installation .../includes/tecnickcom/tcpdf/fonts/ so you will get more fonts to play with.&lt;br /&gt;
&lt;br /&gt;
Also, please make a backup of your files modification.&lt;br /&gt;
&lt;br /&gt;
Alternative if this doesn&#039;t work: make sure the Translation class is correctly instantiated and loaded with the correct language inside your PDF templates (stored inside the $langs or $outputlangs variable).&lt;br /&gt;
&lt;br /&gt;
Thanks to Humphrey for the tip.&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62274</id>
		<title>Create a PDF document template</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62274"/>
		<updated>2025-01-23T23:52:46Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* Customize content of your new template */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Créer_un_modèle_de_document_PDF]]&lt;br /&gt;
[[es:Crear_un_modelo_de_documento_PDF]]&lt;br /&gt;
[[zh:创建PDF模板]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
&lt;br /&gt;
This page describes how to create your own document-generation module (for proposals, invoices, etc...)&lt;br /&gt;
The tutorial uses Commercial Proposals as an example but the same process is used for any type of document.&lt;br /&gt;
&lt;br /&gt;
Building a PDF template requires some PHP knowledge.&lt;br /&gt;
An ODT template does not require PHP knowledge. To build an ODT template, see this page [[Create an ODT document template]]. &lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
&lt;br /&gt;
*Dolibarr: 3.0+&lt;br /&gt;
*Knowledge in PHP development&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Find a document template that is the closest to your requirements=&lt;br /&gt;
You may review the existing templates by going to the module setup area, the Commercial Proposals setup in this case, and then clicking on the &amp;quot;preview&amp;quot; logo.&lt;br /&gt;
Choose one that is the best match to your needs. In this example, we will use the template &amp;quot;azur&amp;quot; that corresponds to the file&lt;br /&gt;
pdf_propale_azur.modules.php&lt;br /&gt;
&lt;br /&gt;
All document models are in &#039;&#039;&#039;htdocs/core/modules&#039;&#039;&#039;, in subdirectories, for example&lt;br /&gt;
propale for commercial proposals&lt;br /&gt;
facture for invoices&lt;br /&gt;
commande for orders, etc... &lt;br /&gt;
and finally &#039;&#039;&#039;doc&#039;&#039;&#039; or &#039;&#039;&#039;pdf&#039;&#039;&#039;.&lt;br /&gt;
For instance, proposal templates will be located in &#039;&#039;&#039;...core/modules/propale/doc/&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The list of recommended PDF Models :&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Module&lt;br /&gt;
!PDF Model name&lt;br /&gt;
!Dolibarr min version&lt;br /&gt;
|-&lt;br /&gt;
|Shipping&lt;br /&gt;
|espadon&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Order&lt;br /&gt;
|eratosthene&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Invoice&lt;br /&gt;
|sponge&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Proposal/Quotation&lt;br /&gt;
|cyan&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Supplier order&lt;br /&gt;
|cornas&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Delivery&lt;br /&gt;
|storm&lt;br /&gt;
|V13&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Create a new template=&lt;br /&gt;
==For an existing core module==&lt;br /&gt;
Do not directly modify an existing template. &lt;br /&gt;
&lt;br /&gt;
Although it is possible to copy the file of the template used as example into a new name in same directory and edit it to change content it is strongly recommended not to modify any core file or structure(If you want to fix something use the project Github page to propose your changes).&lt;br /&gt;
&lt;br /&gt;
Instead use the [[https://wiki.dolibarr.org/index.php?title=Module_development#Module_creation_with_the_module_builder |Module Builder]] available from v12.0 to create your own module even for just a new template.&lt;br /&gt;
&lt;br /&gt;
For this example, we will call our new module &#039;mymodule&#039; and our template &#039;mycompanyblue&#039;, based on the existing template &#039;cyan&#039;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Copy and paste file pdf_cyan.modules.php into custom/mymodule/core/modules/propale/doc&lt;br /&gt;
*Rename the copy as pdf_mycompanyblue.modules.php&lt;br /&gt;
*Edit the file and make the following changes in the code:&lt;br /&gt;
&lt;br /&gt;
#&#039;class pdf_cyan extends ModelePDFPropales&#039; to &#039;class pdf_mycompanyblue extends ModelePDFPropales&#039;&lt;br /&gt;
#&#039;$this-&amp;gt;name = &amp;quot;cyan&amp;quot;;&#039; to &#039;$this-&amp;gt;name = &amp;quot;mycompanyblue&amp;quot;;&#039;.&lt;br /&gt;
#&#039;$this-&amp;gt;description = $langs-&amp;gt;trans(&#039;DocModelCyanDescription&#039;);&#039; to &#039;$this-&amp;gt;description = $langs-&amp;gt;trans(&#039;DocModelMycompanyblueDescription&#039;);&#039;.&lt;br /&gt;
#Save file.&lt;br /&gt;
&lt;br /&gt;
*Edit the file custom/mymodule/core/modules/modMymodule.class.php and make the following changes in the code:&lt;br /&gt;
&lt;br /&gt;
#&#039;models&#039; =&amp;gt; 0 to &#039;models&#039; =&amp;gt; 1&lt;br /&gt;
#Save file.&lt;br /&gt;
&lt;br /&gt;
*Activate your new module&lt;br /&gt;
&lt;br /&gt;
Now the template will be available in the list of models in the admin settings of proposal.&lt;br /&gt;
&lt;br /&gt;
Test this model (see previous section) before going further.&lt;br /&gt;
&lt;br /&gt;
==For a new module==&lt;br /&gt;
Just use the [[https://wiki.dolibarr.org/index.php?title=Module_development#Module_creation_with_the_module_builder |Module Builder]] AGAIN to create your module. When entering the name of a new object to create, you can also check a checkbox to say that you want to manage documents for such new object. In such a case, two templates will be automatically generated (one ODT template and one PDF template).&lt;br /&gt;
&lt;br /&gt;
The templates will be generated with path:&lt;br /&gt;
&lt;br /&gt;
*custom/mymodule/core/modules/doc/pdf_standard_myobject.class.php&lt;br /&gt;
*custom/mymodule/core/modules/doc/doc_generic_myobject_odt.class.php&lt;br /&gt;
&lt;br /&gt;
=Customize content of your new template=&lt;br /&gt;
Customize the new template:&lt;br /&gt;
&lt;br /&gt;
In file pdf_mycompanyblue.modules.php, look for the function &#039;_pagehead()&#039; function. It is the function that manages the display of the header.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;_pagefooter()&#039; function. It is the function that manages the display of the footer.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;write_file()&#039; function. It is the function that manages the display of the body of PDF.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Library for PDF manipulation==&lt;br /&gt;
The library used to create PDF documents in PHP is called TCPDF and can be found in htdocs/includes/tcpdf/tcpdf.class.php (or htdocs/includes/tecnickcom/tcpdf/tcpdf.class.php). This class contains the methods used to generate different parts of documents.&lt;br /&gt;
&lt;br /&gt;
Templates instantiate the FPDF class and use its methods combined with the specific data of the invoice, order etc.&lt;br /&gt;
&lt;br /&gt;
We can generally find the following calls into templates that generate PDF documents:&lt;br /&gt;
&lt;br /&gt;
*$pdf-&amp;gt;SetFont() - &#039;&#039;Define the font to use for the text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetXY() - &#039;&#039;Define position (X,Y) for next text that will be output onto page&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;MultiCell() - &#039;&#039;Draw a box containing text. Used to output any text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;GetY() - &#039;&#039;Return current Y position&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetDrawColor() - &#039;&#039;Set the color to use for new text to write - ie black (0,0,0) or white (255,255,255)&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;Rect() - &#039;&#039;Draw a rectangle whose top left corner coordinates are defined by two first parameters and bottom right corner is defined by two following parameters that are relative values&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Frame of scripts==&lt;br /&gt;
The PHP script used for generating PDF documents had the following methods (taking as example the model &amp;quot;crabe&amp;quot;) inside the class with the model&#039;s name:&lt;br /&gt;
&lt;br /&gt;
*pdf_crabe() - &#039;&#039;Creator of the object pdf&#039;&#039;&lt;br /&gt;
*write_pdf_file() - &#039;&#039;General method for generating the file. This method calls all the following ones after initializing some variables&#039;&#039;&lt;br /&gt;
*_pagehead() - &#039;&#039;Method for drawing the heading of the document, including in general the logo, the title of the document (and the date) as well as the frames of the issuer and the addressee of the document&#039;&#039;&lt;br /&gt;
*_tableau() - &#039;&#039;Method for drawing the details table (products, services,...)&#039;&#039;&lt;br /&gt;
*_tableau_info() - &#039;&#039;Method for drawing the table containing information list present in the bill&#039;&#039;&lt;br /&gt;
*_tableau_tot() - &#039;&#039;Method for drawing table of Totals&#039;&#039;&lt;br /&gt;
*_tableau_versement() - &#039;&#039;Method for drawing table of payment rules&#039;&#039;&lt;br /&gt;
*_pagefoot() - &#039;&#039;Method for drawing bottom of the page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Examples of customization==&lt;br /&gt;
===Insert a logo===&lt;br /&gt;
&lt;br /&gt;
*Add following instructions&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Image(&#039;\www\htdocs\dolibarr\document\societe\logo.jpg&#039;, 10, 5, 60.00);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With this example: 10=abscissa, 5=ordinate, 60=width of logo&lt;br /&gt;
&lt;br /&gt;
*If the logo is on or outside existing text, remove existing text by commenting the code that outputs the text or by changing its position.&lt;br /&gt;
&lt;br /&gt;
===Insert text===&lt;br /&gt;
Most common function to use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;setX(float a); // set current x position&lt;br /&gt;
$pdf-&amp;gt;setY(float b); // set current y position&lt;br /&gt;
$pdf-&amp;gt;setXY(float a,float b); // fixe les positions x et y courantes&lt;br /&gt;
$pdf-&amp;gt;SetTextColor(0,0,200); // fixe la couleur du texte&lt;br /&gt;
$pdf-&amp;gt;SetFont(&#039;Arial&#039;,&#039;B&#039;,14); // fixe la police, le type ( &#039;B&#039; pour gras, &#039;I&#039; pour italique, &#039;&#039; pour normal,...)&lt;br /&gt;
$pdf-&amp;gt;MultiCell(60, 8, &#039;Mon texte&amp;quot;, 0, &#039;L&#039;); // imprime &#039;Mon texte&#039; avec saut de ligne&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: Origin for setXY functions are the top left corner of page.&lt;br /&gt;
&lt;br /&gt;
===Add a PDF Annotation (comment)===&lt;br /&gt;
&#039;&#039;Left side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(102, 202, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Right side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(202, 102, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add Complementary Attribute (extrafiled)===&lt;br /&gt;
A dedicated page give you some advises how to integrate complementary attributes (extrafields) into PDF models of Dolibarr [[Add Extrafields on PDF Models]]&lt;br /&gt;
&lt;br /&gt;
==More information==&lt;br /&gt;
&lt;br /&gt;
*http://www.fpdf.org/?lang=en&lt;br /&gt;
*List of TCPDF&#039;s methods: tcpdf.org/doc/code/classTCPDF.html&lt;br /&gt;
&lt;br /&gt;
=Activate your new model=&lt;br /&gt;
In page Home =&amp;gt; Setup =&amp;gt; Modules =&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*activate your module&lt;br /&gt;
*eventually, set it as the default model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
&lt;br /&gt;
==Q: My PDF template doesn&#039;t understand foreign characters, it outputs them as ???==&lt;br /&gt;
&lt;br /&gt;
This is probably a font problem, the current font used for generating the PDF cannot handle the foreign characters you are trying to print. So just try to use another font.&lt;br /&gt;
&lt;br /&gt;
You will find the fonts used by Dolibarr to print PDF inside your Dolibarr folder.../includes/tecnickcom/tcpdf/fonts/&lt;br /&gt;
&lt;br /&gt;
To change the font used for generating PDF, you need to edit the &#039;main.lang&#039; file of the language you are using (you&#039;ll find the file in your Dolibarr.../langs/en_US/main.lang for instance if you use English)&lt;br /&gt;
&lt;br /&gt;
*Edit the main.lang file&lt;br /&gt;
*Locate the constant FONTFORPDF at the beginning of the file and change the value to FONTFORPDF=dejavusans for instance if you want to use dejavusans. Please note that sometimes FONTFORPDF may be missing, in this case you should add it at the beginning of the file.&lt;br /&gt;
*Save the file and try again to generate your PDF.&lt;br /&gt;
&lt;br /&gt;
If you are unlucky, you can try with more fonts, just go to the TCPDF website sourceforge.net/projects/tcpdf/files/ and download the latest zip package. Then extract only the &#039;fonts&#039; folder from the zip. Then copy the files in your Dolibarr installation .../includes/tecnickcom/tcpdf/fonts/ so you will get more fonts to play with.&lt;br /&gt;
&lt;br /&gt;
Also, please make a backup of your files modification.&lt;br /&gt;
&lt;br /&gt;
Alternative if this doesn&#039;t work: make sure the Translation class is correctly instantiated and loaded with the correct language inside your PDF templates (stored inside the $langs or $outputlangs variable).&lt;br /&gt;
&lt;br /&gt;
Thanks to Humphrey for the tip.&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62273</id>
		<title>Create a PDF document template</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62273"/>
		<updated>2025-01-23T23:45:00Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* Create a new template */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Créer_un_modèle_de_document_PDF]]&lt;br /&gt;
[[es:Crear_un_modelo_de_documento_PDF]]&lt;br /&gt;
[[zh:创建PDF模板]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
&lt;br /&gt;
This page describes how to create your own document-generation module (for proposals, invoices, etc...)&lt;br /&gt;
The tutorial uses Commercial Proposals as an example but the same process is used for any type of document.&lt;br /&gt;
&lt;br /&gt;
Building a PDF template requires some PHP knowledge.&lt;br /&gt;
An ODT template does not require PHP knowledge. To build an ODT template, see this page [[Create an ODT document template]]. &lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
&lt;br /&gt;
*Dolibarr: 3.0+&lt;br /&gt;
*Knowledge in PHP development&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Find a document template that is the closest to your requirements=&lt;br /&gt;
You may review the existing templates by going to the module setup area, the Commercial Proposals setup in this case, and then clicking on the &amp;quot;preview&amp;quot; logo.&lt;br /&gt;
Choose one that is the best match to your needs. In this example, we will use the template &amp;quot;azur&amp;quot; that corresponds to the file&lt;br /&gt;
pdf_propale_azur.modules.php&lt;br /&gt;
&lt;br /&gt;
All document models are in &#039;&#039;&#039;htdocs/core/modules&#039;&#039;&#039;, in subdirectories, for example&lt;br /&gt;
propale for commercial proposals&lt;br /&gt;
facture for invoices&lt;br /&gt;
commande for orders, etc... &lt;br /&gt;
and finally &#039;&#039;&#039;doc&#039;&#039;&#039; or &#039;&#039;&#039;pdf&#039;&#039;&#039;.&lt;br /&gt;
For instance, proposal templates will be located in &#039;&#039;&#039;...core/modules/propale/doc/&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The list of recommended PDF Models :&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Module&lt;br /&gt;
!PDF Model name&lt;br /&gt;
!Dolibarr min version&lt;br /&gt;
|-&lt;br /&gt;
|Shipping&lt;br /&gt;
|espadon&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Order&lt;br /&gt;
|eratosthene&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Invoice&lt;br /&gt;
|sponge&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Proposal/Quotation&lt;br /&gt;
|cyan&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Supplier order&lt;br /&gt;
|cornas&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Delivery&lt;br /&gt;
|storm&lt;br /&gt;
|V13&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Create a new template=&lt;br /&gt;
==For an existing core module==&lt;br /&gt;
Do not directly modify an existing template. &lt;br /&gt;
&lt;br /&gt;
Although it is possible to copy the file of the template used as example into a new name in same directory and edit it to change content it is strongly recommended not to modify any core file or structure(If you want to fix something use the project Github page to propose your changes).&lt;br /&gt;
&lt;br /&gt;
Instead use the [[https://wiki.dolibarr.org/index.php?title=Module_development#Module_creation_with_the_module_builder |Module Builder]] available from v12.0 to create your own module even for just a new template.&lt;br /&gt;
&lt;br /&gt;
For this example, we will call our new module &#039;mymodule&#039; and our template &#039;mycompanyblue&#039;, based on the existing template &#039;cyan&#039;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Copy and paste file pdf_cyan.modules.php into custom/mymodule/core/modules/propale/doc&lt;br /&gt;
*Rename the copy as pdf_mycompanyblue.modules.php&lt;br /&gt;
*Edit the file and make the following changes in the code:&lt;br /&gt;
&lt;br /&gt;
#&#039;class pdf_cyan extends ModelePDFPropales&#039; to &#039;class pdf_mycompanyblue extends ModelePDFPropales&#039;&lt;br /&gt;
#&#039;$this-&amp;gt;name = &amp;quot;cyan&amp;quot;;&#039; to &#039;$this-&amp;gt;name = &amp;quot;mycompanyblue&amp;quot;;&#039;.&lt;br /&gt;
#&#039;$this-&amp;gt;description = $langs-&amp;gt;trans(&#039;DocModelCyanDescription&#039;);&#039; to &#039;$this-&amp;gt;description = $langs-&amp;gt;trans(&#039;DocModelMycompanyblueDescription&#039;);&#039;.&lt;br /&gt;
#Save file.&lt;br /&gt;
&lt;br /&gt;
*Edit the file custom/mymodule/core/modules/modMymodule.class.php and make the following changes in the code:&lt;br /&gt;
&lt;br /&gt;
#&#039;models&#039; =&amp;gt; 0 to &#039;models&#039; =&amp;gt; 1&lt;br /&gt;
#Save file.&lt;br /&gt;
&lt;br /&gt;
*Activate your new module&lt;br /&gt;
&lt;br /&gt;
Now the template will be available in the list of models in the admin settings of proposal.&lt;br /&gt;
&lt;br /&gt;
Test this model (see previous section) before going further.&lt;br /&gt;
&lt;br /&gt;
==For a new module==&lt;br /&gt;
Just use the [[https://wiki.dolibarr.org/index.php?title=Module_development#Module_creation_with_the_module_builder |Module Builder]] AGAIN to create your module. When entering the name of a new object to create, you can also check a checkbox to say that you want to manage documents for such new object. In such a case, two templates will be automatically generated (one ODT template and one PDF template).&lt;br /&gt;
&lt;br /&gt;
The templates will be generated with path:&lt;br /&gt;
&lt;br /&gt;
*custom/mymodule/core/modules/doc/pdf_standard_myobject.class.php&lt;br /&gt;
*custom/mymodule/core/modules/doc/doc_generic_myobject_odt.class.php&lt;br /&gt;
&lt;br /&gt;
=Customize content of your new template=&lt;br /&gt;
Customize the new template:&lt;br /&gt;
&lt;br /&gt;
In file pdf_propale_mycompanyblue.modules.php, look for the function &#039;_pagehead()&#039; function. It is the function that manages the display of the header.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;_pagefooter()&#039; function. It is the function that manages the display of the footer.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;write_file()&#039; function. It is the function that manages the display of the body of PDF.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Library for PDF manipulation==&lt;br /&gt;
The library used to create PDF documents in PHP is called TCPDF and can be found in htdocs/includes/tcpdf/tcpdf.class.php (or htdocs/includes/tecnickcom/tcpdf/tcpdf.class.php). This class contains the methods used to generate different parts of documents.&lt;br /&gt;
&lt;br /&gt;
Templates instantiate the FPDF class and use its methods combined with the specific data of the invoice, order etc.&lt;br /&gt;
&lt;br /&gt;
We can generally find the following calls into templates that generate PDF documents:&lt;br /&gt;
&lt;br /&gt;
*$pdf-&amp;gt;SetFont() - &#039;&#039;Define the font to use for the text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetXY() - &#039;&#039;Define position (X,Y) for next text that will be output onto page&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;MultiCell() - &#039;&#039;Draw a box containing text. Used to output any text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;GetY() - &#039;&#039;Return current Y position&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetDrawColor() - &#039;&#039;Set the color to use for new text to write - ie black (0,0,0) or white (255,255,255)&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;Rect() - &#039;&#039;Draw a rectangle whose top left corner coordinates are defined by two first parameters and bottom right corner is defined by two following parameters that are relative values&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Frame of scripts==&lt;br /&gt;
The PHP script used for generating PDF documents had the following methods (taking as example the model &amp;quot;crabe&amp;quot;) inside the class with the model&#039;s name:&lt;br /&gt;
&lt;br /&gt;
*pdf_crabe() - &#039;&#039;Creator of the object pdf&#039;&#039;&lt;br /&gt;
*write_pdf_file() - &#039;&#039;General method for generating the file. This method calls all the following ones after initializing some variables&#039;&#039;&lt;br /&gt;
*_pagehead() - &#039;&#039;Method for drawing the heading of the document, including in general the logo, the title of the document (and the date) as well as the frames of the issuer and the addressee of the document&#039;&#039;&lt;br /&gt;
*_tableau() - &#039;&#039;Method for drawing the details table (products, services,...)&#039;&#039;&lt;br /&gt;
*_tableau_info() - &#039;&#039;Method for drawing the table containing information list present in the bill&#039;&#039;&lt;br /&gt;
*_tableau_tot() - &#039;&#039;Method for drawing table of Totals&#039;&#039;&lt;br /&gt;
*_tableau_versement() - &#039;&#039;Method for drawing table of payment rules&#039;&#039;&lt;br /&gt;
*_pagefoot() - &#039;&#039;Method for drawing bottom of the page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Examples of customization==&lt;br /&gt;
===Insert a logo===&lt;br /&gt;
&lt;br /&gt;
*Add following instructions&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Image(&#039;\www\htdocs\dolibarr\document\societe\logo.jpg&#039;, 10, 5, 60.00);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With this example: 10=abscissa, 5=ordinate, 60=width of logo&lt;br /&gt;
&lt;br /&gt;
*If the logo is on or outside existing text, remove existing text by commenting the code that outputs the text or by changing its position.&lt;br /&gt;
&lt;br /&gt;
===Insert text===&lt;br /&gt;
Most common function to use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;setX(float a); // set current x position&lt;br /&gt;
$pdf-&amp;gt;setY(float b); // set current y position&lt;br /&gt;
$pdf-&amp;gt;setXY(float a,float b); // fixe les positions x et y courantes&lt;br /&gt;
$pdf-&amp;gt;SetTextColor(0,0,200); // fixe la couleur du texte&lt;br /&gt;
$pdf-&amp;gt;SetFont(&#039;Arial&#039;,&#039;B&#039;,14); // fixe la police, le type ( &#039;B&#039; pour gras, &#039;I&#039; pour italique, &#039;&#039; pour normal,...)&lt;br /&gt;
$pdf-&amp;gt;MultiCell(60, 8, &#039;Mon texte&amp;quot;, 0, &#039;L&#039;); // imprime &#039;Mon texte&#039; avec saut de ligne&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: Origin for setXY functions are the top left corner of page.&lt;br /&gt;
&lt;br /&gt;
===Add a PDF Annotation (comment)===&lt;br /&gt;
&#039;&#039;Left side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(102, 202, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Right side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(202, 102, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add Complementary Attribute (extrafiled)===&lt;br /&gt;
A dedicated page give you some advises how to integrate complementary attributes (extrafields) into PDF models of Dolibarr [[Add Extrafields on PDF Models]]&lt;br /&gt;
&lt;br /&gt;
==More information==&lt;br /&gt;
&lt;br /&gt;
*http://www.fpdf.org/?lang=en&lt;br /&gt;
*List of TCPDF&#039;s methods: tcpdf.org/doc/code/classTCPDF.html&lt;br /&gt;
&lt;br /&gt;
=Activate your new model=&lt;br /&gt;
In page Home =&amp;gt; Setup =&amp;gt; Modules =&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*activate your module&lt;br /&gt;
*eventually, set it as the default model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
&lt;br /&gt;
==Q: My PDF template doesn&#039;t understand foreign characters, it outputs them as ???==&lt;br /&gt;
&lt;br /&gt;
This is probably a font problem, the current font used for generating the PDF cannot handle the foreign characters you are trying to print. So just try to use another font.&lt;br /&gt;
&lt;br /&gt;
You will find the fonts used by Dolibarr to print PDF inside your Dolibarr folder.../includes/tecnickcom/tcpdf/fonts/&lt;br /&gt;
&lt;br /&gt;
To change the font used for generating PDF, you need to edit the &#039;main.lang&#039; file of the language you are using (you&#039;ll find the file in your Dolibarr.../langs/en_US/main.lang for instance if you use English)&lt;br /&gt;
&lt;br /&gt;
*Edit the main.lang file&lt;br /&gt;
*Locate the constant FONTFORPDF at the beginning of the file and change the value to FONTFORPDF=dejavusans for instance if you want to use dejavusans. Please note that sometimes FONTFORPDF may be missing, in this case you should add it at the beginning of the file.&lt;br /&gt;
*Save the file and try again to generate your PDF.&lt;br /&gt;
&lt;br /&gt;
If you are unlucky, you can try with more fonts, just go to the TCPDF website sourceforge.net/projects/tcpdf/files/ and download the latest zip package. Then extract only the &#039;fonts&#039; folder from the zip. Then copy the files in your Dolibarr installation .../includes/tecnickcom/tcpdf/fonts/ so you will get more fonts to play with.&lt;br /&gt;
&lt;br /&gt;
Also, please make a backup of your files modification.&lt;br /&gt;
&lt;br /&gt;
Alternative if this doesn&#039;t work: make sure the Translation class is correctly instantiated and loaded with the correct language inside your PDF templates (stored inside the $langs or $outputlangs variable).&lt;br /&gt;
&lt;br /&gt;
Thanks to Humphrey for the tip.&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62272</id>
		<title>Create a PDF document template</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62272"/>
		<updated>2025-01-23T23:43:42Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* For an existing core module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Créer_un_modèle_de_document_PDF]]&lt;br /&gt;
[[es:Crear_un_modelo_de_documento_PDF]]&lt;br /&gt;
[[zh:创建PDF模板]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
&lt;br /&gt;
This page describes how to create your own document-generation module (for proposals, invoices, etc...)&lt;br /&gt;
The tutorial uses Commercial Proposals as an example but the same process is used for any type of document.&lt;br /&gt;
&lt;br /&gt;
Building a PDF template requires some PHP knowledge.&lt;br /&gt;
An ODT template does not require PHP knowledge. To build an ODT template, see this page [[Create an ODT document template]]. &lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
&lt;br /&gt;
*Dolibarr: 3.0+&lt;br /&gt;
*Knowledge in PHP development&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Find a document template that is the closest to your requirements=&lt;br /&gt;
You may review the existing templates by going to the module setup area, the Commercial Proposals setup in this case, and then clicking on the &amp;quot;preview&amp;quot; logo.&lt;br /&gt;
Choose one that is the best match to your needs. In this example, we will use the template &amp;quot;azur&amp;quot; that corresponds to the file&lt;br /&gt;
pdf_propale_azur.modules.php&lt;br /&gt;
&lt;br /&gt;
All document models are in &#039;&#039;&#039;htdocs/core/modules&#039;&#039;&#039;, in subdirectories, for example&lt;br /&gt;
propale for commercial proposals&lt;br /&gt;
facture for invoices&lt;br /&gt;
commande for orders, etc... &lt;br /&gt;
and finally &#039;&#039;&#039;doc&#039;&#039;&#039; or &#039;&#039;&#039;pdf&#039;&#039;&#039;.&lt;br /&gt;
For instance, proposal templates will be located in &#039;&#039;&#039;...core/modules/propale/doc/&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The list of recommended PDF Models :&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Module&lt;br /&gt;
!PDF Model name&lt;br /&gt;
!Dolibarr min version&lt;br /&gt;
|-&lt;br /&gt;
|Shipping&lt;br /&gt;
|espadon&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Order&lt;br /&gt;
|eratosthene&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Invoice&lt;br /&gt;
|sponge&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Proposal/Quotation&lt;br /&gt;
|cyan&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Supplier order&lt;br /&gt;
|cornas&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Delivery&lt;br /&gt;
|storm&lt;br /&gt;
|V13&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Create a new template=&lt;br /&gt;
==For an existing core module==&lt;br /&gt;
Do not directly modify an existing template. &lt;br /&gt;
&lt;br /&gt;
Although it is possible to copy the file of the template used as example into a new name in same directory and edit it to change content it is strongly recommended not to modify any core file or structure(If you want to fix something use the project Github page to propose your changes).&lt;br /&gt;
&lt;br /&gt;
Instead use the [[https://wiki.dolibarr.org/index.php?title=Module_development#Module_creation_with_the_module_builder |Module Builder]] available from v12.0 to create your own module even for just a new template.&lt;br /&gt;
&lt;br /&gt;
For this example, we will call our new module &#039;mymodule&#039; and our template &#039;mycompanyblue&#039;, based on the existing template &#039;cyan&#039;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Copy and paste file pdf_cyan.modules.php into custom/mymodule/core/modules/propale/doc&lt;br /&gt;
*Rename the copy as pdf_mycompanyblue.modules.php&lt;br /&gt;
*Edit the file and make the following changes in the code:&lt;br /&gt;
&lt;br /&gt;
#&#039;class pdf_cyan extends ModelePDFPropales&#039; to &#039;class pdf_mycompanyblue extends ModelePDFPropales&#039;&lt;br /&gt;
#&#039;$this-&amp;gt;name = &amp;quot;cyan&amp;quot;;&#039; to &#039;$this-&amp;gt;name = &amp;quot;mycompanyblue&amp;quot;;&#039;.&lt;br /&gt;
#&#039;$this-&amp;gt;description = $langs-&amp;gt;trans(&#039;DocModelCyanDescription&#039;);&#039; to &#039;$this-&amp;gt;description = $langs-&amp;gt;trans(&#039;DocModelMycompanyblueDescription&#039;);&#039;.&lt;br /&gt;
#Save file.&lt;br /&gt;
&lt;br /&gt;
*Edit the file custom/mymodule/core/modules/modMymodule.class.php and make the following changes in the code:&lt;br /&gt;
&lt;br /&gt;
#&#039;models&#039; =&amp;gt; 0 to &#039;models&#039; =&amp;gt; 1&lt;br /&gt;
#Save file.&lt;br /&gt;
&lt;br /&gt;
*Activate your new module&lt;br /&gt;
&lt;br /&gt;
Now the template will be available in the list of models in the admin settings of proposal.&lt;br /&gt;
&lt;br /&gt;
Test this model (see previous section) before going further.&lt;br /&gt;
&lt;br /&gt;
==For a new module==&lt;br /&gt;
Just use the [[Module Builder]] from v12.0 to create your module. When entering the name of a new object to create, you can also check a checkbox to say that you want to manage documents for such new object. In such a case, two templates will be automatically generated (one ODT template and one PDF template).&lt;br /&gt;
&lt;br /&gt;
The templates will be generated with path:&lt;br /&gt;
&lt;br /&gt;
*custom/mymodule/core/modules/doc/pdf_standard_myobject.class.php&lt;br /&gt;
*custom/mymodule/core/modules/doc/doc_generic_myobject_odt.class.php&lt;br /&gt;
&lt;br /&gt;
=Customize content of your new template=&lt;br /&gt;
Customize the new template:&lt;br /&gt;
&lt;br /&gt;
In file pdf_propale_mycompanyblue.modules.php, look for the function &#039;_pagehead()&#039; function. It is the function that manages the display of the header.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;_pagefooter()&#039; function. It is the function that manages the display of the footer.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;write_file()&#039; function. It is the function that manages the display of the body of PDF.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Library for PDF manipulation==&lt;br /&gt;
The library used to create PDF documents in PHP is called TCPDF and can be found in htdocs/includes/tcpdf/tcpdf.class.php (or htdocs/includes/tecnickcom/tcpdf/tcpdf.class.php). This class contains the methods used to generate different parts of documents.&lt;br /&gt;
&lt;br /&gt;
Templates instantiate the FPDF class and use its methods combined with the specific data of the invoice, order etc.&lt;br /&gt;
&lt;br /&gt;
We can generally find the following calls into templates that generate PDF documents:&lt;br /&gt;
&lt;br /&gt;
*$pdf-&amp;gt;SetFont() - &#039;&#039;Define the font to use for the text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetXY() - &#039;&#039;Define position (X,Y) for next text that will be output onto page&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;MultiCell() - &#039;&#039;Draw a box containing text. Used to output any text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;GetY() - &#039;&#039;Return current Y position&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetDrawColor() - &#039;&#039;Set the color to use for new text to write - ie black (0,0,0) or white (255,255,255)&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;Rect() - &#039;&#039;Draw a rectangle whose top left corner coordinates are defined by two first parameters and bottom right corner is defined by two following parameters that are relative values&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Frame of scripts==&lt;br /&gt;
The PHP script used for generating PDF documents had the following methods (taking as example the model &amp;quot;crabe&amp;quot;) inside the class with the model&#039;s name:&lt;br /&gt;
&lt;br /&gt;
*pdf_crabe() - &#039;&#039;Creator of the object pdf&#039;&#039;&lt;br /&gt;
*write_pdf_file() - &#039;&#039;General method for generating the file. This method calls all the following ones after initializing some variables&#039;&#039;&lt;br /&gt;
*_pagehead() - &#039;&#039;Method for drawing the heading of the document, including in general the logo, the title of the document (and the date) as well as the frames of the issuer and the addressee of the document&#039;&#039;&lt;br /&gt;
*_tableau() - &#039;&#039;Method for drawing the details table (products, services,...)&#039;&#039;&lt;br /&gt;
*_tableau_info() - &#039;&#039;Method for drawing the table containing information list present in the bill&#039;&#039;&lt;br /&gt;
*_tableau_tot() - &#039;&#039;Method for drawing table of Totals&#039;&#039;&lt;br /&gt;
*_tableau_versement() - &#039;&#039;Method for drawing table of payment rules&#039;&#039;&lt;br /&gt;
*_pagefoot() - &#039;&#039;Method for drawing bottom of the page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Examples of customization==&lt;br /&gt;
===Insert a logo===&lt;br /&gt;
&lt;br /&gt;
*Add following instructions&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Image(&#039;\www\htdocs\dolibarr\document\societe\logo.jpg&#039;, 10, 5, 60.00);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With this example: 10=abscissa, 5=ordinate, 60=width of logo&lt;br /&gt;
&lt;br /&gt;
*If the logo is on or outside existing text, remove existing text by commenting the code that outputs the text or by changing its position.&lt;br /&gt;
&lt;br /&gt;
===Insert text===&lt;br /&gt;
Most common function to use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;setX(float a); // set current x position&lt;br /&gt;
$pdf-&amp;gt;setY(float b); // set current y position&lt;br /&gt;
$pdf-&amp;gt;setXY(float a,float b); // fixe les positions x et y courantes&lt;br /&gt;
$pdf-&amp;gt;SetTextColor(0,0,200); // fixe la couleur du texte&lt;br /&gt;
$pdf-&amp;gt;SetFont(&#039;Arial&#039;,&#039;B&#039;,14); // fixe la police, le type ( &#039;B&#039; pour gras, &#039;I&#039; pour italique, &#039;&#039; pour normal,...)&lt;br /&gt;
$pdf-&amp;gt;MultiCell(60, 8, &#039;Mon texte&amp;quot;, 0, &#039;L&#039;); // imprime &#039;Mon texte&#039; avec saut de ligne&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: Origin for setXY functions are the top left corner of page.&lt;br /&gt;
&lt;br /&gt;
===Add a PDF Annotation (comment)===&lt;br /&gt;
&#039;&#039;Left side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(102, 202, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Right side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(202, 102, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add Complementary Attribute (extrafiled)===&lt;br /&gt;
A dedicated page give you some advises how to integrate complementary attributes (extrafields) into PDF models of Dolibarr [[Add Extrafields on PDF Models]]&lt;br /&gt;
&lt;br /&gt;
==More information==&lt;br /&gt;
&lt;br /&gt;
*http://www.fpdf.org/?lang=en&lt;br /&gt;
*List of TCPDF&#039;s methods: tcpdf.org/doc/code/classTCPDF.html&lt;br /&gt;
&lt;br /&gt;
=Activate your new model=&lt;br /&gt;
In page Home =&amp;gt; Setup =&amp;gt; Modules =&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*activate your module&lt;br /&gt;
*eventually, set it as the default model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
&lt;br /&gt;
==Q: My PDF template doesn&#039;t understand foreign characters, it outputs them as ???==&lt;br /&gt;
&lt;br /&gt;
This is probably a font problem, the current font used for generating the PDF cannot handle the foreign characters you are trying to print. So just try to use another font.&lt;br /&gt;
&lt;br /&gt;
You will find the fonts used by Dolibarr to print PDF inside your Dolibarr folder.../includes/tecnickcom/tcpdf/fonts/&lt;br /&gt;
&lt;br /&gt;
To change the font used for generating PDF, you need to edit the &#039;main.lang&#039; file of the language you are using (you&#039;ll find the file in your Dolibarr.../langs/en_US/main.lang for instance if you use English)&lt;br /&gt;
&lt;br /&gt;
*Edit the main.lang file&lt;br /&gt;
*Locate the constant FONTFORPDF at the beginning of the file and change the value to FONTFORPDF=dejavusans for instance if you want to use dejavusans. Please note that sometimes FONTFORPDF may be missing, in this case you should add it at the beginning of the file.&lt;br /&gt;
*Save the file and try again to generate your PDF.&lt;br /&gt;
&lt;br /&gt;
If you are unlucky, you can try with more fonts, just go to the TCPDF website sourceforge.net/projects/tcpdf/files/ and download the latest zip package. Then extract only the &#039;fonts&#039; folder from the zip. Then copy the files in your Dolibarr installation .../includes/tecnickcom/tcpdf/fonts/ so you will get more fonts to play with.&lt;br /&gt;
&lt;br /&gt;
Also, please make a backup of your files modification.&lt;br /&gt;
&lt;br /&gt;
Alternative if this doesn&#039;t work: make sure the Translation class is correctly instantiated and loaded with the correct language inside your PDF templates (stored inside the $langs or $outputlangs variable).&lt;br /&gt;
&lt;br /&gt;
Thanks to Humphrey for the tip.&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62271</id>
		<title>Create a PDF document template</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62271"/>
		<updated>2025-01-23T23:40:28Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* For an existing core module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Créer_un_modèle_de_document_PDF]]&lt;br /&gt;
[[es:Crear_un_modelo_de_documento_PDF]]&lt;br /&gt;
[[zh:创建PDF模板]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
&lt;br /&gt;
This page describes how to create your own document-generation module (for proposals, invoices, etc...)&lt;br /&gt;
The tutorial uses Commercial Proposals as an example but the same process is used for any type of document.&lt;br /&gt;
&lt;br /&gt;
Building a PDF template requires some PHP knowledge.&lt;br /&gt;
An ODT template does not require PHP knowledge. To build an ODT template, see this page [[Create an ODT document template]]. &lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
&lt;br /&gt;
*Dolibarr: 3.0+&lt;br /&gt;
*Knowledge in PHP development&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Find a document template that is the closest to your requirements=&lt;br /&gt;
You may review the existing templates by going to the module setup area, the Commercial Proposals setup in this case, and then clicking on the &amp;quot;preview&amp;quot; logo.&lt;br /&gt;
Choose one that is the best match to your needs. In this example, we will use the template &amp;quot;azur&amp;quot; that corresponds to the file&lt;br /&gt;
pdf_propale_azur.modules.php&lt;br /&gt;
&lt;br /&gt;
All document models are in &#039;&#039;&#039;htdocs/core/modules&#039;&#039;&#039;, in subdirectories, for example&lt;br /&gt;
propale for commercial proposals&lt;br /&gt;
facture for invoices&lt;br /&gt;
commande for orders, etc... &lt;br /&gt;
and finally &#039;&#039;&#039;doc&#039;&#039;&#039; or &#039;&#039;&#039;pdf&#039;&#039;&#039;.&lt;br /&gt;
For instance, proposal templates will be located in &#039;&#039;&#039;...core/modules/propale/doc/&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The list of recommended PDF Models :&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Module&lt;br /&gt;
!PDF Model name&lt;br /&gt;
!Dolibarr min version&lt;br /&gt;
|-&lt;br /&gt;
|Shipping&lt;br /&gt;
|espadon&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Order&lt;br /&gt;
|eratosthene&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Invoice&lt;br /&gt;
|sponge&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Proposal/Quotation&lt;br /&gt;
|cyan&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Supplier order&lt;br /&gt;
|cornas&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Delivery&lt;br /&gt;
|storm&lt;br /&gt;
|V13&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Create a new template=&lt;br /&gt;
==For an existing core module==&lt;br /&gt;
Do not directly modify an existing template. &lt;br /&gt;
&lt;br /&gt;
Although it is possible to copy the file of the template used as example into a new name in same directory and edit it to change content it is strongly recommended not to modify any core file or structure(If you want to fix something use the project Github page to propose your changes).&lt;br /&gt;
&lt;br /&gt;
Instead use the [[https://wiki.dolibarr.org/index.php?title=Module_development#Module_creation_with_the_module_builder |Module Builder]] available from v12.0 to create your own module even for just a new template.&lt;br /&gt;
&lt;br /&gt;
For this example, we will call our new module &#039;mymodule&#039; and our template &#039;mycompanyblue&#039;, based on the existing template &#039;cyan&#039;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Copy and paste file pdf_cyan.modules.php into custom/mymodule/core/modules/propale/doc&lt;br /&gt;
*Rename the copy as pdf_mycompanyblue.modules.php&lt;br /&gt;
*Edit the file and make the following changes in the code:&lt;br /&gt;
&lt;br /&gt;
#&#039;class pdf_cyan extends ModelePDFPropales&#039; to &#039;class pdf_mycompanyblue extends ModelePDFPropales&#039;&lt;br /&gt;
#&#039;$this-&amp;gt;name = &amp;quot;cyan&amp;quot;;&#039; to &#039;$this-&amp;gt;name = &amp;quot;mycompanyblue&amp;quot;;&#039;.&lt;br /&gt;
#&#039;$this-&amp;gt;description = $langs-&amp;gt;trans(&#039;DocModelCyanDescription&#039;);&#039; to &#039;$this-&amp;gt;description = $langs-&amp;gt;trans(&#039;DocModelCyanDescription&#039;);&#039;.&lt;br /&gt;
#Save file.&lt;br /&gt;
&lt;br /&gt;
* Edit the file custom/mymodule/core/modules/modMymodule.class.php and make the following changes in the code:&lt;br /&gt;
&lt;br /&gt;
# &#039;models&#039; =&amp;gt; 0 to &#039;models&#039; =&amp;gt; 1&lt;br /&gt;
# Save file.&lt;br /&gt;
* Activate your new module&lt;br /&gt;
&lt;br /&gt;
Now the template will be available in the list of models in the admin settings of proposal.&lt;br /&gt;
&lt;br /&gt;
Test this model (see previous section) before going further.&lt;br /&gt;
&lt;br /&gt;
==For a new module==&lt;br /&gt;
Just use the [[Module Builder]] from v12.0 to create your module. When entering the name of a new object to create, you can also check a checkbox to say that you want to manage documents for such new object. In such a case, two templates will be automatically generated (one ODT template and one PDF template).&lt;br /&gt;
&lt;br /&gt;
The templates will be generated with path:&lt;br /&gt;
&lt;br /&gt;
*custom/mymodule/core/modules/doc/pdf_standard_myobject.class.php&lt;br /&gt;
*custom/mymodule/core/modules/doc/doc_generic_myobject_odt.class.php&lt;br /&gt;
&lt;br /&gt;
=Customize content of your new template=&lt;br /&gt;
Customize the new template:&lt;br /&gt;
&lt;br /&gt;
In file pdf_propale_mycompanyblue.modules.php, look for the function &#039;_pagehead()&#039; function. It is the function that manages the display of the header.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;_pagefooter()&#039; function. It is the function that manages the display of the footer.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;write_file()&#039; function. It is the function that manages the display of the body of PDF.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Library for PDF manipulation==&lt;br /&gt;
The library used to create PDF documents in PHP is called TCPDF and can be found in htdocs/includes/tcpdf/tcpdf.class.php (or htdocs/includes/tecnickcom/tcpdf/tcpdf.class.php). This class contains the methods used to generate different parts of documents.&lt;br /&gt;
&lt;br /&gt;
Templates instantiate the FPDF class and use its methods combined with the specific data of the invoice, order etc.&lt;br /&gt;
&lt;br /&gt;
We can generally find the following calls into templates that generate PDF documents:&lt;br /&gt;
&lt;br /&gt;
*$pdf-&amp;gt;SetFont() - &#039;&#039;Define the font to use for the text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetXY() - &#039;&#039;Define position (X,Y) for next text that will be output onto page&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;MultiCell() - &#039;&#039;Draw a box containing text. Used to output any text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;GetY() - &#039;&#039;Return current Y position&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetDrawColor() - &#039;&#039;Set the color to use for new text to write - ie black (0,0,0) or white (255,255,255)&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;Rect() - &#039;&#039;Draw a rectangle whose top left corner coordinates are defined by two first parameters and bottom right corner is defined by two following parameters that are relative values&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Frame of scripts==&lt;br /&gt;
The PHP script used for generating PDF documents had the following methods (taking as example the model &amp;quot;crabe&amp;quot;) inside the class with the model&#039;s name:&lt;br /&gt;
&lt;br /&gt;
*pdf_crabe() - &#039;&#039;Creator of the object pdf&#039;&#039;&lt;br /&gt;
*write_pdf_file() - &#039;&#039;General method for generating the file. This method calls all the following ones after initializing some variables&#039;&#039;&lt;br /&gt;
*_pagehead() - &#039;&#039;Method for drawing the heading of the document, including in general the logo, the title of the document (and the date) as well as the frames of the issuer and the addressee of the document&#039;&#039;&lt;br /&gt;
*_tableau() - &#039;&#039;Method for drawing the details table (products, services,...)&#039;&#039;&lt;br /&gt;
*_tableau_info() - &#039;&#039;Method for drawing the table containing information list present in the bill&#039;&#039;&lt;br /&gt;
*_tableau_tot() - &#039;&#039;Method for drawing table of Totals&#039;&#039;&lt;br /&gt;
*_tableau_versement() - &#039;&#039;Method for drawing table of payment rules&#039;&#039;&lt;br /&gt;
*_pagefoot() - &#039;&#039;Method for drawing bottom of the page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Examples of customization==&lt;br /&gt;
===Insert a logo===&lt;br /&gt;
&lt;br /&gt;
*Add following instructions&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Image(&#039;\www\htdocs\dolibarr\document\societe\logo.jpg&#039;, 10, 5, 60.00);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With this example: 10=abscissa, 5=ordinate, 60=width of logo&lt;br /&gt;
&lt;br /&gt;
*If the logo is on or outside existing text, remove existing text by commenting the code that outputs the text or by changing its position.&lt;br /&gt;
&lt;br /&gt;
===Insert text===&lt;br /&gt;
Most common function to use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;setX(float a); // set current x position&lt;br /&gt;
$pdf-&amp;gt;setY(float b); // set current y position&lt;br /&gt;
$pdf-&amp;gt;setXY(float a,float b); // fixe les positions x et y courantes&lt;br /&gt;
$pdf-&amp;gt;SetTextColor(0,0,200); // fixe la couleur du texte&lt;br /&gt;
$pdf-&amp;gt;SetFont(&#039;Arial&#039;,&#039;B&#039;,14); // fixe la police, le type ( &#039;B&#039; pour gras, &#039;I&#039; pour italique, &#039;&#039; pour normal,...)&lt;br /&gt;
$pdf-&amp;gt;MultiCell(60, 8, &#039;Mon texte&amp;quot;, 0, &#039;L&#039;); // imprime &#039;Mon texte&#039; avec saut de ligne&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: Origin for setXY functions are the top left corner of page.&lt;br /&gt;
&lt;br /&gt;
===Add a PDF Annotation (comment)===&lt;br /&gt;
&#039;&#039;Left side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(102, 202, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Right side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(202, 102, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add Complementary Attribute (extrafiled)===&lt;br /&gt;
A dedicated page give you some advises how to integrate complementary attributes (extrafields) into PDF models of Dolibarr [[Add Extrafields on PDF Models]]&lt;br /&gt;
&lt;br /&gt;
==More information==&lt;br /&gt;
&lt;br /&gt;
*http://www.fpdf.org/?lang=en&lt;br /&gt;
*List of TCPDF&#039;s methods: tcpdf.org/doc/code/classTCPDF.html&lt;br /&gt;
&lt;br /&gt;
=Activate your new model=&lt;br /&gt;
In page Home =&amp;gt; Setup =&amp;gt; Modules =&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*activate your module&lt;br /&gt;
*eventually, set it as the default model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
&lt;br /&gt;
==Q: My PDF template doesn&#039;t understand foreign characters, it outputs them as ???==&lt;br /&gt;
&lt;br /&gt;
This is probably a font problem, the current font used for generating the PDF cannot handle the foreign characters you are trying to print. So just try to use another font.&lt;br /&gt;
&lt;br /&gt;
You will find the fonts used by Dolibarr to print PDF inside your Dolibarr folder.../includes/tecnickcom/tcpdf/fonts/&lt;br /&gt;
&lt;br /&gt;
To change the font used for generating PDF, you need to edit the &#039;main.lang&#039; file of the language you are using (you&#039;ll find the file in your Dolibarr.../langs/en_US/main.lang for instance if you use English)&lt;br /&gt;
&lt;br /&gt;
*Edit the main.lang file&lt;br /&gt;
*Locate the constant FONTFORPDF at the beginning of the file and change the value to FONTFORPDF=dejavusans for instance if you want to use dejavusans. Please note that sometimes FONTFORPDF may be missing, in this case you should add it at the beginning of the file.&lt;br /&gt;
*Save the file and try again to generate your PDF.&lt;br /&gt;
&lt;br /&gt;
If you are unlucky, you can try with more fonts, just go to the TCPDF website sourceforge.net/projects/tcpdf/files/ and download the latest zip package. Then extract only the &#039;fonts&#039; folder from the zip. Then copy the files in your Dolibarr installation .../includes/tecnickcom/tcpdf/fonts/ so you will get more fonts to play with.&lt;br /&gt;
&lt;br /&gt;
Also, please make a backup of your files modification.&lt;br /&gt;
&lt;br /&gt;
Alternative if this doesn&#039;t work: make sure the Translation class is correctly instantiated and loaded with the correct language inside your PDF templates (stored inside the $langs or $outputlangs variable).&lt;br /&gt;
&lt;br /&gt;
Thanks to Humphrey for the tip.&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62270</id>
		<title>Create a PDF document template</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62270"/>
		<updated>2025-01-23T23:30:20Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* For an existing core module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Créer_un_modèle_de_document_PDF]]&lt;br /&gt;
[[es:Crear_un_modelo_de_documento_PDF]]&lt;br /&gt;
[[zh:创建PDF模板]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
&lt;br /&gt;
This page describes how to create your own document-generation module (for proposals, invoices, etc...)&lt;br /&gt;
The tutorial uses Commercial Proposals as an example but the same process is used for any type of document.&lt;br /&gt;
&lt;br /&gt;
Building a PDF template requires some PHP knowledge.&lt;br /&gt;
An ODT template does not require PHP knowledge. To build an ODT template, see this page [[Create an ODT document template]]. &lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
&lt;br /&gt;
*Dolibarr: 3.0+&lt;br /&gt;
*Knowledge in PHP development&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Find a document template that is the closest to your requirements=&lt;br /&gt;
You may review the existing templates by going to the module setup area, the Commercial Proposals setup in this case, and then clicking on the &amp;quot;preview&amp;quot; logo.&lt;br /&gt;
Choose one that is the best match to your needs. In this example, we will use the template &amp;quot;azur&amp;quot; that corresponds to the file&lt;br /&gt;
pdf_propale_azur.modules.php&lt;br /&gt;
&lt;br /&gt;
All document models are in &#039;&#039;&#039;htdocs/core/modules&#039;&#039;&#039;, in subdirectories, for example&lt;br /&gt;
propale for commercial proposals&lt;br /&gt;
facture for invoices&lt;br /&gt;
commande for orders, etc... &lt;br /&gt;
and finally &#039;&#039;&#039;doc&#039;&#039;&#039; or &#039;&#039;&#039;pdf&#039;&#039;&#039;.&lt;br /&gt;
For instance, proposal templates will be located in &#039;&#039;&#039;...core/modules/propale/doc/&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The list of recommended PDF Models :&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Module&lt;br /&gt;
!PDF Model name&lt;br /&gt;
!Dolibarr min version&lt;br /&gt;
|-&lt;br /&gt;
|Shipping&lt;br /&gt;
|espadon&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Order&lt;br /&gt;
|eratosthene&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Invoice&lt;br /&gt;
|sponge&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Proposal/Quotation&lt;br /&gt;
|cyan&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Supplier order&lt;br /&gt;
|cornas&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Delivery&lt;br /&gt;
|storm&lt;br /&gt;
|V13&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Create a new template=&lt;br /&gt;
==For an existing core module==&lt;br /&gt;
Do not directly modify an existing template. &lt;br /&gt;
&lt;br /&gt;
Although it is possible to copy the file of the template used as example into a new name in same directory and edit it to change content it is strongly recommended not to modify any core file or structure(If you want to fix something use the project Github page to propose your changes).&lt;br /&gt;
&lt;br /&gt;
Instead use the [[https://wiki.dolibarr.org/index.php?title=Module_development#Module_creation_with_the_module_builder |Module Builder]] available from v12.0 to create your own module even for just a new template.&lt;br /&gt;
&lt;br /&gt;
For this example, we will call our new module &#039;mymodule&#039; and our template &#039;mycompanyblue&#039;, based on the existing template &#039;cyan&#039;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Copy and paste file pdf_cyan.modules.php into custom/mymodule/core/modules/propale/doc&lt;br /&gt;
*Rename the copy as pdf_mycompanyblue.modules.php&lt;br /&gt;
*Edit the file and make the following changes in the code:&lt;br /&gt;
&lt;br /&gt;
#from &amp;lt;nowiki&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;Class pdf_cyan&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/nowiki&amp;gt; to &amp;lt;nowiki&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;Class pdf_mycompanyblue&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
#&#039;$this-&amp;gt;name = &amp;quot;cyan&amp;quot;;&#039; to &#039;$this-&amp;gt;name = &amp;quot;mycompanyblue&amp;quot;;&#039;.&lt;br /&gt;
#&#039;$this-&amp;gt;description = $langs-&amp;gt;trans(&#039;DocModelCyanDescription&#039;);&#039; to &#039;$this-&amp;gt;description = $langs-&amp;gt;trans(&#039;DocModelCyanDescription&#039;);&#039;.&lt;br /&gt;
#Save file.&lt;br /&gt;
&lt;br /&gt;
* Edit the file custom/mymodule/core/modules/modMymodule.class.php and make the following changes in the code:&lt;br /&gt;
&lt;br /&gt;
# &#039;models&#039; =&amp;gt; 0 to &#039;models&#039; =&amp;gt; 1&lt;br /&gt;
# Save file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now the template will be available in the list of models in Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Test this model (see previous section) before going further.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==For a new module==&lt;br /&gt;
Just use the [[Module Builder]] from v12.0 to create your module. When entering the name of a new object to create, you can also check a checkbox to say that you want to manage documents for such new object. In such a case, two templates will be automatically generated (one ODT template and one PDF template).&lt;br /&gt;
&lt;br /&gt;
The templates will be generated with path:&lt;br /&gt;
&lt;br /&gt;
*custom/mymodule/core/modules/doc/pdf_standard_myobject.class.php&lt;br /&gt;
*custom/mymodule/core/modules/doc/doc_generic_myobject_odt.class.php&lt;br /&gt;
&lt;br /&gt;
=Customize content of your new template=&lt;br /&gt;
Customize the new template:&lt;br /&gt;
&lt;br /&gt;
In file pdf_propale_mycompanyblue.modules.php, look for the function &#039;_pagehead()&#039; function. It is the function that manages the display of the header.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;_pagefooter()&#039; function. It is the function that manages the display of the footer.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;write_file()&#039; function. It is the function that manages the display of the body of PDF.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Library for PDF manipulation==&lt;br /&gt;
The library used to create PDF documents in PHP is called TCPDF and can be found in htdocs/includes/tcpdf/tcpdf.class.php (or htdocs/includes/tecnickcom/tcpdf/tcpdf.class.php). This class contains the methods used to generate different parts of documents.&lt;br /&gt;
&lt;br /&gt;
Templates instantiate the FPDF class and use its methods combined with the specific data of the invoice, order etc.&lt;br /&gt;
&lt;br /&gt;
We can generally find the following calls into templates that generate PDF documents:&lt;br /&gt;
&lt;br /&gt;
*$pdf-&amp;gt;SetFont() - &#039;&#039;Define the font to use for the text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetXY() - &#039;&#039;Define position (X,Y) for next text that will be output onto page&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;MultiCell() - &#039;&#039;Draw a box containing text. Used to output any text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;GetY() - &#039;&#039;Return current Y position&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetDrawColor() - &#039;&#039;Set the color to use for new text to write - ie black (0,0,0) or white (255,255,255)&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;Rect() - &#039;&#039;Draw a rectangle whose top left corner coordinates are defined by two first parameters and bottom right corner is defined by two following parameters that are relative values&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Frame of scripts==&lt;br /&gt;
The PHP script used for generating PDF documents had the following methods (taking as example the model &amp;quot;crabe&amp;quot;) inside the class with the model&#039;s name:&lt;br /&gt;
&lt;br /&gt;
*pdf_crabe() - &#039;&#039;Creator of the object pdf&#039;&#039;&lt;br /&gt;
*write_pdf_file() - &#039;&#039;General method for generating the file. This method calls all the following ones after initializing some variables&#039;&#039;&lt;br /&gt;
*_pagehead() - &#039;&#039;Method for drawing the heading of the document, including in general the logo, the title of the document (and the date) as well as the frames of the issuer and the addressee of the document&#039;&#039;&lt;br /&gt;
*_tableau() - &#039;&#039;Method for drawing the details table (products, services,...)&#039;&#039;&lt;br /&gt;
*_tableau_info() - &#039;&#039;Method for drawing the table containing information list present in the bill&#039;&#039;&lt;br /&gt;
*_tableau_tot() - &#039;&#039;Method for drawing table of Totals&#039;&#039;&lt;br /&gt;
*_tableau_versement() - &#039;&#039;Method for drawing table of payment rules&#039;&#039;&lt;br /&gt;
*_pagefoot() - &#039;&#039;Method for drawing bottom of the page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Examples of customization==&lt;br /&gt;
===Insert a logo===&lt;br /&gt;
&lt;br /&gt;
*Add following instructions&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Image(&#039;\www\htdocs\dolibarr\document\societe\logo.jpg&#039;, 10, 5, 60.00);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With this example: 10=abscissa, 5=ordinate, 60=width of logo&lt;br /&gt;
&lt;br /&gt;
*If the logo is on or outside existing text, remove existing text by commenting the code that outputs the text or by changing its position.&lt;br /&gt;
&lt;br /&gt;
===Insert text===&lt;br /&gt;
Most common function to use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;setX(float a); // set current x position&lt;br /&gt;
$pdf-&amp;gt;setY(float b); // set current y position&lt;br /&gt;
$pdf-&amp;gt;setXY(float a,float b); // fixe les positions x et y courantes&lt;br /&gt;
$pdf-&amp;gt;SetTextColor(0,0,200); // fixe la couleur du texte&lt;br /&gt;
$pdf-&amp;gt;SetFont(&#039;Arial&#039;,&#039;B&#039;,14); // fixe la police, le type ( &#039;B&#039; pour gras, &#039;I&#039; pour italique, &#039;&#039; pour normal,...)&lt;br /&gt;
$pdf-&amp;gt;MultiCell(60, 8, &#039;Mon texte&amp;quot;, 0, &#039;L&#039;); // imprime &#039;Mon texte&#039; avec saut de ligne&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: Origin for setXY functions are the top left corner of page.&lt;br /&gt;
&lt;br /&gt;
===Add a PDF Annotation (comment)===&lt;br /&gt;
&#039;&#039;Left side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(102, 202, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Right side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(202, 102, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add Complementary Attribute (extrafiled)===&lt;br /&gt;
A dedicated page give you some advises how to integrate complementary attributes (extrafields) into PDF models of Dolibarr [[Add Extrafields on PDF Models]]&lt;br /&gt;
&lt;br /&gt;
==More information==&lt;br /&gt;
&lt;br /&gt;
*http://www.fpdf.org/?lang=en&lt;br /&gt;
*List of TCPDF&#039;s methods: tcpdf.org/doc/code/classTCPDF.html&lt;br /&gt;
&lt;br /&gt;
=Activate your new model=&lt;br /&gt;
In page Home =&amp;gt; Setup =&amp;gt; Modules =&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*activate your module&lt;br /&gt;
*eventually, set it as the default model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
&lt;br /&gt;
==Q: My PDF template doesn&#039;t understand foreign characters, it outputs them as ???==&lt;br /&gt;
&lt;br /&gt;
This is probably a font problem, the current font used for generating the PDF cannot handle the foreign characters you are trying to print. So just try to use another font.&lt;br /&gt;
&lt;br /&gt;
You will find the fonts used by Dolibarr to print PDF inside your Dolibarr folder.../includes/tecnickcom/tcpdf/fonts/&lt;br /&gt;
&lt;br /&gt;
To change the font used for generating PDF, you need to edit the &#039;main.lang&#039; file of the language you are using (you&#039;ll find the file in your Dolibarr.../langs/en_US/main.lang for instance if you use English)&lt;br /&gt;
&lt;br /&gt;
*Edit the main.lang file&lt;br /&gt;
*Locate the constant FONTFORPDF at the beginning of the file and change the value to FONTFORPDF=dejavusans for instance if you want to use dejavusans. Please note that sometimes FONTFORPDF may be missing, in this case you should add it at the beginning of the file.&lt;br /&gt;
*Save the file and try again to generate your PDF.&lt;br /&gt;
&lt;br /&gt;
If you are unlucky, you can try with more fonts, just go to the TCPDF website sourceforge.net/projects/tcpdf/files/ and download the latest zip package. Then extract only the &#039;fonts&#039; folder from the zip. Then copy the files in your Dolibarr installation .../includes/tecnickcom/tcpdf/fonts/ so you will get more fonts to play with.&lt;br /&gt;
&lt;br /&gt;
Also, please make a backup of your files modification.&lt;br /&gt;
&lt;br /&gt;
Alternative if this doesn&#039;t work: make sure the Translation class is correctly instantiated and loaded with the correct language inside your PDF templates (stored inside the $langs or $outputlangs variable).&lt;br /&gt;
&lt;br /&gt;
Thanks to Humphrey for the tip.&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62269</id>
		<title>Create a PDF document template</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62269"/>
		<updated>2025-01-23T23:18:10Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* For an existing core module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Créer_un_modèle_de_document_PDF]]&lt;br /&gt;
[[es:Crear_un_modelo_de_documento_PDF]]&lt;br /&gt;
[[zh:创建PDF模板]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
&lt;br /&gt;
This page describes how to create your own document-generation module (for proposals, invoices, etc...)&lt;br /&gt;
The tutorial uses Commercial Proposals as an example but the same process is used for any type of document.&lt;br /&gt;
&lt;br /&gt;
Building a PDF template requires some PHP knowledge.&lt;br /&gt;
An ODT template does not require PHP knowledge. To build an ODT template, see this page [[Create an ODT document template]]. &lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
&lt;br /&gt;
*Dolibarr: 3.0+&lt;br /&gt;
*Knowledge in PHP development&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Find a document template that is the closest to your requirements=&lt;br /&gt;
You may review the existing templates by going to the module setup area, the Commercial Proposals setup in this case, and then clicking on the &amp;quot;preview&amp;quot; logo.&lt;br /&gt;
Choose one that is the best match to your needs. In this example, we will use the template &amp;quot;azur&amp;quot; that corresponds to the file&lt;br /&gt;
pdf_propale_azur.modules.php&lt;br /&gt;
&lt;br /&gt;
All document models are in &#039;&#039;&#039;htdocs/core/modules&#039;&#039;&#039;, in subdirectories, for example&lt;br /&gt;
propale for commercial proposals&lt;br /&gt;
facture for invoices&lt;br /&gt;
commande for orders, etc... &lt;br /&gt;
and finally &#039;&#039;&#039;doc&#039;&#039;&#039; or &#039;&#039;&#039;pdf&#039;&#039;&#039;.&lt;br /&gt;
For instance, proposal templates will be located in &#039;&#039;&#039;...core/modules/propale/doc/&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The list of recommended PDF Models :&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Module&lt;br /&gt;
!PDF Model name&lt;br /&gt;
!Dolibarr min version&lt;br /&gt;
|-&lt;br /&gt;
|Shipping&lt;br /&gt;
|espadon&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Order&lt;br /&gt;
|eratosthene&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Invoice&lt;br /&gt;
|sponge&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Proposal/Quotation&lt;br /&gt;
|cyan&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Supplier order&lt;br /&gt;
|cornas&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Delivery&lt;br /&gt;
|storm&lt;br /&gt;
|V13&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Create a new template=&lt;br /&gt;
==For an existing core module==&lt;br /&gt;
Do not directly modify an existing template. &lt;br /&gt;
&lt;br /&gt;
Although it is possible to copy the file of the template used as example into a new name in same directory and edit it to change content it is strongly recommended not to modify any core file or structure(If you want to fix something use the project Github page to propose your changes).&lt;br /&gt;
&lt;br /&gt;
Instead use the [[https://wiki.dolibarr.org/index.php?title=Module_development#Module_creation_with_the_module_builder |Module Builder]] available from v12.0 to create your own module even for just a new template.&lt;br /&gt;
&lt;br /&gt;
For this example, we will call our new module &#039;mymodule&#039; and our template &#039;mycompanyblue&#039;, based on the existing template &#039;cyan&#039;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Copy and paste file pdf_cyan.modules.php into custom/mymodule/core/modules/propale/doc&lt;br /&gt;
*Rename the copy as pdf_mycompanyblue.modules.php&lt;br /&gt;
*Edit the file and make the following changes in the code:&lt;br /&gt;
&lt;br /&gt;
#&#039;Class pdf_cyan&#039; to &#039;Class pdf_mycompanyblue&#039;&lt;br /&gt;
#&#039;$this-&amp;gt;name = &amp;quot;cyan&amp;quot;;&#039; to &#039;$this-&amp;gt;name = &amp;quot;mycompanyblue&amp;quot;;&#039;.&lt;br /&gt;
#&#039;$this-&amp;gt;description = $langs-&amp;gt;trans(&#039;DocModelCyanDescription&#039;);&#039; to &#039;$this-&amp;gt;description = $langs-&amp;gt;trans(&#039;DocModelCyanDescription&#039;);&#039;.&lt;br /&gt;
#Save file.&lt;br /&gt;
&lt;br /&gt;
Now the template will be available in the list of models in Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Test this model (see previous section) before going further.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==For a new module==&lt;br /&gt;
Just use the [[Module Builder]] from v12.0 to create your module. When entering the name of a new object to create, you can also check a checkbox to say that you want to manage documents for such new object. In such a case, two templates will be automatically generated (one ODT template and one PDF template).&lt;br /&gt;
&lt;br /&gt;
The templates will be generated with path:&lt;br /&gt;
&lt;br /&gt;
*custom/mymodule/core/modules/doc/pdf_standard_myobject.class.php&lt;br /&gt;
*custom/mymodule/core/modules/doc/doc_generic_myobject_odt.class.php&lt;br /&gt;
&lt;br /&gt;
=Customize content of your new template=&lt;br /&gt;
Customize the new template:&lt;br /&gt;
&lt;br /&gt;
In file pdf_propale_mycompanyblue.modules.php, look for the function &#039;_pagehead()&#039; function. It is the function that manages the display of the header.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;_pagefooter()&#039; function. It is the function that manages the display of the footer.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;write_file()&#039; function. It is the function that manages the display of the body of PDF.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Library for PDF manipulation==&lt;br /&gt;
The library used to create PDF documents in PHP is called TCPDF and can be found in htdocs/includes/tcpdf/tcpdf.class.php (or htdocs/includes/tecnickcom/tcpdf/tcpdf.class.php). This class contains the methods used to generate different parts of documents.&lt;br /&gt;
&lt;br /&gt;
Templates instantiate the FPDF class and use its methods combined with the specific data of the invoice, order etc.&lt;br /&gt;
&lt;br /&gt;
We can generally find the following calls into templates that generate PDF documents:&lt;br /&gt;
&lt;br /&gt;
*$pdf-&amp;gt;SetFont() - &#039;&#039;Define the font to use for the text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetXY() - &#039;&#039;Define position (X,Y) for next text that will be output onto page&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;MultiCell() - &#039;&#039;Draw a box containing text. Used to output any text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;GetY() - &#039;&#039;Return current Y position&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetDrawColor() - &#039;&#039;Set the color to use for new text to write - ie black (0,0,0) or white (255,255,255)&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;Rect() - &#039;&#039;Draw a rectangle whose top left corner coordinates are defined by two first parameters and bottom right corner is defined by two following parameters that are relative values&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Frame of scripts==&lt;br /&gt;
The PHP script used for generating PDF documents had the following methods (taking as example the model &amp;quot;crabe&amp;quot;) inside the class with the model&#039;s name:&lt;br /&gt;
&lt;br /&gt;
*pdf_crabe() - &#039;&#039;Creator of the object pdf&#039;&#039;&lt;br /&gt;
*write_pdf_file() - &#039;&#039;General method for generating the file. This method calls all the following ones after initializing some variables&#039;&#039;&lt;br /&gt;
*_pagehead() - &#039;&#039;Method for drawing the heading of the document, including in general the logo, the title of the document (and the date) as well as the frames of the issuer and the addressee of the document&#039;&#039;&lt;br /&gt;
*_tableau() - &#039;&#039;Method for drawing the details table (products, services,...)&#039;&#039;&lt;br /&gt;
*_tableau_info() - &#039;&#039;Method for drawing the table containing information list present in the bill&#039;&#039;&lt;br /&gt;
*_tableau_tot() - &#039;&#039;Method for drawing table of Totals&#039;&#039;&lt;br /&gt;
*_tableau_versement() - &#039;&#039;Method for drawing table of payment rules&#039;&#039;&lt;br /&gt;
*_pagefoot() - &#039;&#039;Method for drawing bottom of the page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Examples of customization==&lt;br /&gt;
===Insert a logo===&lt;br /&gt;
&lt;br /&gt;
*Add following instructions&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Image(&#039;\www\htdocs\dolibarr\document\societe\logo.jpg&#039;, 10, 5, 60.00);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With this example: 10=abscissa, 5=ordinate, 60=width of logo&lt;br /&gt;
&lt;br /&gt;
*If the logo is on or outside existing text, remove existing text by commenting the code that outputs the text or by changing its position.&lt;br /&gt;
&lt;br /&gt;
===Insert text===&lt;br /&gt;
Most common function to use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;setX(float a); // set current x position&lt;br /&gt;
$pdf-&amp;gt;setY(float b); // set current y position&lt;br /&gt;
$pdf-&amp;gt;setXY(float a,float b); // fixe les positions x et y courantes&lt;br /&gt;
$pdf-&amp;gt;SetTextColor(0,0,200); // fixe la couleur du texte&lt;br /&gt;
$pdf-&amp;gt;SetFont(&#039;Arial&#039;,&#039;B&#039;,14); // fixe la police, le type ( &#039;B&#039; pour gras, &#039;I&#039; pour italique, &#039;&#039; pour normal,...)&lt;br /&gt;
$pdf-&amp;gt;MultiCell(60, 8, &#039;Mon texte&amp;quot;, 0, &#039;L&#039;); // imprime &#039;Mon texte&#039; avec saut de ligne&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: Origin for setXY functions are the top left corner of page.&lt;br /&gt;
&lt;br /&gt;
===Add a PDF Annotation (comment)===&lt;br /&gt;
&#039;&#039;Left side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(102, 202, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Right side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(202, 102, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add Complementary Attribute (extrafiled)===&lt;br /&gt;
A dedicated page give you some advises how to integrate complementary attributes (extrafields) into PDF models of Dolibarr [[Add Extrafields on PDF Models]]&lt;br /&gt;
&lt;br /&gt;
==More information==&lt;br /&gt;
&lt;br /&gt;
*http://www.fpdf.org/?lang=en&lt;br /&gt;
*List of TCPDF&#039;s methods: tcpdf.org/doc/code/classTCPDF.html&lt;br /&gt;
&lt;br /&gt;
=Activate your new model=&lt;br /&gt;
In page Home =&amp;gt; Setup =&amp;gt; Modules =&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*activate your module&lt;br /&gt;
*eventually, set it as the default model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
&lt;br /&gt;
==Q: My PDF template doesn&#039;t understand foreign characters, it outputs them as ???==&lt;br /&gt;
&lt;br /&gt;
This is probably a font problem, the current font used for generating the PDF cannot handle the foreign characters you are trying to print. So just try to use another font.&lt;br /&gt;
&lt;br /&gt;
You will find the fonts used by Dolibarr to print PDF inside your Dolibarr folder.../includes/tecnickcom/tcpdf/fonts/&lt;br /&gt;
&lt;br /&gt;
To change the font used for generating PDF, you need to edit the &#039;main.lang&#039; file of the language you are using (you&#039;ll find the file in your Dolibarr.../langs/en_US/main.lang for instance if you use English)&lt;br /&gt;
&lt;br /&gt;
*Edit the main.lang file&lt;br /&gt;
*Locate the constant FONTFORPDF at the beginning of the file and change the value to FONTFORPDF=dejavusans for instance if you want to use dejavusans. Please note that sometimes FONTFORPDF may be missing, in this case you should add it at the beginning of the file.&lt;br /&gt;
*Save the file and try again to generate your PDF.&lt;br /&gt;
&lt;br /&gt;
If you are unlucky, you can try with more fonts, just go to the TCPDF website sourceforge.net/projects/tcpdf/files/ and download the latest zip package. Then extract only the &#039;fonts&#039; folder from the zip. Then copy the files in your Dolibarr installation .../includes/tecnickcom/tcpdf/fonts/ so you will get more fonts to play with.&lt;br /&gt;
&lt;br /&gt;
Also, please make a backup of your files modification.&lt;br /&gt;
&lt;br /&gt;
Alternative if this doesn&#039;t work: make sure the Translation class is correctly instantiated and loaded with the correct language inside your PDF templates (stored inside the $langs or $outputlangs variable).&lt;br /&gt;
&lt;br /&gt;
Thanks to Humphrey for the tip.&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62268</id>
		<title>Create a PDF document template</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62268"/>
		<updated>2025-01-23T23:15:49Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* For an existing core module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Créer_un_modèle_de_document_PDF]]&lt;br /&gt;
[[es:Crear_un_modelo_de_documento_PDF]]&lt;br /&gt;
[[zh:创建PDF模板]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
&lt;br /&gt;
This page describes how to create your own document-generation module (for proposals, invoices, etc...)&lt;br /&gt;
The tutorial uses Commercial Proposals as an example but the same process is used for any type of document.&lt;br /&gt;
&lt;br /&gt;
Building a PDF template requires some PHP knowledge.&lt;br /&gt;
An ODT template does not require PHP knowledge. To build an ODT template, see this page [[Create an ODT document template]]. &lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
&lt;br /&gt;
*Dolibarr: 3.0+&lt;br /&gt;
*Knowledge in PHP development&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Find a document template that is the closest to your requirements=&lt;br /&gt;
You may review the existing templates by going to the module setup area, the Commercial Proposals setup in this case, and then clicking on the &amp;quot;preview&amp;quot; logo.&lt;br /&gt;
Choose one that is the best match to your needs. In this example, we will use the template &amp;quot;azur&amp;quot; that corresponds to the file&lt;br /&gt;
pdf_propale_azur.modules.php&lt;br /&gt;
&lt;br /&gt;
All document models are in &#039;&#039;&#039;htdocs/core/modules&#039;&#039;&#039;, in subdirectories, for example&lt;br /&gt;
propale for commercial proposals&lt;br /&gt;
facture for invoices&lt;br /&gt;
commande for orders, etc... &lt;br /&gt;
and finally &#039;&#039;&#039;doc&#039;&#039;&#039; or &#039;&#039;&#039;pdf&#039;&#039;&#039;.&lt;br /&gt;
For instance, proposal templates will be located in &#039;&#039;&#039;...core/modules/propale/doc/&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The list of recommended PDF Models :&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Module&lt;br /&gt;
!PDF Model name&lt;br /&gt;
!Dolibarr min version&lt;br /&gt;
|-&lt;br /&gt;
|Shipping&lt;br /&gt;
|espadon&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Order&lt;br /&gt;
|eratosthene&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Invoice&lt;br /&gt;
|sponge&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Proposal/Quotation&lt;br /&gt;
|cyan&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Supplier order&lt;br /&gt;
|cornas&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Delivery&lt;br /&gt;
|storm&lt;br /&gt;
|V13&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Create a new template=&lt;br /&gt;
==For an existing core module==&lt;br /&gt;
Do not directly modify an existing template. &lt;br /&gt;
Although it is possible to copy the file of the template used as example into a new name in same directory and edit it to change content it is strongly recommended not to modify any core file or structure(If you want to fix something use the project Github page to propose your changes).&lt;br /&gt;
&lt;br /&gt;
Instead use the [[https://wiki.dolibarr.org/index.php?title=Module_development#Module_creation_with_the_module_builder |Module Builder]] available from v12.0 to create your own module even for just a new template.&lt;br /&gt;
&lt;br /&gt;
For this example, we will call our new module &#039;mymodule&#039; and our template &#039;mycompanyblue&#039;, based on the existing template &#039;cyan&#039;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Copy and paste file pdf_cyan.modules.php into custom/mymodule/core/modules/propale/doc&lt;br /&gt;
*Rename the copy as pdf_mycompanyblue.modules.php&lt;br /&gt;
*Edit the file and make the following changes in the code:&lt;br /&gt;
&lt;br /&gt;
#&#039;Class pdf_cyan&#039; to &#039;Class pdf_mycompanyblue&#039;&lt;br /&gt;
#&#039;$this-&amp;gt;name = &amp;quot;cyan&amp;quot;;&#039; to &#039;$this-&amp;gt;name = &amp;quot;mycompanyblue&amp;quot;;&#039;.&lt;br /&gt;
#&#039;$this-&amp;gt;description = $langs-&amp;gt;trans(&#039;DocModelCyanDescription&#039;);&#039; to &#039;$this-&amp;gt;description = $langs-&amp;gt;trans(&#039;DocModelCyanDescription&#039;);&#039;.&lt;br /&gt;
#Save file. &lt;br /&gt;
Now the template will be available in the list of models in Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Test this model (see previous section) before going further.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==For a new module==&lt;br /&gt;
Just use the [[Module Builder]] from v12.0 to create your module. When entering the name of a new object to create, you can also check a checkbox to say that you want to manage documents for such new object. In such a case, two templates will be automatically generated (one ODT template and one PDF template).&lt;br /&gt;
&lt;br /&gt;
The templates will be generated with path:&lt;br /&gt;
&lt;br /&gt;
*custom/mymodule/core/modules/doc/pdf_standard_myobject.class.php&lt;br /&gt;
*custom/mymodule/core/modules/doc/doc_generic_myobject_odt.class.php&lt;br /&gt;
&lt;br /&gt;
=Customize content of your new template=&lt;br /&gt;
Customize the new template:&lt;br /&gt;
&lt;br /&gt;
In file pdf_propale_mycompanyblue.modules.php, look for the function &#039;_pagehead()&#039; function. It is the function that manages the display of the header.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;_pagefooter()&#039; function. It is the function that manages the display of the footer.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;write_file()&#039; function. It is the function that manages the display of the body of PDF.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Library for PDF manipulation==&lt;br /&gt;
The library used to create PDF documents in PHP is called TCPDF and can be found in htdocs/includes/tcpdf/tcpdf.class.php (or htdocs/includes/tecnickcom/tcpdf/tcpdf.class.php). This class contains the methods used to generate different parts of documents.&lt;br /&gt;
&lt;br /&gt;
Templates instantiate the FPDF class and use its methods combined with the specific data of the invoice, order etc.&lt;br /&gt;
&lt;br /&gt;
We can generally find the following calls into templates that generate PDF documents:&lt;br /&gt;
&lt;br /&gt;
*$pdf-&amp;gt;SetFont() - &#039;&#039;Define the font to use for the text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetXY() - &#039;&#039;Define position (X,Y) for next text that will be output onto page&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;MultiCell() - &#039;&#039;Draw a box containing text. Used to output any text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;GetY() - &#039;&#039;Return current Y position&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetDrawColor() - &#039;&#039;Set the color to use for new text to write - ie black (0,0,0) or white (255,255,255)&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;Rect() - &#039;&#039;Draw a rectangle whose top left corner coordinates are defined by two first parameters and bottom right corner is defined by two following parameters that are relative values&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Frame of scripts==&lt;br /&gt;
The PHP script used for generating PDF documents had the following methods (taking as example the model &amp;quot;crabe&amp;quot;) inside the class with the model&#039;s name:&lt;br /&gt;
&lt;br /&gt;
*pdf_crabe() - &#039;&#039;Creator of the object pdf&#039;&#039;&lt;br /&gt;
*write_pdf_file() - &#039;&#039;General method for generating the file. This method calls all the following ones after initializing some variables&#039;&#039;&lt;br /&gt;
*_pagehead() - &#039;&#039;Method for drawing the heading of the document, including in general the logo, the title of the document (and the date) as well as the frames of the issuer and the addressee of the document&#039;&#039;&lt;br /&gt;
*_tableau() - &#039;&#039;Method for drawing the details table (products, services,...)&#039;&#039;&lt;br /&gt;
*_tableau_info() - &#039;&#039;Method for drawing the table containing information list present in the bill&#039;&#039;&lt;br /&gt;
*_tableau_tot() - &#039;&#039;Method for drawing table of Totals&#039;&#039;&lt;br /&gt;
*_tableau_versement() - &#039;&#039;Method for drawing table of payment rules&#039;&#039;&lt;br /&gt;
*_pagefoot() - &#039;&#039;Method for drawing bottom of the page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Examples of customization==&lt;br /&gt;
===Insert a logo===&lt;br /&gt;
&lt;br /&gt;
*Add following instructions&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Image(&#039;\www\htdocs\dolibarr\document\societe\logo.jpg&#039;, 10, 5, 60.00);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With this example: 10=abscissa, 5=ordinate, 60=width of logo&lt;br /&gt;
&lt;br /&gt;
*If the logo is on or outside existing text, remove existing text by commenting the code that outputs the text or by changing its position.&lt;br /&gt;
&lt;br /&gt;
===Insert text===&lt;br /&gt;
Most common function to use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;setX(float a); // set current x position&lt;br /&gt;
$pdf-&amp;gt;setY(float b); // set current y position&lt;br /&gt;
$pdf-&amp;gt;setXY(float a,float b); // fixe les positions x et y courantes&lt;br /&gt;
$pdf-&amp;gt;SetTextColor(0,0,200); // fixe la couleur du texte&lt;br /&gt;
$pdf-&amp;gt;SetFont(&#039;Arial&#039;,&#039;B&#039;,14); // fixe la police, le type ( &#039;B&#039; pour gras, &#039;I&#039; pour italique, &#039;&#039; pour normal,...)&lt;br /&gt;
$pdf-&amp;gt;MultiCell(60, 8, &#039;Mon texte&amp;quot;, 0, &#039;L&#039;); // imprime &#039;Mon texte&#039; avec saut de ligne&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: Origin for setXY functions are the top left corner of page.&lt;br /&gt;
&lt;br /&gt;
===Add a PDF Annotation (comment)===&lt;br /&gt;
&#039;&#039;Left side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(102, 202, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Right side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(202, 102, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add Complementary Attribute (extrafiled)===&lt;br /&gt;
A dedicated page give you some advises how to integrate complementary attributes (extrafields) into PDF models of Dolibarr [[Add Extrafields on PDF Models]]&lt;br /&gt;
&lt;br /&gt;
==More information==&lt;br /&gt;
&lt;br /&gt;
*http://www.fpdf.org/?lang=en&lt;br /&gt;
*List of TCPDF&#039;s methods: tcpdf.org/doc/code/classTCPDF.html&lt;br /&gt;
&lt;br /&gt;
=Activate your new model=&lt;br /&gt;
In page Home =&amp;gt; Setup =&amp;gt; Modules =&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*activate your module&lt;br /&gt;
*eventually, set it as the default model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
&lt;br /&gt;
==Q: My PDF template doesn&#039;t understand foreign characters, it outputs them as ???==&lt;br /&gt;
&lt;br /&gt;
This is probably a font problem, the current font used for generating the PDF cannot handle the foreign characters you are trying to print. So just try to use another font.&lt;br /&gt;
&lt;br /&gt;
You will find the fonts used by Dolibarr to print PDF inside your Dolibarr folder.../includes/tecnickcom/tcpdf/fonts/&lt;br /&gt;
&lt;br /&gt;
To change the font used for generating PDF, you need to edit the &#039;main.lang&#039; file of the language you are using (you&#039;ll find the file in your Dolibarr.../langs/en_US/main.lang for instance if you use English)&lt;br /&gt;
&lt;br /&gt;
*Edit the main.lang file&lt;br /&gt;
*Locate the constant FONTFORPDF at the beginning of the file and change the value to FONTFORPDF=dejavusans for instance if you want to use dejavusans. Please note that sometimes FONTFORPDF may be missing, in this case you should add it at the beginning of the file.&lt;br /&gt;
*Save the file and try again to generate your PDF.&lt;br /&gt;
&lt;br /&gt;
If you are unlucky, you can try with more fonts, just go to the TCPDF website sourceforge.net/projects/tcpdf/files/ and download the latest zip package. Then extract only the &#039;fonts&#039; folder from the zip. Then copy the files in your Dolibarr installation .../includes/tecnickcom/tcpdf/fonts/ so you will get more fonts to play with.&lt;br /&gt;
&lt;br /&gt;
Also, please make a backup of your files modification.&lt;br /&gt;
&lt;br /&gt;
Alternative if this doesn&#039;t work: make sure the Translation class is correctly instantiated and loaded with the correct language inside your PDF templates (stored inside the $langs or $outputlangs variable).&lt;br /&gt;
&lt;br /&gt;
Thanks to Humphrey for the tip.&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62267</id>
		<title>Create a PDF document template</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62267"/>
		<updated>2025-01-23T23:06:35Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* Create a new template */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Créer_un_modèle_de_document_PDF]]&lt;br /&gt;
[[es:Crear_un_modelo_de_documento_PDF]]&lt;br /&gt;
[[zh:创建PDF模板]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
&lt;br /&gt;
This page describes how to create your own document-generation module (for proposals, invoices, etc...)&lt;br /&gt;
The tutorial uses Commercial Proposals as an example but the same process is used for any type of document.&lt;br /&gt;
&lt;br /&gt;
Building a PDF template requires some PHP knowledge.&lt;br /&gt;
An ODT template does not require PHP knowledge. To build an ODT template, see this page [[Create an ODT document template]]. &lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
&lt;br /&gt;
*Dolibarr: 3.0+&lt;br /&gt;
*Knowledge in PHP development&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Find a document template that is the closest to your requirements=&lt;br /&gt;
You may review the existing templates by going to the module setup area, the Commercial Proposals setup in this case, and then clicking on the &amp;quot;preview&amp;quot; logo.&lt;br /&gt;
Choose one that is the best match to your needs. In this example, we will use the template &amp;quot;azur&amp;quot; that corresponds to the file&lt;br /&gt;
pdf_propale_azur.modules.php&lt;br /&gt;
&lt;br /&gt;
All document models are in &#039;&#039;&#039;htdocs/core/modules&#039;&#039;&#039;, in subdirectories, for example&lt;br /&gt;
propale for commercial proposals&lt;br /&gt;
facture for invoices&lt;br /&gt;
commande for orders, etc... &lt;br /&gt;
and finally &#039;&#039;&#039;doc&#039;&#039;&#039; or &#039;&#039;&#039;pdf&#039;&#039;&#039;.&lt;br /&gt;
For instance, proposal templates will be located in &#039;&#039;&#039;...core/modules/propale/doc/&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The list of recommended PDF Models :&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Module&lt;br /&gt;
!PDF Model name&lt;br /&gt;
!Dolibarr min version&lt;br /&gt;
|-&lt;br /&gt;
|Shipping&lt;br /&gt;
|espadon&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Order&lt;br /&gt;
|eratosthene&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Invoice&lt;br /&gt;
|sponge&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Proposal/Quotation&lt;br /&gt;
|cyan&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Supplier order&lt;br /&gt;
|cornas&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Delivery&lt;br /&gt;
|storm&lt;br /&gt;
|V13&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Create a new template=&lt;br /&gt;
==For an existing core module==&lt;br /&gt;
Do not directly modify an existing template. &lt;br /&gt;
Although it is possible to copy the file of the template used as example into a new name in same directory and edit it to change content it is strongly recommended not to modify any core file or structure(If you want to fix something use the project Github page to propose your changes).&lt;br /&gt;
&lt;br /&gt;
Instead use the the Module Builder [[Module development]] available from v12.0 to create your own module even for just a new template.&lt;br /&gt;
&lt;br /&gt;
For this example, we will call our new module &#039;mymodule&#039; and our template &#039;mycompanyblue&#039;, based on the existing template &#039;cyan&#039;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Copy and paste file pdf_cyan.modules.php into custom/mymodule/core/modules/propale/doc&lt;br /&gt;
*Rename the copy as pdf_mycompanyblue.modules.php&lt;br /&gt;
*Edit the file and make the following changes in the code:&lt;br /&gt;
&lt;br /&gt;
#&#039;Class pdf_cyan&#039; to &#039;Class pdf_mycompanyblue&#039;&lt;br /&gt;
#&#039;$this-&amp;gt;name = &amp;quot;cyan&amp;quot;;&#039; to &#039;$this-&amp;gt;name = &amp;quot;mycompanyblue&amp;quot;;&#039;.&lt;br /&gt;
#&#039;$this-&amp;gt;description = $langs-&amp;gt;trans(&#039;DocModelCyanDescription&#039;);&#039; to &#039;$this-&amp;gt;description = $langs-&amp;gt;trans(&#039;DocModelCyanDescription&#039;);&#039;.&lt;br /&gt;
#Save file. &lt;br /&gt;
Now the template will be available in the list of models in Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Test this model (see previous section) before going further.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==For a new module==&lt;br /&gt;
Just use the [[Module Builder]] from v12.0 to create your module. When entering the name of a new object to create, you can also check a checkbox to say that you want to manage documents for such new object. In such a case, two templates will be automatically generated (one ODT template and one PDF template).&lt;br /&gt;
&lt;br /&gt;
The templates will be generated with path:&lt;br /&gt;
&lt;br /&gt;
*custom/mymodule/core/modules/doc/pdf_standard_myobject.class.php&lt;br /&gt;
*custom/mymodule/core/modules/doc/doc_generic_myobject_odt.class.php&lt;br /&gt;
&lt;br /&gt;
=Customize content of your new template=&lt;br /&gt;
Customize the new template:&lt;br /&gt;
&lt;br /&gt;
In file pdf_propale_mycompanyblue.modules.php, look for the function &#039;_pagehead()&#039; function. It is the function that manages the display of the header.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;_pagefooter()&#039; function. It is the function that manages the display of the footer.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;write_file()&#039; function. It is the function that manages the display of the body of PDF.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Library for PDF manipulation==&lt;br /&gt;
The library used to create PDF documents in PHP is called TCPDF and can be found in htdocs/includes/tcpdf/tcpdf.class.php (or htdocs/includes/tecnickcom/tcpdf/tcpdf.class.php). This class contains the methods used to generate different parts of documents.&lt;br /&gt;
&lt;br /&gt;
Templates instantiate the FPDF class and use its methods combined with the specific data of the invoice, order etc.&lt;br /&gt;
&lt;br /&gt;
We can generally find the following calls into templates that generate PDF documents:&lt;br /&gt;
&lt;br /&gt;
*$pdf-&amp;gt;SetFont() - &#039;&#039;Define the font to use for the text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetXY() - &#039;&#039;Define position (X,Y) for next text that will be output onto page&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;MultiCell() - &#039;&#039;Draw a box containing text. Used to output any text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;GetY() - &#039;&#039;Return current Y position&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetDrawColor() - &#039;&#039;Set the color to use for new text to write - ie black (0,0,0) or white (255,255,255)&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;Rect() - &#039;&#039;Draw a rectangle whose top left corner coordinates are defined by two first parameters and bottom right corner is defined by two following parameters that are relative values&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Frame of scripts==&lt;br /&gt;
The PHP script used for generating PDF documents had the following methods (taking as example the model &amp;quot;crabe&amp;quot;) inside the class with the model&#039;s name:&lt;br /&gt;
&lt;br /&gt;
*pdf_crabe() - &#039;&#039;Creator of the object pdf&#039;&#039;&lt;br /&gt;
*write_pdf_file() - &#039;&#039;General method for generating the file. This method calls all the following ones after initializing some variables&#039;&#039;&lt;br /&gt;
*_pagehead() - &#039;&#039;Method for drawing the heading of the document, including in general the logo, the title of the document (and the date) as well as the frames of the issuer and the addressee of the document&#039;&#039;&lt;br /&gt;
*_tableau() - &#039;&#039;Method for drawing the details table (products, services,...)&#039;&#039;&lt;br /&gt;
*_tableau_info() - &#039;&#039;Method for drawing the table containing information list present in the bill&#039;&#039;&lt;br /&gt;
*_tableau_tot() - &#039;&#039;Method for drawing table of Totals&#039;&#039;&lt;br /&gt;
*_tableau_versement() - &#039;&#039;Method for drawing table of payment rules&#039;&#039;&lt;br /&gt;
*_pagefoot() - &#039;&#039;Method for drawing bottom of the page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Examples of customization==&lt;br /&gt;
===Insert a logo===&lt;br /&gt;
&lt;br /&gt;
*Add following instructions&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Image(&#039;\www\htdocs\dolibarr\document\societe\logo.jpg&#039;, 10, 5, 60.00);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With this example: 10=abscissa, 5=ordinate, 60=width of logo&lt;br /&gt;
&lt;br /&gt;
*If the logo is on or outside existing text, remove existing text by commenting the code that outputs the text or by changing its position.&lt;br /&gt;
&lt;br /&gt;
===Insert text===&lt;br /&gt;
Most common function to use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;setX(float a); // set current x position&lt;br /&gt;
$pdf-&amp;gt;setY(float b); // set current y position&lt;br /&gt;
$pdf-&amp;gt;setXY(float a,float b); // fixe les positions x et y courantes&lt;br /&gt;
$pdf-&amp;gt;SetTextColor(0,0,200); // fixe la couleur du texte&lt;br /&gt;
$pdf-&amp;gt;SetFont(&#039;Arial&#039;,&#039;B&#039;,14); // fixe la police, le type ( &#039;B&#039; pour gras, &#039;I&#039; pour italique, &#039;&#039; pour normal,...)&lt;br /&gt;
$pdf-&amp;gt;MultiCell(60, 8, &#039;Mon texte&amp;quot;, 0, &#039;L&#039;); // imprime &#039;Mon texte&#039; avec saut de ligne&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: Origin for setXY functions are the top left corner of page.&lt;br /&gt;
&lt;br /&gt;
===Add a PDF Annotation (comment)===&lt;br /&gt;
&#039;&#039;Left side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(102, 202, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Right side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(202, 102, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add Complementary Attribute (extrafiled)===&lt;br /&gt;
A dedicated page give you some advises how to integrate complementary attributes (extrafields) into PDF models of Dolibarr [[Add Extrafields on PDF Models]]&lt;br /&gt;
&lt;br /&gt;
==More information==&lt;br /&gt;
&lt;br /&gt;
*http://www.fpdf.org/?lang=en&lt;br /&gt;
*List of TCPDF&#039;s methods: tcpdf.org/doc/code/classTCPDF.html&lt;br /&gt;
&lt;br /&gt;
=Activate your new model=&lt;br /&gt;
In page Home =&amp;gt; Setup =&amp;gt; Modules =&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*activate your module&lt;br /&gt;
*eventually, set it as the default model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
&lt;br /&gt;
==Q: My PDF template doesn&#039;t understand foreign characters, it outputs them as ???==&lt;br /&gt;
&lt;br /&gt;
This is probably a font problem, the current font used for generating the PDF cannot handle the foreign characters you are trying to print. So just try to use another font.&lt;br /&gt;
&lt;br /&gt;
You will find the fonts used by Dolibarr to print PDF inside your Dolibarr folder.../includes/tecnickcom/tcpdf/fonts/&lt;br /&gt;
&lt;br /&gt;
To change the font used for generating PDF, you need to edit the &#039;main.lang&#039; file of the language you are using (you&#039;ll find the file in your Dolibarr.../langs/en_US/main.lang for instance if you use English)&lt;br /&gt;
&lt;br /&gt;
*Edit the main.lang file&lt;br /&gt;
*Locate the constant FONTFORPDF at the beginning of the file and change the value to FONTFORPDF=dejavusans for instance if you want to use dejavusans. Please note that sometimes FONTFORPDF may be missing, in this case you should add it at the beginning of the file.&lt;br /&gt;
*Save the file and try again to generate your PDF.&lt;br /&gt;
&lt;br /&gt;
If you are unlucky, you can try with more fonts, just go to the TCPDF website sourceforge.net/projects/tcpdf/files/ and download the latest zip package. Then extract only the &#039;fonts&#039; folder from the zip. Then copy the files in your Dolibarr installation .../includes/tecnickcom/tcpdf/fonts/ so you will get more fonts to play with.&lt;br /&gt;
&lt;br /&gt;
Also, please make a backup of your files modification.&lt;br /&gt;
&lt;br /&gt;
Alternative if this doesn&#039;t work: make sure the Translation class is correctly instantiated and loaded with the correct language inside your PDF templates (stored inside the $langs or $outputlangs variable).&lt;br /&gt;
&lt;br /&gt;
Thanks to Humphrey for the tip.&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_development&amp;diff=62266</id>
		<title>Module development</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_development&amp;diff=62266"/>
		<updated>2025-01-23T23:01:03Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* Module creation with the module builder */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Développement_module]]&lt;br /&gt;
[[es:Desarrollo_de_un_módulo]]&lt;br /&gt;
[[de:Modul_Entwicklung]]&lt;br /&gt;
[[zh:模块开发]]&lt;br /&gt;
[[ja:モジュール_開発]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Core]]&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
&lt;br /&gt;
To create a new module/addon for Dolibarr, there is several steps. This tutorial will describe you each of them to build a module to extend Dolibarr features, like one or several of the following :&lt;br /&gt;
&lt;br /&gt;
*Add new tables in database.&lt;br /&gt;
*Add your own menu entries.&lt;br /&gt;
*Add new screens to edit new tables.&lt;br /&gt;
*Add or remove tabs on object view (invoice, product, order, event, ...).&lt;br /&gt;
*Add predefined exports for the internal export tool.&lt;br /&gt;
*Add new information widget in the home page.&lt;br /&gt;
*Add new substitutions variables.&lt;br /&gt;
*Define new permissions.&lt;br /&gt;
*Execute code automatically triggered by a particular Dolibarr action.&lt;br /&gt;
*Insert your code inside Dolibarr hooks positions.&lt;br /&gt;
*Add your numbering rule to generate the reference of objects&lt;br /&gt;
*Add a new document template.&lt;br /&gt;
*Add a new skin.&lt;br /&gt;
&lt;br /&gt;
etc...&lt;br /&gt;
&lt;br /&gt;
Following chapters presents how to do all of this manually with an easy way.&lt;br /&gt;
&lt;br /&gt;
=Module creation with the module builder=&lt;br /&gt;
From Dolibarr v. 12.0 it is possible to create the main pages of your module with the Module Builder. To activate it:&lt;br /&gt;
&lt;br /&gt;
Go into the list of module and enable the module &amp;quot;Module Builder&amp;quot;[[File:Module Builder.png|alt=Module Builder|thumb|none]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then click on the &amp;quot;bug&amp;quot; image in the top right of screen.[[File:Module Builder icon.png|alt=Module Builder icon|left|thumb]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=Template of an External Module=&lt;br /&gt;
A good model to start development of external module can be found here : [https://github.com/Dolibarr/dolibarr/tree/develop/htdocs/modulebuilder/template GitHub Dolibarr Module Modèle]&lt;br /&gt;
&lt;br /&gt;
=Create your module=&lt;br /&gt;
==Create a Module descriptor for your Module (required)==&lt;br /&gt;
&#039;&#039;&#039;When it is required&#039;&#039;&#039;: Required as soon as an addon is developed, whatever its goal is (except for adding a skin).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since Dolibarr 9.0, you should use the ModuleBuilder module provided as a standard module to generate the module descriptor&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Create your module descriptor===&lt;br /&gt;
The first step is to create a file descriptor for the module. &lt;br /&gt;
&lt;br /&gt;
*Create directory &#039;&#039;&#039;/htdocs/custom/&#039;&#039;mymodule&#039;&#039;/core/modules&#039;&#039;&#039; (for an external module) or &#039;&#039;&#039;/htdocs/&#039;&#039;mymodule&#039;&#039;/core/modules&#039;&#039;&#039; if you plan to have this module an official core module of Dolibarr. Then copy the file modMyModule.class.php from the directory &#039;&#039;&#039;htdocs/modulebuilder/template&#039;&#039;&#039; into this directory. Change the name of the file modMyModule.class.php to the name corresponding to the purpose of your module. Name of the file must start with initial &#039;mod&#039; and end with .class.php (for example if you want to give the name &#039;NewName&#039; to this file, then the name should be &#039;modNewName.class.php&#039;).&lt;br /&gt;
&lt;br /&gt;
Next modify the contents of this file as follows:&lt;br /&gt;
&lt;br /&gt;
*Replace all &amp;quot;modMyModule&amp;quot; with a value which corresponds to the purpose of your module. This value must always start with &#039;mod&#039; and contain only alpha characters (again, if the name given to the file was &#039;NewName&#039;, then replace all &amp;quot;modMyModule&amp;quot; with &amp;quot;modNewName&amp;quot;).&lt;br /&gt;
*Change the number in: $this-&amp;gt;numero = 100000 by a number that designates your module id. To avoid conflicts with other modules, you can consult the page that lists already reserved id numbers: [[List of modules id|List of modules id]].&lt;br /&gt;
*Modify any other variables defined in the constructor (see comment in the code skeleton for their meaning).&lt;br /&gt;
&lt;br /&gt;
Your file descriptor for your module is ready. See the next step to activate it.&lt;br /&gt;
&lt;br /&gt;
===Test your descriptor===&lt;br /&gt;
&lt;br /&gt;
Launch Dolibarr and go to page &#039;&#039;&#039;Setup-&amp;gt;module&#039;&#039;&#039;? &lt;br /&gt;
If you set the property version in the module description you should see a new line with your new module and the possibility to activate it or not. If you set the property version to &amp;quot;develop&amp;quot; or &amp;quot;experiental&amp;quot;, to see your module, you must first go into &#039;&#039;&#039;Setup-Others&#039;&#039;&#039; and set MAIN_FEATURES_LEVEL to 1 to see &amp;quot;experimental&amp;quot; modules or 2 to see &amp;quot;development&amp;quot; modules.&lt;br /&gt;
&lt;br /&gt;
==Tree of path for new module files (required)==&lt;br /&gt;
This is how your files must be organized when building a new module (the zip file must also match this rule).&lt;br /&gt;
Note: Only the second line is mandatory.&lt;br /&gt;
&lt;br /&gt;
{{TemplateModuleTreeSimple}}&lt;br /&gt;
&lt;br /&gt;
==Create your SQL tables and the PHP DAO class (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If your module needs to manage data of its own&lt;br /&gt;
&lt;br /&gt;
===Create your .sql file===&lt;br /&gt;
If your module is designed to manage data of its own, which are not available in the standard version of Dolibarr, it is necessary to define SQL tables to store the data.&lt;br /&gt;
&lt;br /&gt;
Scripts for creating tables and loading data by your own module are saved into a subdirectory sql (&#039;&#039;&#039;&amp;quot;mymodule/sql&amp;quot;&#039;&#039;&#039;) of your module. (With ModuleBuilder, the directory and all sql files will be created automatically when you will create a new Object from tab Object).&lt;br /&gt;
&lt;br /&gt;
Then check into your descriptor file, into function &#039;&#039;&#039;init&#039;&#039;&#039; that the line&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;$this-&amp;gt;_load_tables(&#039;/mymodule/sql/&#039;);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is not commented.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rules to follow:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Add the files about creating tables commands on the principle of an &#039;&#039;&#039;llx_mytable.sql&#039;&#039;&#039; file per table, with an optional &#039;&#039;&#039;llx_mytable.key.sql&#039;&#039;&#039; file (see existing files in &#039;&#039;&#039;install/mysql/tables&#039;&#039;&#039; for examples).&lt;br /&gt;
*The recommended type and name for SQL fields are defined into page [[Language_and_development_rules#Table_and_fields_structures]].&lt;br /&gt;
*To manage data, you must create a file called &#039;&#039;&#039;data.sql&#039;&#039;&#039; inside directory &#039;&#039;&#039;/mymodule/sql/&#039;&#039;&#039; that contains SQL command to add/edit/delete data.&lt;br /&gt;
*Don&#039;t use the double quote for strings (eg &#039;chaine&#039; not &amp;quot;chaine&amp;quot;) because the double quote have a specific meaning in PostGreSQL&lt;br /&gt;
&lt;br /&gt;
Example of content of a file data.sql&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
 delete from llx_const where name=&#039;MYMODULE_IT_WORKS&#039; and entity=&#039;__ENTITY__&#039;;&lt;br /&gt;
 insert into llx_const (name, value, type, note, visible, entity) values (&#039;MYMODULE_IT_WORKS&#039;,&#039;1&#039;,&#039;chaine&#039;,&#039;A constant vor my module&#039;,1,&#039;__ENTITY__&#039;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files must be operational for the database mysql. Rem: The files of other databases are not maintained. They will be read and converted on the fly by the driver of the other database.&lt;br /&gt;
&lt;br /&gt;
===Test your .sql files===&lt;br /&gt;
&lt;br /&gt;
Once the files ready, you can return to the page to enable Dolibarr modules and disable the module, drop those tables in the database (if they already exists) and reactivate the module. The tables should be recreated by the activation of the module. If this is not the case, check your scripts by passing them by hand, or check the Dolibarr logs.&lt;br /&gt;
&lt;br /&gt;
===Generate the PHP DAO class===&lt;br /&gt;
The DAO PHP files should have been generated by ModuleBuilder after creating an object.&lt;br /&gt;
&lt;br /&gt;
You can however create them manually by copying existing object however using ModuleBuilder is highly recommended. You should find examples into &#039;&#039;&#039;htdocs/modulebuilder/templates/class/myobject.class.php&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In this class, there are already operational CRUD (Create/Read/Update/Delete) methods to perform an insert, a fetch (select), an update, a delete of a table row. Edit the file to use the correct module name, tables and place this file in the class subdirectory of the module. The Module Builder allows you to do this with just a few mouse clicks.&lt;br /&gt;
&lt;br /&gt;
==The tab management (optional)==&lt;br /&gt;
&lt;br /&gt;
===Add or remove your own tabs on object sheets===&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: To add a tab on an object (invoices, orders, proposals, member ...)&lt;br /&gt;
&lt;br /&gt;
To do this go into the file descriptor of module previously created and edit the $this-&amp;gt;tabs array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
	// Array to add new pages in new tabs or remove existing one&lt;br /&gt;
	$this-&amp;gt;tabs = array(&#039;objecttype:+tabname1:Title1:mylangfile@mymodule:$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;read:/mymodule/mypagetab1.php?id=__ID__&#039;    // To add a new tab identified by code tabname1&lt;br /&gt;
                            &#039;objecttype:+tabname2:Title2:mylangfile@mymodule:$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;read:/mymodule/mypagetab2.php?id=__ID__&#039;,   // To add a new tab identified by code tabname2&lt;br /&gt;
                            &#039;objecttype:-tabname&#039;);                                                     // To remove an existing tab identified by code tabname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The table should contain a list of strings, each string representing a new tab. &lt;br /&gt;
The format of the string consisting of 5 parts separated by &amp;quot;:&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Part 1: The element type (object type) where the tab should appear is a value from the following:&lt;br /&gt;
{{TemplateModuleTabs}}&lt;br /&gt;
&lt;br /&gt;
*Part 2: A code to identify tab to add (start with +tabname1) or to remove (start with -tabname1)&lt;br /&gt;
*Part 3: The title of the tab(Title1). This can be a hardcoded read or better a code translation in module lang file .&lt;br /&gt;
*Part 4: The name of the file &amp;quot;*.lang&amp;quot; (mylangfile@mymodule) which contains correspondence between the code translation and language to display. If this name is followed with @mymodule, Dolibarr will search translation file &amp;quot;*.lang&amp;quot; within the module in htdocs/custom/mymodule/langs/code_CODE/mylangfile.lang, otherwise Dolibarr will look for file in htdocs/langs/code_CODE/mylangfile.lang&lt;br /&gt;
*Part 5: A condition to test if tab must be visible($user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;read) &#039;&#039;&#039;or&#039;&#039;&#039; put 1 to be always visible.&lt;br /&gt;
*Part 6: The URL of the page to display when you click on the tab (/mymodule/mypagetab1.php). The __ID__ string will be replaced automatically by the Id of the element concerned.&lt;br /&gt;
&lt;br /&gt;
To feed the contents of the tab with data from the database, see the next chapter.&lt;br /&gt;
&lt;br /&gt;
In order to get the names  &#039;tabname&#039; of existing tabs, you have to check the names used in the function &#039;product_prepare_head&#039; of the file  &#039;core/lib/module.lib.php&#039; corresponding to section &#039;$head[$h][2]&#039;.&lt;br /&gt;
&lt;br /&gt;
===Show tabs navigation into your own pages===&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: To show all standard tabs of an object (product, tiers, etc.) on your page.&lt;br /&gt;
&lt;br /&gt;
You must follow these steps :&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Include files you need into your file&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For each object type, there are two files to include with line&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;require_once($url_fichier) ;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is example of files to include (DOL_DOCUMENT_ROOT is often dolibarr/htdocs/) :&lt;br /&gt;
&lt;br /&gt;
*Object thirdparty (thirdparty) :&lt;br /&gt;
**DOL_DOCUMENT_ROOT/societe/class/societe.class.php&lt;br /&gt;
**DOL_DOCUMENT_ROOT/core/lib/company.lib.php&lt;br /&gt;
*Object product (product) :&lt;br /&gt;
**DOL_DOCUMENT_ROOT/product/class/product.class.php&lt;br /&gt;
**DOL_DOCUMENT_ROOT/core/lib/product.lib.php&lt;br /&gt;
*Object invoice (invoice) :&lt;br /&gt;
**DOL_DOCUMENT_ROOT/compta/facture/class/facture.class.php&lt;br /&gt;
**DOL_DOCUMENT_ROOT/core/lib/invoice.lib.php&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create and load the object to show into your tab&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create an instance of an object of the correct class and load object from the database by using the fetch method of an object in providing to this method the id you get from URL (ie : /mytab.php?id=1).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example :&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$id=GETPOST(&#039;id&#039;,&#039;int&#039;);&lt;br /&gt;
$ref=GETPOST(&#039;ref&#039;,&#039;alpha&#039;);&lt;br /&gt;
$product = new Product($db) ;&lt;br /&gt;
$result = $product-&amp;gt;fetch($id,$ref) ; // Test $result to check the database read is ok&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Get a list of all tabs to show for your object type&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use function XXX_prepare_head($obj), where XXX is name of object. This will return an array with all definition of tab entries to show. The parameter to put into this method is the instance of an object you want tabs.&lt;br /&gt;
&lt;br /&gt;
The resulting array has the following structure&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$head        // Array of tabs&lt;br /&gt;
$head[$h]    // Element to describe one tab.&lt;br /&gt;
$head[$h][0] // Url of page to show when you click on tab&lt;br /&gt;
$head[$h][1] // Title of tab&lt;br /&gt;
$head[$h][2] // Code name to identify the tab&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example :&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$head = product_prepare_head($product, $user) ; // parameter $user is present for some function anly&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4. show tabs into your page&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use function dol_fiche_head() to show all tabs defined into array $head returned by XX_prepare_head().&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
dol_fiche_head($links, $active=&#039;0&#039;, $title=&#039;&#039;, $notab=0, $picto=&#039;&#039;)&lt;br /&gt;
//$links  // Tableau des onglets, appelé $head plus haut.&lt;br /&gt;
//$active // Onglet actif (mettre le nom de l&#039;onglet défini dans votre fichier de module, ou un nom contenu dans $head[$h][2]). Cet onglet sera mis en surbrillance&lt;br /&gt;
//$title  // Title to show (shown into a special tab that you can&#039;t click)&lt;br /&gt;
//$notab&lt;br /&gt;
//$picto  // Name of image to show into title. Possible values are:&lt;br /&gt;
//            product&lt;br /&gt;
//            service&lt;br /&gt;
//            company&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function will show required tabs and open an html element &#039;&#039;&amp;lt; div class=&amp;quot;&amp;quot; &amp;gt;&#039;&#039; that correspond to the area under the tabs. To close area of a tab, just use &#039;&#039;&amp;lt; /div &amp;gt;&#039;&#039; into your PHP page.&lt;br /&gt;
&lt;br /&gt;
==Create or modify PHP screens (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If the purpose of your module is to add features that require new or modified screens.&lt;br /&gt;
&lt;br /&gt;
===Create a new PHP screen===&lt;br /&gt;
You must then create your PHP pages that will show/edit data from tables using the skeleton templates provided as an example in the directory &#039;&#039;&#039;modulebuilder/myobject_page.php&#039;&#039;&#039; (For the development of a script from the command line, see [[Script development]]).&lt;br /&gt;
&lt;br /&gt;
To create a new user screen, create a subdirectory of &#039;&#039;&#039;htdocs&#039;&#039;&#039; (if not already done) for your module (in &#039;&#039;&#039;htdocs/mymodule&#039;&#039;&#039; for example) to store the pages you will create.&lt;br /&gt;
&lt;br /&gt;
Copy, into that directory, the file &#039;&#039;&#039;myobject_page.php&#039;&#039;&#039; that will serve as a starting point for your page file.&lt;br /&gt;
Edit the file to have a correct relative path to the main.inc.php file. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
// Load Dolibarr environment&lt;br /&gt;
$res=0;&lt;br /&gt;
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; ! empty($_SERVER[&amp;quot;CONTEXT_DOCUMENT_ROOT&amp;quot;])) $res=@include($_SERVER[&amp;quot;CONTEXT_DOCUMENT_ROOT&amp;quot;].&amp;quot;/main.inc.php&amp;quot;);&lt;br /&gt;
// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME&lt;br /&gt;
$tmp=empty($_SERVER[&#039;SCRIPT_FILENAME&#039;])?&#039;&#039;:$_SERVER[&#039;SCRIPT_FILENAME&#039;];$tmp2=realpath(__FILE__); $i=strlen($tmp)-1; $j=strlen($tmp2)-1;&lt;br /&gt;
while($i &amp;gt; 0 &amp;amp;&amp;amp; $j &amp;gt; 0 &amp;amp;&amp;amp; isset($tmp[$i]) &amp;amp;&amp;amp; isset($tmp2[$j]) &amp;amp;&amp;amp; $tmp[$i]==$tmp2[$j]) { $i--; $j--; }&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; $i &amp;gt; 0 &amp;amp;&amp;amp; file_exists(substr($tmp, 0, ($i+1)).&amp;quot;/main.inc.php&amp;quot;)) $res=@include(substr($tmp, 0, ($i+1)).&amp;quot;/main.inc.php&amp;quot;);&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; $i &amp;gt; 0 &amp;amp;&amp;amp; file_exists(dirname(substr($tmp, 0, ($i+1))).&amp;quot;/main.inc.php&amp;quot;)) $res=@include(dirname(substr($tmp, 0, ($i+1))).&amp;quot;/main.inc.php&amp;quot;);&lt;br /&gt;
// Try main.inc.php using relative path&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; file_exists(&amp;quot;../main.inc.php&amp;quot;)) $res=@include(&amp;quot;../main.inc.php&amp;quot;);&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; file_exists(&amp;quot;../../main.inc.php&amp;quot;)) $res=@include(&amp;quot;../../main.inc.php&amp;quot;);&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; file_exists(&amp;quot;../../../main.inc.php&amp;quot;)) $res=@include(&amp;quot;../../../main.inc.php&amp;quot;);&lt;br /&gt;
if (! $res) die(&amp;quot;Include of main fails&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
As you can see, there are several tries to load the main.inc.php (or master.inc.php). The goal is to succeed in the most cases as possible. The minimum is 2 lines: one to try to load the master/main.inc.php into the dolibarr root directory and another one to try to load the file to support the case when the module is deployed into the &amp;quot;custom&amp;quot; directory. But you can have more to deal more situation. The provided example should be able to load the file main/master.inc.php in nearly all situation/setups.&lt;br /&gt;
&lt;br /&gt;
Note that you may add more &amp;quot;../&amp;quot; depending on the depth of the file relative to your module directory tree.&lt;br /&gt;
&lt;br /&gt;
It&#039;s in the main.inc.php file that is loaded technical environment variables and permissions. The following variables are objects positioned in this file:&lt;br /&gt;
&lt;br /&gt;
*$user    Object that contains the characteristics of the user + his permissions.&lt;br /&gt;
*$conf    Object that contains Dolibarr configuration.&lt;br /&gt;
*$db      Object that contains an opened connection handler to the database.&lt;br /&gt;
*$langs   Object that contains the user&#039;s language.&lt;br /&gt;
&lt;br /&gt;
Then enter your code to display the page.&lt;br /&gt;
&lt;br /&gt;
*To include a class or library dedicated to the module is done using a Dolibarr function (and not using directly include_once):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example :&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
dol_include_once(&#039;/mymodule/class/myclass.class.php&#039;, &#039;MyClass&#039;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*To include classes provided with Dolibarr, use the following syntax:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example :&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
require_once DOL_DOCUMENT_ROOT.&#039;/core/class/doli.class.php&#039;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add some fields into existing forms===&lt;br /&gt;
You may want to provide a module that adds more fields into forms (input and view) of some elements. &lt;br /&gt;
&lt;br /&gt;
A heavy solution (but not so bad) may be to replace all pages used to create element (this means to disable the &amp;quot;New element&amp;quot; menu entry and adding yours, and disable tab that shows element to replace with a tab that is your own full page (copied/pasted from original) to do same than original page but modified to add your fields and stored added data into your own table). Go to menu [[#Define your entries in the menu (optional)]] and [[#The tab management (optional)]] if this solution suits you (this solution is more powerful since you can change everything you want into the page). &lt;br /&gt;
&lt;br /&gt;
We will describe here another solution, that works only to &amp;quot;add fields&amp;quot; at end of existing fields, using the element &amp;quot;category&amp;quot; as an example but you can convert this tutorial for invoice, proposal ...&lt;br /&gt;
&lt;br /&gt;
*First thing is to add a table, owned by your module, to store the value of new fields. This table will have only one column called &amp;quot;rowid&amp;quot; (will contain the same value than field rowid of element table) + one column for each new field you want to add. Then create a class with CRUD (Create/Read/Update/Delete) methods for this new table. For this two tasks, go back to previous chapter [[#Create your SQL tables and the PHP DAO class]].&lt;br /&gt;
*Next step is to add a hook into your module to add the new fields into the form. See chapter [[Hooks_system#Implement_the_Hook]] for generic documentation to use hooks.&lt;br /&gt;
&lt;br /&gt;
If you follow this tutorial, to be able to add fields into category forms, you must do:&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
&lt;br /&gt;
===Add/replace part of fields supported by hooks===&lt;br /&gt;
See chapter [[Hooks_system#Implement_the_Hook]] to know how to use Dolibarr existing hooks to add/replace code at Dolibarr hooks place.&lt;br /&gt;
&lt;br /&gt;
===Database access===&lt;br /&gt;
If you need to edit some data in the database inside your own table, use the PHP class generated before.&lt;br /&gt;
&lt;br /&gt;
If you to make access to tables with no dedicated PHP class available, this is always possible (for example if you want to get a list of records with a particular join or filter). In this case, this is a code samples to follow:&lt;br /&gt;
&lt;br /&gt;
To make an insert, update or delete:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$db-&amp;gt;begin();   // Start transaction&lt;br /&gt;
$db-&amp;gt;query(&amp;quot;My SQL request insert, update or delete&amp;quot;);&lt;br /&gt;
$db-&amp;gt;commit();       // Validate transaction&lt;br /&gt;
or $db-&amp;gt;rollback()  // Cancel transaction&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To read:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$resql=$db-&amp;gt;query(&amp;quot;My select request&amp;quot;);&lt;br /&gt;
if ($resql)&lt;br /&gt;
{&lt;br /&gt;
	$num = $db-&amp;gt;num_rows($resql);&lt;br /&gt;
	$i = 0;&lt;br /&gt;
	if ($num)&lt;br /&gt;
	{&lt;br /&gt;
		while ($i &amp;lt; $num)&lt;br /&gt;
		{&lt;br /&gt;
			$obj = $db-&amp;gt;fetch_object($resql);&lt;br /&gt;
			if ($obj)&lt;br /&gt;
			{&lt;br /&gt;
				// You can use here results&lt;br /&gt;
				print $obj-&amp;gt;field1;&lt;br /&gt;
				print $obj-&amp;gt;field2;&lt;br /&gt;
			}&lt;br /&gt;
			$i++;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Define style of your pages===&lt;br /&gt;
To have the look of your own pages to match the Dolibarr theme, it is necessary to use the Dolibarr CSS styles.&lt;br /&gt;
&lt;br /&gt;
You can use for example:&lt;br /&gt;
&lt;br /&gt;
*class=&amp;quot;&#039;&#039;&#039;liste_titre&#039;&#039;&#039;&amp;quot; on tags &#039;&#039;tr&#039;&#039; and &#039;&#039;td&#039;&#039; for the head row of a table.&lt;br /&gt;
*class=&amp;quot;&#039;&#039;&#039;pair&#039;&#039;&#039;&amp;quot; or class=&amp;quot;&#039;&#039;&#039;impair&#039;&#039;&#039;&amp;quot; on tags &#039;&#039;tr&#039;&#039; and &#039;&#039;td&#039;&#039; of other rows of a table.&lt;br /&gt;
*class=&amp;quot;&#039;&#039;&#039;flat&#039;&#039;&#039;&amp;quot; on all input fields (&#039;&#039;input, select, textarea&#039;&#039;...).&lt;br /&gt;
*class=&amp;quot;&#039;&#039;&#039;button&#039;&#039;&#039;&amp;quot; on HTML fields with type &#039;&#039;input type=&amp;quot;submit&amp;quot;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Use the Dolibarr date picker===&lt;br /&gt;
If you want to use the Dolibarr date selector (with its calendar popup) into your pages, use the following line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
 $form=new Form($db);&lt;br /&gt;
 $form-&amp;gt;select_date(&#039;&#039;,&#039;mykey&#039;,0,0,0,&amp;quot;myform&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The string mykey will identify the date selector in the form. You must use different values if you use several date selectors in same page.&lt;br /&gt;
The string myform is the name of the FORM in which the selector is included (value found in the form name=&amp;quot;myform&amp;quot; in HTML page).&lt;br /&gt;
This means a date selector must be included necessarily into an html FORM.&lt;br /&gt;
&lt;br /&gt;
To get value after the POST of your form, the command is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$mydate = dol_mktime(12, 0 , 0, $GETPOST(&#039;mykeymonth&#039;, &#039;int&#039;), GETPOST(&#039;mykeyday&#039;, &#039;int&#039;), GETPOST(&#039;mykeyyear&#039;, &#039;int&#039;));&lt;br /&gt;
print strftime(&#039;%A %d %B %Y&#039;, $mydate);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Overwrite template file (tpl)===&lt;br /&gt;
If you want to overwrite tpl file on your module, you need to declare it on the module_parts :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
&#039;tpl&#039; =&amp;gt; 1,&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then you can put any tpl file on &#039;&#039;&#039;mymodule/core/tpl&#039;&#039;&#039;&lt;br /&gt;
as soon as the module is activate, the tpl will be overwrited&lt;br /&gt;
&lt;br /&gt;
==Add your own setup page (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If your module needs parameters, which are to be provided by the user, for proper setting up of the module.&lt;br /&gt;
&lt;br /&gt;
===Create your page to edit parameters===&lt;br /&gt;
If your module needs several parameters to be setup, you must create a page to edit options (these options will be saved in the [[Table llx_const|table &#039;&#039;&#039;llx_const&#039;&#039;&#039;]]).&lt;br /&gt;
Create a page named &#039;&#039;&#039;mymodule_setuppage.php&#039;&#039;&#039; that shows a form for possible options to update them into the above-mentioned table.&lt;br /&gt;
It is necessary to take an example from a page of the directory &#039;&#039;&#039;/admin&#039;&#039;&#039; that will show you the way to read/save your parameters.&lt;br /&gt;
Put this PHP page into the directory &#039;&#039;&#039;/admin&#039;&#039;&#039; of your module (e.g. mymodule/admin/mymodule_setuppage.php).&lt;br /&gt;
&lt;br /&gt;
===Modify the descriptor file of your module===&lt;br /&gt;
Then, within the descriptor file of your module, modify the variable &#039;&#039;&#039;config_page_url&#039;&#039;&#039; to set the name of this PHP page.&lt;br /&gt;
If the page is in the directory &#039;&#039;&#039;admin/&#039;&#039;&#039;, then the path is not required, e.g. like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;config_page_url = array(&amp;quot;mymodule_setuppage.php&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If the page is in the directory &#039;&#039;&#039;mymodule/admin/&#039;&#039;&#039;, then like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;config_page_url = array(&amp;quot;mymodule_setuppage.php@mymodule&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test your page===&lt;br /&gt;
Go into page &#039;&#039;&#039;Home-&amp;gt;Setup-&amp;gt;Modules&#039;&#039;&#039;, you should see a picture at the end of the line of your module to reach your setup page. Click on it, you should be able to view/edit parameters from your page.&lt;br /&gt;
&lt;br /&gt;
==Define your entries in menu (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If you have created PHP pages, it is necessary that those pages can be reached from menu entries in Dolibarr menu.&lt;br /&gt;
&lt;br /&gt;
===Define your menu entries===&lt;br /&gt;
For this, you must define into the module descriptor, the array this-&amp;gt;menu that declares all menus added by your module.&lt;br /&gt;
This array contains entries that will appear once your module is activated.&lt;br /&gt;
The example module descriptor file &#039;&#039;&#039;modMyModule.class.php&#039;&#039;&#039; contains an example to declare a top menu and also its left menu entries.&lt;br /&gt;
&lt;br /&gt;
This is the example of code to declare your own menu entries in a module descriptor file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
// Main menu entries&lt;br /&gt;
$this-&amp;gt;menu = array();			// List of menus to add&lt;br /&gt;
$r=0;&lt;br /&gt;
&lt;br /&gt;
// Add here entries to declare new menus&lt;br /&gt;
// Example to declare the Top Menu entry:&lt;br /&gt;
$this-&amp;gt;menu[$r]=array(	&#039;fk_menu&#039;=&amp;gt;0,			// Put 0 if this is a top menu&lt;br /&gt;
			&#039;type&#039;=&amp;gt;&#039;top&#039;,			// This is a Top menu entry&lt;br /&gt;
			&#039;titre&#039;=&amp;gt;&#039;MyModule top menu&#039;,&lt;br /&gt;
			&#039;mainmenu&#039;=&amp;gt;&#039;mymodule&#039;,&lt;br /&gt;
			&#039;leftmenu&#039;=&amp;gt;&#039;mymodule&#039;,&lt;br /&gt;
			&#039;url&#039;=&amp;gt;&#039;/mymodule/pagetop.php&#039;,&lt;br /&gt;
			&#039;langs&#039;=&amp;gt;&#039;mylangfile&#039;,	// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.&lt;br /&gt;
			&#039;position&#039;=&amp;gt;100,&lt;br /&gt;
			&#039;enabled&#039;=&amp;gt;&#039;1&#039;,			// Define condition to show or hide menu entry. Use &#039;$conf-&amp;gt;mymodule-&amp;gt;enabled&#039; if entry must be visible if module is enabled.&lt;br /&gt;
			&#039;perms&#039;=&amp;gt;&#039;1&#039;,			// Use &#039;perms&#039;=&amp;gt;&#039;$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;level1-&amp;gt;level2&#039; if you want your menu with a permission rules&lt;br /&gt;
			&#039;target&#039;=&amp;gt;&#039;&#039;,&lt;br /&gt;
			&#039;user&#039;=&amp;gt;2);				// 0=Menu for internal users, 1=external users, 2=both&lt;br /&gt;
$r++;&lt;br /&gt;
&lt;br /&gt;
// Example to declare a Left Menu entry:&lt;br /&gt;
$this-&amp;gt;menu[$r]=array(	&#039;fk_menu&#039;=&amp;gt;&#039;fk_mainmenu=xxx&#039;,		    // Use &#039;fk_mainmenu=xxx&#039; or &#039;fk_mainmenu=xxx,fk_leftmenu=yyy&#039; where xxx is mainmenucode and yyy is a leftmenucode of parent menu&lt;br /&gt;
			&#039;type&#039;=&amp;gt;&#039;left&#039;,			        // This is a Left menu entry&lt;br /&gt;
			&#039;titre&#039;=&amp;gt;&#039;MyModule left menu 1&#039;,&lt;br /&gt;
			&#039;mainmenu&#039;=&amp;gt;&#039;xxx&#039;,&lt;br /&gt;
			&#039;leftmenu&#039;=&amp;gt;&#039;yyy&#039;,&lt;br /&gt;
			&#039;url&#039;=&amp;gt;&#039;/mymodule/pagelevel1.php&#039;,&lt;br /&gt;
			&#039;langs&#039;=&amp;gt;&#039;mylangfile&#039;,	// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.&lt;br /&gt;
			&#039;position&#039;=&amp;gt;100,&lt;br /&gt;
			&#039;enabled&#039;=&amp;gt;&#039;1&#039;,			// Define condition to show or hide menu entry. Use &#039;$conf-&amp;gt;mymodule-&amp;gt;enabled&#039; if entry must be visible if module is enabled.&lt;br /&gt;
			&#039;perms&#039;=&amp;gt;&#039;1&#039;,			// Use &#039;perms&#039;=&amp;gt;&#039;$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;level1-&amp;gt;level2&#039; if you want your menu with a permission rules&lt;br /&gt;
			&#039;target&#039;=&amp;gt;&#039;&#039;,&lt;br /&gt;
			&#039;user&#039;=&amp;gt;2);				// 0=Menu for internal users,1=external users, 2=both&lt;br /&gt;
$r++;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To show the menu or not depending on a permission, modify property &#039;&#039;&#039;perms&#039;&#039;&#039; in the array. See chapter on permissions later to see how to add permissions.&lt;br /&gt;
&lt;br /&gt;
===Test your menu entries===&lt;br /&gt;
Disable and re-enable your module under the Dolibarr module setup page, menus entries must appear (if property &#039;enabled&#039; is declaration array is ok).&lt;br /&gt;
&lt;br /&gt;
==Add your own permissions (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If you want to add new permissions.&lt;br /&gt;
&lt;br /&gt;
The way to define permissions that will manage your module is done inside the module descriptor created previously.&lt;br /&gt;
Modify line &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;rights_class = &#039;mymodule&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
with correct value for mymodule.&lt;br /&gt;
&lt;br /&gt;
Then you must fill the array $this-&amp;gt;rights with as many entries than different permissions you need to manage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;rights[$r][0] = 10001;&lt;br /&gt;
$this-&amp;gt;rights[$r][1] = &#039;Label by default of permission&#039;;&lt;br /&gt;
$this-&amp;gt;rights[$r][2] = &#039;r&#039;;&lt;br /&gt;
$this-&amp;gt;rights[$r][3] = 1;&lt;br /&gt;
$this-&amp;gt;rights[$r][4] = &#039;action&#039;;&lt;br /&gt;
$this-&amp;gt;rights[$r][5] = &#039;subaction&#039;;&lt;br /&gt;
$r++;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Into $this-&amp;gt;rights[$r][0], put a permission id not already used (See into menu &#039;&#039;&#039;System info&#039;&#039;&#039; on a working installation of Dolibarr to know list of id already used by standard modules.&lt;br /&gt;
Into $this-&amp;gt;rights[$r][1], put a label by default for permission (This label will be used if no translation can be found into the file &#039;&#039;&#039;admin.lang&#039;&#039;&#039; Translation key should be &amp;quot;Permission10001=My permission Label&amp;quot;).&lt;br /&gt;
Into $this-&amp;gt;rights[$r][2], types of the permission. There are three type of permission, &#039;r&#039; for read, list or expert permission, &#039;w&#039; for write or update permission and &#039;d&#039; for delete permission.&lt;br /&gt;
Into $this-&amp;gt;rights[$r][3], put 1 if this permission must be granted automatically by default to any newly created user.&lt;br /&gt;
Into $this-&amp;gt;rights[$r][4] and $this-&amp;gt;rights[$r][5], put an action and subaction string without spaces. You will be able to test if a user has the permission in your PHP source code with the sequence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
if ($user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;action-&amp;gt;subaction) ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Define your own box (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If your module needs to provide one or several new boxes to show on home page.&lt;br /&gt;
&lt;br /&gt;
===Define your box===&lt;br /&gt;
For this, modify the array $this-&amp;gt;boxes into the module descriptor file.&lt;br /&gt;
All you have to do is to add 2 lines for each box file you will create into directory &#039;&#039;&#039;htdocs/mymodule/core/boxes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;boxes[0][&#039;file&#039;]=&#039;mybox0.php@mymodule&#039;&lt;br /&gt;
$this-&amp;gt;boxes[0][&#039;note&#039;]=&#039;My box 0&#039;&lt;br /&gt;
 ...&lt;br /&gt;
$this-&amp;gt;boxes[n][&#039;file&#039;]=&#039;myboxn.php@mymodule&#039;&lt;br /&gt;
$this-&amp;gt;boxes[n][&#039;note&#039;]=&#039;My box n&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then create files &#039;&#039;&#039;htdocs/mymodule/core/boxes/mybox0.php&#039;&#039;&#039;, &#039;&#039;&#039;htdocs/mymodule/core/boxes/mybox1.php&#039;&#039;&#039;... by copying an example from an existing box file (found into directory &#039;&#039;&#039;htdocs/core/boxes&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
===Test if your box is detected by Dolibarr===&lt;br /&gt;
Disable and enabled module.&lt;br /&gt;
&lt;br /&gt;
Go into menu &#039;&#039;&#039;Home - Setup - Boxes&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Your boxes must appear in the list of boxes you can activate. Activate the box and go on the home page to see if the box is showing correctly.&lt;br /&gt;
&lt;br /&gt;
==Define your own export (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If your module provides new predefined database export profiles (for its own tables or for already existing tables of another module).&lt;br /&gt;
&lt;br /&gt;
===Define export===&lt;br /&gt;
For this uncomment and modify arrays $this-&amp;gt;export_xxx in your module descriptor file.&lt;br /&gt;
&lt;br /&gt;
===Test your export===&lt;br /&gt;
Go into menu Tools -&amp;gt; Export. Your export will appear in the list of available predefined exports (if your module is enabled).&lt;br /&gt;
Choose it, you must see a list of all possible fields defined in the export arrays.&lt;br /&gt;
Choose on field and try to build an export file. If ok, try again with all fields.&lt;br /&gt;
&lt;br /&gt;
==Define your CSS styles (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If in your PHP pages, you use class styles that are not defined inside Dolibarr themes CSS (not recommanded).&lt;br /&gt;
&lt;br /&gt;
===Create and declare your style sheet===&lt;br /&gt;
Create a style sheet CSS named &#039;&#039;&#039;mymodule.css&#039;&#039;&#039; or &#039;&#039;&#039;mymodule.css.php&#039;&#039;&#039; and put it into directory &#039;&#039;&#039;htdocs/mymodule&#039;&#039;&#039;. You can have several CSS files per module.&lt;br /&gt;
Remember it&#039;s better to use existing styles already available by default into Dolibarr (The CSS file used by Dolibarr is file &#039;&#039;&#039;themes/mytheme/&#039;&#039;themename&#039;&#039;.css.php&#039;&#039;&#039;. Create your own CSS files only if you need absolutely to add not already existing styles.&lt;br /&gt;
&lt;br /&gt;
Once your style sheets are ready, declare them into your module descriptor file by modifying the property &#039;&#039;&#039;$this-&amp;gt;modules_parts&#039;&#039;&#039;.&lt;br /&gt;
Value to put here must be an array of relative URLs to your CSS files.&lt;br /&gt;
For example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;module_parts = array(&#039;css&#039; =&amp;gt; array(&#039;/mymodule/css/mymodule.css.php&#039;,&#039;/mymodule/css/myother.css&#039;));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test your style sheet===&lt;br /&gt;
Disable and enable your module.&lt;br /&gt;
&lt;br /&gt;
Go on the home page (index.php). Show the HTML source of the page.&lt;br /&gt;
&lt;br /&gt;
You should see into the HTML header, a line that declares your style sheet.&lt;br /&gt;
&lt;br /&gt;
==Add your Javascript functions (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If in your PHP pages, you use javascript functions not available in Dolibarr (in file lib_head.js)&lt;br /&gt;
&lt;br /&gt;
If you need to use your own javascript functions inside your PHP pages, it is necessary to have your functions, defined into your javascript file &#039;&#039;&#039;htdocs/mymodule/js/mymodule.js&#039;&#039;&#039;, included into the HTML HEAD section.&lt;br /&gt;
To ask Dolibarr that forge this header to include your own javascript file, you must just provide it to the llxHeader() function called by your page.&lt;br /&gt;
&lt;br /&gt;
Example for page /htdocs/mymodule/mypage.php :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$morejs=array(&amp;quot;/mymodule/js/mymodule.js&amp;quot;);&lt;br /&gt;
llxHeader(&#039;&#039;,&#039;Titre&#039;,&#039;&#039;,&#039;&#039;,&#039;&#039;,&#039;&#039;,$morejs,&#039;&#039;,0,0); &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Run your own code on any Dolibarr event (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If you want to execute your own code once a common Dolibarr event has occurred (example: I want to update a table in my module when an invoice is created into Dolibarr), you must create a &#039;&#039;&#039;triggers&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
See also [[Interfaces_Dolibarr_toward_foreign_systems]]&lt;br /&gt;
and [[Interfaces_from_foreign_systems_toward_Dolibarr]]&lt;br /&gt;
&lt;br /&gt;
==Insert your code inside Dolibarr hooks positions (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: When you want to add code or replace Dolibarr code into another situation than a business event (See the previous chapter for adding code during a business event).&lt;br /&gt;
&lt;br /&gt;
See page [[Hooks_system]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Add your own numbering rules==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: When you need a new rule for generated ref of elements that are not covered by existing rules.&lt;br /&gt;
&lt;br /&gt;
See page [[Create numbering module]].&lt;br /&gt;
&lt;br /&gt;
==Add your document template (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: When you want to personalized your own generated PDF or ODT documents.&lt;br /&gt;
&lt;br /&gt;
Note: To add this feature you don&#039;t need to create a module descriptor.&lt;br /&gt;
&lt;br /&gt;
Documentation to add your own template is available on page [[Create_a_PDF_document_template]] or [[Create_an_ODT_document_template]].&lt;br /&gt;
&lt;br /&gt;
==Add your skin (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: When you want to personalized your colors/fonts/images.&lt;br /&gt;
&lt;br /&gt;
Note: To add this feature you don&#039;t need to create a module descriptor.&lt;br /&gt;
&lt;br /&gt;
To add your own skin, read page [[Skins]].&lt;br /&gt;
&lt;br /&gt;
=Some coding rules and predefined functions=&lt;br /&gt;
The coding rules to be followed are defined in the [[Developer documentation]], under section &amp;quot;General Information - Language and standards development&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
A lot of predefined features for developers are also available and described into page [[Developer documentation]] under section &amp;quot;Technical components of Dolibarr&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=Create a package to distribute and install your module=&lt;br /&gt;
This process must be used to generate a package to submit it on the http://www.dolistore.com marketplace.&lt;br /&gt;
But you can use it to have a package easy to distribute on your own network.&lt;br /&gt;
&lt;br /&gt;
*Go into the directory &#039;&#039;&#039;/build&#039;&#039;&#039; and copy the file &#039;&#039;&#039;makepack-dolibarrmodules.conf&#039;&#039;&#039; into &#039;&#039;&#039;makepack-mymodule.conf&#039;&#039;&#039;. Warning, this directory may not be provided in some packages of stable versions. If so, it can be retrieved from the snapshot available for download on the Dolibarr website in area &amp;quot;Development version&amp;quot; (taken in this case the whole build directory which is autonomous and independent directory).&lt;br /&gt;
&lt;br /&gt;
Edit this file to add a list of file names for all new files you created for your module (module descriptor, new sql tables files, php page, images, etc...)&lt;br /&gt;
&lt;br /&gt;
*Run the script via Perl (need the Perl version 5.0 or later):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
perl makepack-dolibarrmodule.pl&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The script asks you the name of your module, its major and minor version. A file &#039;&#039;&#039;mymodule.zip &#039;&#039;&#039; will then be manufactured containing your module ready to be deployed.&lt;br /&gt;
&lt;br /&gt;
*The person who receives your module must then place the file in the root directory of a Dolibarr installation and perform the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf mymodule.zip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If you want your module to be public, you can submit it (the zip file) on Dolibarr marketplace website: {{LinkToPluginDownload}} (you must create an account first and be logged to use the link &amp;quot;Submit a module/product&amp;quot;).&lt;br /&gt;
**If your module was built correctly, the file will be validated later.&lt;br /&gt;
**If quality is enough and license permits it, the code might be added inside main Dolibarr sources (except if you disagree for that).&lt;br /&gt;
&lt;br /&gt;
=Enabling/activation condition of external module on DoliStore=&lt;br /&gt;
&lt;br /&gt;
See [[Module_Dolistore_Validation_Rules|Validation Rules]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_development&amp;diff=62265</id>
		<title>Module development</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_development&amp;diff=62265"/>
		<updated>2025-01-23T23:00:18Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Développement_module]]&lt;br /&gt;
[[es:Desarrollo_de_un_módulo]]&lt;br /&gt;
[[de:Modul_Entwicklung]]&lt;br /&gt;
[[zh:模块开发]]&lt;br /&gt;
[[ja:モジュール_開発]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Core]]&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
&lt;br /&gt;
To create a new module/addon for Dolibarr, there is several steps. This tutorial will describe you each of them to build a module to extend Dolibarr features, like one or several of the following :&lt;br /&gt;
&lt;br /&gt;
*Add new tables in database.&lt;br /&gt;
*Add your own menu entries.&lt;br /&gt;
*Add new screens to edit new tables.&lt;br /&gt;
*Add or remove tabs on object view (invoice, product, order, event, ...).&lt;br /&gt;
*Add predefined exports for the internal export tool.&lt;br /&gt;
*Add new information widget in the home page.&lt;br /&gt;
*Add new substitutions variables.&lt;br /&gt;
*Define new permissions.&lt;br /&gt;
*Execute code automatically triggered by a particular Dolibarr action.&lt;br /&gt;
*Insert your code inside Dolibarr hooks positions.&lt;br /&gt;
*Add your numbering rule to generate the reference of objects&lt;br /&gt;
*Add a new document template.&lt;br /&gt;
*Add a new skin.&lt;br /&gt;
&lt;br /&gt;
etc...&lt;br /&gt;
&lt;br /&gt;
Following chapters presents how to do all of this manually with an easy way.&lt;br /&gt;
&lt;br /&gt;
=Module creation with the module builder=&lt;br /&gt;
From Dolibarr v. 12.0 it is possible to create the main pages of your module with the Module Builder. To activate it:&lt;br /&gt;
&lt;br /&gt;
Go into the list of module and enable the module &amp;quot;Module Builder&amp;quot;[[File:Module Builder.png|alt=Module Builder|thumb|left]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then click on the &amp;quot;bug&amp;quot; image in the top right of screen.&lt;br /&gt;
&lt;br /&gt;
[[File:Module Builder icon.png|alt=Module Builder icon|left|thumb]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=Template of an External Module=&lt;br /&gt;
A good model to start development of external module can be found here : [https://github.com/Dolibarr/dolibarr/tree/develop/htdocs/modulebuilder/template GitHub Dolibarr Module Modèle]&lt;br /&gt;
&lt;br /&gt;
=Create your module=&lt;br /&gt;
==Create a Module descriptor for your Module (required)==&lt;br /&gt;
&#039;&#039;&#039;When it is required&#039;&#039;&#039;: Required as soon as an addon is developed, whatever its goal is (except for adding a skin).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since Dolibarr 9.0, you should use the ModuleBuilder module provided as a standard module to generate the module descriptor&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Create your module descriptor===&lt;br /&gt;
The first step is to create a file descriptor for the module. &lt;br /&gt;
&lt;br /&gt;
*Create directory &#039;&#039;&#039;/htdocs/custom/&#039;&#039;mymodule&#039;&#039;/core/modules&#039;&#039;&#039; (for an external module) or &#039;&#039;&#039;/htdocs/&#039;&#039;mymodule&#039;&#039;/core/modules&#039;&#039;&#039; if you plan to have this module an official core module of Dolibarr. Then copy the file modMyModule.class.php from the directory &#039;&#039;&#039;htdocs/modulebuilder/template&#039;&#039;&#039; into this directory. Change the name of the file modMyModule.class.php to the name corresponding to the purpose of your module. Name of the file must start with initial &#039;mod&#039; and end with .class.php (for example if you want to give the name &#039;NewName&#039; to this file, then the name should be &#039;modNewName.class.php&#039;).&lt;br /&gt;
&lt;br /&gt;
Next modify the contents of this file as follows:&lt;br /&gt;
&lt;br /&gt;
*Replace all &amp;quot;modMyModule&amp;quot; with a value which corresponds to the purpose of your module. This value must always start with &#039;mod&#039; and contain only alpha characters (again, if the name given to the file was &#039;NewName&#039;, then replace all &amp;quot;modMyModule&amp;quot; with &amp;quot;modNewName&amp;quot;).&lt;br /&gt;
*Change the number in: $this-&amp;gt;numero = 100000 by a number that designates your module id. To avoid conflicts with other modules, you can consult the page that lists already reserved id numbers: [[List of modules id|List of modules id]].&lt;br /&gt;
*Modify any other variables defined in the constructor (see comment in the code skeleton for their meaning).&lt;br /&gt;
&lt;br /&gt;
Your file descriptor for your module is ready. See the next step to activate it.&lt;br /&gt;
&lt;br /&gt;
===Test your descriptor===&lt;br /&gt;
&lt;br /&gt;
Launch Dolibarr and go to page &#039;&#039;&#039;Setup-&amp;gt;module&#039;&#039;&#039;? &lt;br /&gt;
If you set the property version in the module description you should see a new line with your new module and the possibility to activate it or not. If you set the property version to &amp;quot;develop&amp;quot; or &amp;quot;experiental&amp;quot;, to see your module, you must first go into &#039;&#039;&#039;Setup-Others&#039;&#039;&#039; and set MAIN_FEATURES_LEVEL to 1 to see &amp;quot;experimental&amp;quot; modules or 2 to see &amp;quot;development&amp;quot; modules.&lt;br /&gt;
&lt;br /&gt;
==Tree of path for new module files (required)==&lt;br /&gt;
This is how your files must be organized when building a new module (the zip file must also match this rule).&lt;br /&gt;
Note: Only the second line is mandatory.&lt;br /&gt;
&lt;br /&gt;
{{TemplateModuleTreeSimple}}&lt;br /&gt;
&lt;br /&gt;
==Create your SQL tables and the PHP DAO class (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If your module needs to manage data of its own&lt;br /&gt;
&lt;br /&gt;
===Create your .sql file===&lt;br /&gt;
If your module is designed to manage data of its own, which are not available in the standard version of Dolibarr, it is necessary to define SQL tables to store the data.&lt;br /&gt;
&lt;br /&gt;
Scripts for creating tables and loading data by your own module are saved into a subdirectory sql (&#039;&#039;&#039;&amp;quot;mymodule/sql&amp;quot;&#039;&#039;&#039;) of your module. (With ModuleBuilder, the directory and all sql files will be created automatically when you will create a new Object from tab Object).&lt;br /&gt;
&lt;br /&gt;
Then check into your descriptor file, into function &#039;&#039;&#039;init&#039;&#039;&#039; that the line&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;$this-&amp;gt;_load_tables(&#039;/mymodule/sql/&#039;);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is not commented.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rules to follow:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Add the files about creating tables commands on the principle of an &#039;&#039;&#039;llx_mytable.sql&#039;&#039;&#039; file per table, with an optional &#039;&#039;&#039;llx_mytable.key.sql&#039;&#039;&#039; file (see existing files in &#039;&#039;&#039;install/mysql/tables&#039;&#039;&#039; for examples).&lt;br /&gt;
*The recommended type and name for SQL fields are defined into page [[Language_and_development_rules#Table_and_fields_structures]].&lt;br /&gt;
*To manage data, you must create a file called &#039;&#039;&#039;data.sql&#039;&#039;&#039; inside directory &#039;&#039;&#039;/mymodule/sql/&#039;&#039;&#039; that contains SQL command to add/edit/delete data.&lt;br /&gt;
*Don&#039;t use the double quote for strings (eg &#039;chaine&#039; not &amp;quot;chaine&amp;quot;) because the double quote have a specific meaning in PostGreSQL&lt;br /&gt;
&lt;br /&gt;
Example of content of a file data.sql&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
 delete from llx_const where name=&#039;MYMODULE_IT_WORKS&#039; and entity=&#039;__ENTITY__&#039;;&lt;br /&gt;
 insert into llx_const (name, value, type, note, visible, entity) values (&#039;MYMODULE_IT_WORKS&#039;,&#039;1&#039;,&#039;chaine&#039;,&#039;A constant vor my module&#039;,1,&#039;__ENTITY__&#039;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files must be operational for the database mysql. Rem: The files of other databases are not maintained. They will be read and converted on the fly by the driver of the other database.&lt;br /&gt;
&lt;br /&gt;
===Test your .sql files===&lt;br /&gt;
&lt;br /&gt;
Once the files ready, you can return to the page to enable Dolibarr modules and disable the module, drop those tables in the database (if they already exists) and reactivate the module. The tables should be recreated by the activation of the module. If this is not the case, check your scripts by passing them by hand, or check the Dolibarr logs.&lt;br /&gt;
&lt;br /&gt;
===Generate the PHP DAO class===&lt;br /&gt;
The DAO PHP files should have been generated by ModuleBuilder after creating an object.&lt;br /&gt;
&lt;br /&gt;
You can however create them manually by copying existing object however using ModuleBuilder is highly recommended. You should find examples into &#039;&#039;&#039;htdocs/modulebuilder/templates/class/myobject.class.php&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In this class, there are already operational CRUD (Create/Read/Update/Delete) methods to perform an insert, a fetch (select), an update, a delete of a table row. Edit the file to use the correct module name, tables and place this file in the class subdirectory of the module. The Module Builder allows you to do this with just a few mouse clicks.&lt;br /&gt;
&lt;br /&gt;
==The tab management (optional)==&lt;br /&gt;
&lt;br /&gt;
===Add or remove your own tabs on object sheets===&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: To add a tab on an object (invoices, orders, proposals, member ...)&lt;br /&gt;
&lt;br /&gt;
To do this go into the file descriptor of module previously created and edit the $this-&amp;gt;tabs array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
	// Array to add new pages in new tabs or remove existing one&lt;br /&gt;
	$this-&amp;gt;tabs = array(&#039;objecttype:+tabname1:Title1:mylangfile@mymodule:$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;read:/mymodule/mypagetab1.php?id=__ID__&#039;    // To add a new tab identified by code tabname1&lt;br /&gt;
                            &#039;objecttype:+tabname2:Title2:mylangfile@mymodule:$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;read:/mymodule/mypagetab2.php?id=__ID__&#039;,   // To add a new tab identified by code tabname2&lt;br /&gt;
                            &#039;objecttype:-tabname&#039;);                                                     // To remove an existing tab identified by code tabname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The table should contain a list of strings, each string representing a new tab. &lt;br /&gt;
The format of the string consisting of 5 parts separated by &amp;quot;:&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Part 1: The element type (object type) where the tab should appear is a value from the following:&lt;br /&gt;
{{TemplateModuleTabs}}&lt;br /&gt;
&lt;br /&gt;
*Part 2: A code to identify tab to add (start with +tabname1) or to remove (start with -tabname1)&lt;br /&gt;
*Part 3: The title of the tab(Title1). This can be a hardcoded read or better a code translation in module lang file .&lt;br /&gt;
*Part 4: The name of the file &amp;quot;*.lang&amp;quot; (mylangfile@mymodule) which contains correspondence between the code translation and language to display. If this name is followed with @mymodule, Dolibarr will search translation file &amp;quot;*.lang&amp;quot; within the module in htdocs/custom/mymodule/langs/code_CODE/mylangfile.lang, otherwise Dolibarr will look for file in htdocs/langs/code_CODE/mylangfile.lang&lt;br /&gt;
*Part 5: A condition to test if tab must be visible($user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;read) &#039;&#039;&#039;or&#039;&#039;&#039; put 1 to be always visible.&lt;br /&gt;
*Part 6: The URL of the page to display when you click on the tab (/mymodule/mypagetab1.php). The __ID__ string will be replaced automatically by the Id of the element concerned.&lt;br /&gt;
&lt;br /&gt;
To feed the contents of the tab with data from the database, see the next chapter.&lt;br /&gt;
&lt;br /&gt;
In order to get the names  &#039;tabname&#039; of existing tabs, you have to check the names used in the function &#039;product_prepare_head&#039; of the file  &#039;core/lib/module.lib.php&#039; corresponding to section &#039;$head[$h][2]&#039;.&lt;br /&gt;
&lt;br /&gt;
===Show tabs navigation into your own pages===&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: To show all standard tabs of an object (product, tiers, etc.) on your page.&lt;br /&gt;
&lt;br /&gt;
You must follow these steps :&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Include files you need into your file&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For each object type, there are two files to include with line&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;require_once($url_fichier) ;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is example of files to include (DOL_DOCUMENT_ROOT is often dolibarr/htdocs/) :&lt;br /&gt;
&lt;br /&gt;
*Object thirdparty (thirdparty) :&lt;br /&gt;
**DOL_DOCUMENT_ROOT/societe/class/societe.class.php&lt;br /&gt;
**DOL_DOCUMENT_ROOT/core/lib/company.lib.php&lt;br /&gt;
*Object product (product) :&lt;br /&gt;
**DOL_DOCUMENT_ROOT/product/class/product.class.php&lt;br /&gt;
**DOL_DOCUMENT_ROOT/core/lib/product.lib.php&lt;br /&gt;
*Object invoice (invoice) :&lt;br /&gt;
**DOL_DOCUMENT_ROOT/compta/facture/class/facture.class.php&lt;br /&gt;
**DOL_DOCUMENT_ROOT/core/lib/invoice.lib.php&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create and load the object to show into your tab&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create an instance of an object of the correct class and load object from the database by using the fetch method of an object in providing to this method the id you get from URL (ie : /mytab.php?id=1).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example :&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$id=GETPOST(&#039;id&#039;,&#039;int&#039;);&lt;br /&gt;
$ref=GETPOST(&#039;ref&#039;,&#039;alpha&#039;);&lt;br /&gt;
$product = new Product($db) ;&lt;br /&gt;
$result = $product-&amp;gt;fetch($id,$ref) ; // Test $result to check the database read is ok&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Get a list of all tabs to show for your object type&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use function XXX_prepare_head($obj), where XXX is name of object. This will return an array with all definition of tab entries to show. The parameter to put into this method is the instance of an object you want tabs.&lt;br /&gt;
&lt;br /&gt;
The resulting array has the following structure&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$head        // Array of tabs&lt;br /&gt;
$head[$h]    // Element to describe one tab.&lt;br /&gt;
$head[$h][0] // Url of page to show when you click on tab&lt;br /&gt;
$head[$h][1] // Title of tab&lt;br /&gt;
$head[$h][2] // Code name to identify the tab&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example :&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$head = product_prepare_head($product, $user) ; // parameter $user is present for some function anly&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4. show tabs into your page&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use function dol_fiche_head() to show all tabs defined into array $head returned by XX_prepare_head().&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
dol_fiche_head($links, $active=&#039;0&#039;, $title=&#039;&#039;, $notab=0, $picto=&#039;&#039;)&lt;br /&gt;
//$links  // Tableau des onglets, appelé $head plus haut.&lt;br /&gt;
//$active // Onglet actif (mettre le nom de l&#039;onglet défini dans votre fichier de module, ou un nom contenu dans $head[$h][2]). Cet onglet sera mis en surbrillance&lt;br /&gt;
//$title  // Title to show (shown into a special tab that you can&#039;t click)&lt;br /&gt;
//$notab&lt;br /&gt;
//$picto  // Name of image to show into title. Possible values are:&lt;br /&gt;
//            product&lt;br /&gt;
//            service&lt;br /&gt;
//            company&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function will show required tabs and open an html element &#039;&#039;&amp;lt; div class=&amp;quot;&amp;quot; &amp;gt;&#039;&#039; that correspond to the area under the tabs. To close area of a tab, just use &#039;&#039;&amp;lt; /div &amp;gt;&#039;&#039; into your PHP page.&lt;br /&gt;
&lt;br /&gt;
==Create or modify PHP screens (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If the purpose of your module is to add features that require new or modified screens.&lt;br /&gt;
&lt;br /&gt;
===Create a new PHP screen===&lt;br /&gt;
You must then create your PHP pages that will show/edit data from tables using the skeleton templates provided as an example in the directory &#039;&#039;&#039;modulebuilder/myobject_page.php&#039;&#039;&#039; (For the development of a script from the command line, see [[Script development]]).&lt;br /&gt;
&lt;br /&gt;
To create a new user screen, create a subdirectory of &#039;&#039;&#039;htdocs&#039;&#039;&#039; (if not already done) for your module (in &#039;&#039;&#039;htdocs/mymodule&#039;&#039;&#039; for example) to store the pages you will create.&lt;br /&gt;
&lt;br /&gt;
Copy, into that directory, the file &#039;&#039;&#039;myobject_page.php&#039;&#039;&#039; that will serve as a starting point for your page file.&lt;br /&gt;
Edit the file to have a correct relative path to the main.inc.php file. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
// Load Dolibarr environment&lt;br /&gt;
$res=0;&lt;br /&gt;
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; ! empty($_SERVER[&amp;quot;CONTEXT_DOCUMENT_ROOT&amp;quot;])) $res=@include($_SERVER[&amp;quot;CONTEXT_DOCUMENT_ROOT&amp;quot;].&amp;quot;/main.inc.php&amp;quot;);&lt;br /&gt;
// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME&lt;br /&gt;
$tmp=empty($_SERVER[&#039;SCRIPT_FILENAME&#039;])?&#039;&#039;:$_SERVER[&#039;SCRIPT_FILENAME&#039;];$tmp2=realpath(__FILE__); $i=strlen($tmp)-1; $j=strlen($tmp2)-1;&lt;br /&gt;
while($i &amp;gt; 0 &amp;amp;&amp;amp; $j &amp;gt; 0 &amp;amp;&amp;amp; isset($tmp[$i]) &amp;amp;&amp;amp; isset($tmp2[$j]) &amp;amp;&amp;amp; $tmp[$i]==$tmp2[$j]) { $i--; $j--; }&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; $i &amp;gt; 0 &amp;amp;&amp;amp; file_exists(substr($tmp, 0, ($i+1)).&amp;quot;/main.inc.php&amp;quot;)) $res=@include(substr($tmp, 0, ($i+1)).&amp;quot;/main.inc.php&amp;quot;);&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; $i &amp;gt; 0 &amp;amp;&amp;amp; file_exists(dirname(substr($tmp, 0, ($i+1))).&amp;quot;/main.inc.php&amp;quot;)) $res=@include(dirname(substr($tmp, 0, ($i+1))).&amp;quot;/main.inc.php&amp;quot;);&lt;br /&gt;
// Try main.inc.php using relative path&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; file_exists(&amp;quot;../main.inc.php&amp;quot;)) $res=@include(&amp;quot;../main.inc.php&amp;quot;);&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; file_exists(&amp;quot;../../main.inc.php&amp;quot;)) $res=@include(&amp;quot;../../main.inc.php&amp;quot;);&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; file_exists(&amp;quot;../../../main.inc.php&amp;quot;)) $res=@include(&amp;quot;../../../main.inc.php&amp;quot;);&lt;br /&gt;
if (! $res) die(&amp;quot;Include of main fails&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
As you can see, there are several tries to load the main.inc.php (or master.inc.php). The goal is to succeed in the most cases as possible. The minimum is 2 lines: one to try to load the master/main.inc.php into the dolibarr root directory and another one to try to load the file to support the case when the module is deployed into the &amp;quot;custom&amp;quot; directory. But you can have more to deal more situation. The provided example should be able to load the file main/master.inc.php in nearly all situation/setups.&lt;br /&gt;
&lt;br /&gt;
Note that you may add more &amp;quot;../&amp;quot; depending on the depth of the file relative to your module directory tree.&lt;br /&gt;
&lt;br /&gt;
It&#039;s in the main.inc.php file that is loaded technical environment variables and permissions. The following variables are objects positioned in this file:&lt;br /&gt;
&lt;br /&gt;
*$user    Object that contains the characteristics of the user + his permissions.&lt;br /&gt;
*$conf    Object that contains Dolibarr configuration.&lt;br /&gt;
*$db      Object that contains an opened connection handler to the database.&lt;br /&gt;
*$langs   Object that contains the user&#039;s language.&lt;br /&gt;
&lt;br /&gt;
Then enter your code to display the page.&lt;br /&gt;
&lt;br /&gt;
*To include a class or library dedicated to the module is done using a Dolibarr function (and not using directly include_once):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example :&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
dol_include_once(&#039;/mymodule/class/myclass.class.php&#039;, &#039;MyClass&#039;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*To include classes provided with Dolibarr, use the following syntax:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example :&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
require_once DOL_DOCUMENT_ROOT.&#039;/core/class/doli.class.php&#039;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add some fields into existing forms===&lt;br /&gt;
You may want to provide a module that adds more fields into forms (input and view) of some elements. &lt;br /&gt;
&lt;br /&gt;
A heavy solution (but not so bad) may be to replace all pages used to create element (this means to disable the &amp;quot;New element&amp;quot; menu entry and adding yours, and disable tab that shows element to replace with a tab that is your own full page (copied/pasted from original) to do same than original page but modified to add your fields and stored added data into your own table). Go to menu [[#Define your entries in the menu (optional)]] and [[#The tab management (optional)]] if this solution suits you (this solution is more powerful since you can change everything you want into the page). &lt;br /&gt;
&lt;br /&gt;
We will describe here another solution, that works only to &amp;quot;add fields&amp;quot; at end of existing fields, using the element &amp;quot;category&amp;quot; as an example but you can convert this tutorial for invoice, proposal ...&lt;br /&gt;
&lt;br /&gt;
*First thing is to add a table, owned by your module, to store the value of new fields. This table will have only one column called &amp;quot;rowid&amp;quot; (will contain the same value than field rowid of element table) + one column for each new field you want to add. Then create a class with CRUD (Create/Read/Update/Delete) methods for this new table. For this two tasks, go back to previous chapter [[#Create your SQL tables and the PHP DAO class]].&lt;br /&gt;
*Next step is to add a hook into your module to add the new fields into the form. See chapter [[Hooks_system#Implement_the_Hook]] for generic documentation to use hooks.&lt;br /&gt;
&lt;br /&gt;
If you follow this tutorial, to be able to add fields into category forms, you must do:&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
&lt;br /&gt;
===Add/replace part of fields supported by hooks===&lt;br /&gt;
See chapter [[Hooks_system#Implement_the_Hook]] to know how to use Dolibarr existing hooks to add/replace code at Dolibarr hooks place.&lt;br /&gt;
&lt;br /&gt;
===Database access===&lt;br /&gt;
If you need to edit some data in the database inside your own table, use the PHP class generated before.&lt;br /&gt;
&lt;br /&gt;
If you to make access to tables with no dedicated PHP class available, this is always possible (for example if you want to get a list of records with a particular join or filter). In this case, this is a code samples to follow:&lt;br /&gt;
&lt;br /&gt;
To make an insert, update or delete:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$db-&amp;gt;begin();   // Start transaction&lt;br /&gt;
$db-&amp;gt;query(&amp;quot;My SQL request insert, update or delete&amp;quot;);&lt;br /&gt;
$db-&amp;gt;commit();       // Validate transaction&lt;br /&gt;
or $db-&amp;gt;rollback()  // Cancel transaction&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To read:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$resql=$db-&amp;gt;query(&amp;quot;My select request&amp;quot;);&lt;br /&gt;
if ($resql)&lt;br /&gt;
{&lt;br /&gt;
	$num = $db-&amp;gt;num_rows($resql);&lt;br /&gt;
	$i = 0;&lt;br /&gt;
	if ($num)&lt;br /&gt;
	{&lt;br /&gt;
		while ($i &amp;lt; $num)&lt;br /&gt;
		{&lt;br /&gt;
			$obj = $db-&amp;gt;fetch_object($resql);&lt;br /&gt;
			if ($obj)&lt;br /&gt;
			{&lt;br /&gt;
				// You can use here results&lt;br /&gt;
				print $obj-&amp;gt;field1;&lt;br /&gt;
				print $obj-&amp;gt;field2;&lt;br /&gt;
			}&lt;br /&gt;
			$i++;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Define style of your pages===&lt;br /&gt;
To have the look of your own pages to match the Dolibarr theme, it is necessary to use the Dolibarr CSS styles.&lt;br /&gt;
&lt;br /&gt;
You can use for example:&lt;br /&gt;
&lt;br /&gt;
*class=&amp;quot;&#039;&#039;&#039;liste_titre&#039;&#039;&#039;&amp;quot; on tags &#039;&#039;tr&#039;&#039; and &#039;&#039;td&#039;&#039; for the head row of a table.&lt;br /&gt;
*class=&amp;quot;&#039;&#039;&#039;pair&#039;&#039;&#039;&amp;quot; or class=&amp;quot;&#039;&#039;&#039;impair&#039;&#039;&#039;&amp;quot; on tags &#039;&#039;tr&#039;&#039; and &#039;&#039;td&#039;&#039; of other rows of a table.&lt;br /&gt;
*class=&amp;quot;&#039;&#039;&#039;flat&#039;&#039;&#039;&amp;quot; on all input fields (&#039;&#039;input, select, textarea&#039;&#039;...).&lt;br /&gt;
*class=&amp;quot;&#039;&#039;&#039;button&#039;&#039;&#039;&amp;quot; on HTML fields with type &#039;&#039;input type=&amp;quot;submit&amp;quot;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Use the Dolibarr date picker===&lt;br /&gt;
If you want to use the Dolibarr date selector (with its calendar popup) into your pages, use the following line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
 $form=new Form($db);&lt;br /&gt;
 $form-&amp;gt;select_date(&#039;&#039;,&#039;mykey&#039;,0,0,0,&amp;quot;myform&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The string mykey will identify the date selector in the form. You must use different values if you use several date selectors in same page.&lt;br /&gt;
The string myform is the name of the FORM in which the selector is included (value found in the form name=&amp;quot;myform&amp;quot; in HTML page).&lt;br /&gt;
This means a date selector must be included necessarily into an html FORM.&lt;br /&gt;
&lt;br /&gt;
To get value after the POST of your form, the command is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$mydate = dol_mktime(12, 0 , 0, $GETPOST(&#039;mykeymonth&#039;, &#039;int&#039;), GETPOST(&#039;mykeyday&#039;, &#039;int&#039;), GETPOST(&#039;mykeyyear&#039;, &#039;int&#039;));&lt;br /&gt;
print strftime(&#039;%A %d %B %Y&#039;, $mydate);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Overwrite template file (tpl)===&lt;br /&gt;
If you want to overwrite tpl file on your module, you need to declare it on the module_parts :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
&#039;tpl&#039; =&amp;gt; 1,&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then you can put any tpl file on &#039;&#039;&#039;mymodule/core/tpl&#039;&#039;&#039;&lt;br /&gt;
as soon as the module is activate, the tpl will be overwrited&lt;br /&gt;
&lt;br /&gt;
==Add your own setup page (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If your module needs parameters, which are to be provided by the user, for proper setting up of the module.&lt;br /&gt;
&lt;br /&gt;
===Create your page to edit parameters===&lt;br /&gt;
If your module needs several parameters to be setup, you must create a page to edit options (these options will be saved in the [[Table llx_const|table &#039;&#039;&#039;llx_const&#039;&#039;&#039;]]).&lt;br /&gt;
Create a page named &#039;&#039;&#039;mymodule_setuppage.php&#039;&#039;&#039; that shows a form for possible options to update them into the above-mentioned table.&lt;br /&gt;
It is necessary to take an example from a page of the directory &#039;&#039;&#039;/admin&#039;&#039;&#039; that will show you the way to read/save your parameters.&lt;br /&gt;
Put this PHP page into the directory &#039;&#039;&#039;/admin&#039;&#039;&#039; of your module (e.g. mymodule/admin/mymodule_setuppage.php).&lt;br /&gt;
&lt;br /&gt;
===Modify the descriptor file of your module===&lt;br /&gt;
Then, within the descriptor file of your module, modify the variable &#039;&#039;&#039;config_page_url&#039;&#039;&#039; to set the name of this PHP page.&lt;br /&gt;
If the page is in the directory &#039;&#039;&#039;admin/&#039;&#039;&#039;, then the path is not required, e.g. like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;config_page_url = array(&amp;quot;mymodule_setuppage.php&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If the page is in the directory &#039;&#039;&#039;mymodule/admin/&#039;&#039;&#039;, then like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;config_page_url = array(&amp;quot;mymodule_setuppage.php@mymodule&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test your page===&lt;br /&gt;
Go into page &#039;&#039;&#039;Home-&amp;gt;Setup-&amp;gt;Modules&#039;&#039;&#039;, you should see a picture at the end of the line of your module to reach your setup page. Click on it, you should be able to view/edit parameters from your page.&lt;br /&gt;
&lt;br /&gt;
==Define your entries in menu (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If you have created PHP pages, it is necessary that those pages can be reached from menu entries in Dolibarr menu.&lt;br /&gt;
&lt;br /&gt;
===Define your menu entries===&lt;br /&gt;
For this, you must define into the module descriptor, the array this-&amp;gt;menu that declares all menus added by your module.&lt;br /&gt;
This array contains entries that will appear once your module is activated.&lt;br /&gt;
The example module descriptor file &#039;&#039;&#039;modMyModule.class.php&#039;&#039;&#039; contains an example to declare a top menu and also its left menu entries.&lt;br /&gt;
&lt;br /&gt;
This is the example of code to declare your own menu entries in a module descriptor file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
// Main menu entries&lt;br /&gt;
$this-&amp;gt;menu = array();			// List of menus to add&lt;br /&gt;
$r=0;&lt;br /&gt;
&lt;br /&gt;
// Add here entries to declare new menus&lt;br /&gt;
// Example to declare the Top Menu entry:&lt;br /&gt;
$this-&amp;gt;menu[$r]=array(	&#039;fk_menu&#039;=&amp;gt;0,			// Put 0 if this is a top menu&lt;br /&gt;
			&#039;type&#039;=&amp;gt;&#039;top&#039;,			// This is a Top menu entry&lt;br /&gt;
			&#039;titre&#039;=&amp;gt;&#039;MyModule top menu&#039;,&lt;br /&gt;
			&#039;mainmenu&#039;=&amp;gt;&#039;mymodule&#039;,&lt;br /&gt;
			&#039;leftmenu&#039;=&amp;gt;&#039;mymodule&#039;,&lt;br /&gt;
			&#039;url&#039;=&amp;gt;&#039;/mymodule/pagetop.php&#039;,&lt;br /&gt;
			&#039;langs&#039;=&amp;gt;&#039;mylangfile&#039;,	// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.&lt;br /&gt;
			&#039;position&#039;=&amp;gt;100,&lt;br /&gt;
			&#039;enabled&#039;=&amp;gt;&#039;1&#039;,			// Define condition to show or hide menu entry. Use &#039;$conf-&amp;gt;mymodule-&amp;gt;enabled&#039; if entry must be visible if module is enabled.&lt;br /&gt;
			&#039;perms&#039;=&amp;gt;&#039;1&#039;,			// Use &#039;perms&#039;=&amp;gt;&#039;$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;level1-&amp;gt;level2&#039; if you want your menu with a permission rules&lt;br /&gt;
			&#039;target&#039;=&amp;gt;&#039;&#039;,&lt;br /&gt;
			&#039;user&#039;=&amp;gt;2);				// 0=Menu for internal users, 1=external users, 2=both&lt;br /&gt;
$r++;&lt;br /&gt;
&lt;br /&gt;
// Example to declare a Left Menu entry:&lt;br /&gt;
$this-&amp;gt;menu[$r]=array(	&#039;fk_menu&#039;=&amp;gt;&#039;fk_mainmenu=xxx&#039;,		    // Use &#039;fk_mainmenu=xxx&#039; or &#039;fk_mainmenu=xxx,fk_leftmenu=yyy&#039; where xxx is mainmenucode and yyy is a leftmenucode of parent menu&lt;br /&gt;
			&#039;type&#039;=&amp;gt;&#039;left&#039;,			        // This is a Left menu entry&lt;br /&gt;
			&#039;titre&#039;=&amp;gt;&#039;MyModule left menu 1&#039;,&lt;br /&gt;
			&#039;mainmenu&#039;=&amp;gt;&#039;xxx&#039;,&lt;br /&gt;
			&#039;leftmenu&#039;=&amp;gt;&#039;yyy&#039;,&lt;br /&gt;
			&#039;url&#039;=&amp;gt;&#039;/mymodule/pagelevel1.php&#039;,&lt;br /&gt;
			&#039;langs&#039;=&amp;gt;&#039;mylangfile&#039;,	// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.&lt;br /&gt;
			&#039;position&#039;=&amp;gt;100,&lt;br /&gt;
			&#039;enabled&#039;=&amp;gt;&#039;1&#039;,			// Define condition to show or hide menu entry. Use &#039;$conf-&amp;gt;mymodule-&amp;gt;enabled&#039; if entry must be visible if module is enabled.&lt;br /&gt;
			&#039;perms&#039;=&amp;gt;&#039;1&#039;,			// Use &#039;perms&#039;=&amp;gt;&#039;$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;level1-&amp;gt;level2&#039; if you want your menu with a permission rules&lt;br /&gt;
			&#039;target&#039;=&amp;gt;&#039;&#039;,&lt;br /&gt;
			&#039;user&#039;=&amp;gt;2);				// 0=Menu for internal users,1=external users, 2=both&lt;br /&gt;
$r++;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To show the menu or not depending on a permission, modify property &#039;&#039;&#039;perms&#039;&#039;&#039; in the array. See chapter on permissions later to see how to add permissions.&lt;br /&gt;
&lt;br /&gt;
===Test your menu entries===&lt;br /&gt;
Disable and re-enable your module under the Dolibarr module setup page, menus entries must appear (if property &#039;enabled&#039; is declaration array is ok).&lt;br /&gt;
&lt;br /&gt;
==Add your own permissions (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If you want to add new permissions.&lt;br /&gt;
&lt;br /&gt;
The way to define permissions that will manage your module is done inside the module descriptor created previously.&lt;br /&gt;
Modify line &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;rights_class = &#039;mymodule&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
with correct value for mymodule.&lt;br /&gt;
&lt;br /&gt;
Then you must fill the array $this-&amp;gt;rights with as many entries than different permissions you need to manage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;rights[$r][0] = 10001;&lt;br /&gt;
$this-&amp;gt;rights[$r][1] = &#039;Label by default of permission&#039;;&lt;br /&gt;
$this-&amp;gt;rights[$r][2] = &#039;r&#039;;&lt;br /&gt;
$this-&amp;gt;rights[$r][3] = 1;&lt;br /&gt;
$this-&amp;gt;rights[$r][4] = &#039;action&#039;;&lt;br /&gt;
$this-&amp;gt;rights[$r][5] = &#039;subaction&#039;;&lt;br /&gt;
$r++;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Into $this-&amp;gt;rights[$r][0], put a permission id not already used (See into menu &#039;&#039;&#039;System info&#039;&#039;&#039; on a working installation of Dolibarr to know list of id already used by standard modules.&lt;br /&gt;
Into $this-&amp;gt;rights[$r][1], put a label by default for permission (This label will be used if no translation can be found into the file &#039;&#039;&#039;admin.lang&#039;&#039;&#039; Translation key should be &amp;quot;Permission10001=My permission Label&amp;quot;).&lt;br /&gt;
Into $this-&amp;gt;rights[$r][2], types of the permission. There are three type of permission, &#039;r&#039; for read, list or expert permission, &#039;w&#039; for write or update permission and &#039;d&#039; for delete permission.&lt;br /&gt;
Into $this-&amp;gt;rights[$r][3], put 1 if this permission must be granted automatically by default to any newly created user.&lt;br /&gt;
Into $this-&amp;gt;rights[$r][4] and $this-&amp;gt;rights[$r][5], put an action and subaction string without spaces. You will be able to test if a user has the permission in your PHP source code with the sequence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
if ($user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;action-&amp;gt;subaction) ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Define your own box (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If your module needs to provide one or several new boxes to show on home page.&lt;br /&gt;
&lt;br /&gt;
===Define your box===&lt;br /&gt;
For this, modify the array $this-&amp;gt;boxes into the module descriptor file.&lt;br /&gt;
All you have to do is to add 2 lines for each box file you will create into directory &#039;&#039;&#039;htdocs/mymodule/core/boxes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;boxes[0][&#039;file&#039;]=&#039;mybox0.php@mymodule&#039;&lt;br /&gt;
$this-&amp;gt;boxes[0][&#039;note&#039;]=&#039;My box 0&#039;&lt;br /&gt;
 ...&lt;br /&gt;
$this-&amp;gt;boxes[n][&#039;file&#039;]=&#039;myboxn.php@mymodule&#039;&lt;br /&gt;
$this-&amp;gt;boxes[n][&#039;note&#039;]=&#039;My box n&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then create files &#039;&#039;&#039;htdocs/mymodule/core/boxes/mybox0.php&#039;&#039;&#039;, &#039;&#039;&#039;htdocs/mymodule/core/boxes/mybox1.php&#039;&#039;&#039;... by copying an example from an existing box file (found into directory &#039;&#039;&#039;htdocs/core/boxes&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
===Test if your box is detected by Dolibarr===&lt;br /&gt;
Disable and enabled module.&lt;br /&gt;
&lt;br /&gt;
Go into menu &#039;&#039;&#039;Home - Setup - Boxes&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Your boxes must appear in the list of boxes you can activate. Activate the box and go on the home page to see if the box is showing correctly.&lt;br /&gt;
&lt;br /&gt;
==Define your own export (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If your module provides new predefined database export profiles (for its own tables or for already existing tables of another module).&lt;br /&gt;
&lt;br /&gt;
===Define export===&lt;br /&gt;
For this uncomment and modify arrays $this-&amp;gt;export_xxx in your module descriptor file.&lt;br /&gt;
&lt;br /&gt;
===Test your export===&lt;br /&gt;
Go into menu Tools -&amp;gt; Export. Your export will appear in the list of available predefined exports (if your module is enabled).&lt;br /&gt;
Choose it, you must see a list of all possible fields defined in the export arrays.&lt;br /&gt;
Choose on field and try to build an export file. If ok, try again with all fields.&lt;br /&gt;
&lt;br /&gt;
==Define your CSS styles (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If in your PHP pages, you use class styles that are not defined inside Dolibarr themes CSS (not recommanded).&lt;br /&gt;
&lt;br /&gt;
===Create and declare your style sheet===&lt;br /&gt;
Create a style sheet CSS named &#039;&#039;&#039;mymodule.css&#039;&#039;&#039; or &#039;&#039;&#039;mymodule.css.php&#039;&#039;&#039; and put it into directory &#039;&#039;&#039;htdocs/mymodule&#039;&#039;&#039;. You can have several CSS files per module.&lt;br /&gt;
Remember it&#039;s better to use existing styles already available by default into Dolibarr (The CSS file used by Dolibarr is file &#039;&#039;&#039;themes/mytheme/&#039;&#039;themename&#039;&#039;.css.php&#039;&#039;&#039;. Create your own CSS files only if you need absolutely to add not already existing styles.&lt;br /&gt;
&lt;br /&gt;
Once your style sheets are ready, declare them into your module descriptor file by modifying the property &#039;&#039;&#039;$this-&amp;gt;modules_parts&#039;&#039;&#039;.&lt;br /&gt;
Value to put here must be an array of relative URLs to your CSS files.&lt;br /&gt;
For example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;module_parts = array(&#039;css&#039; =&amp;gt; array(&#039;/mymodule/css/mymodule.css.php&#039;,&#039;/mymodule/css/myother.css&#039;));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test your style sheet===&lt;br /&gt;
Disable and enable your module.&lt;br /&gt;
&lt;br /&gt;
Go on the home page (index.php). Show the HTML source of the page.&lt;br /&gt;
&lt;br /&gt;
You should see into the HTML header, a line that declares your style sheet.&lt;br /&gt;
&lt;br /&gt;
==Add your Javascript functions (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If in your PHP pages, you use javascript functions not available in Dolibarr (in file lib_head.js)&lt;br /&gt;
&lt;br /&gt;
If you need to use your own javascript functions inside your PHP pages, it is necessary to have your functions, defined into your javascript file &#039;&#039;&#039;htdocs/mymodule/js/mymodule.js&#039;&#039;&#039;, included into the HTML HEAD section.&lt;br /&gt;
To ask Dolibarr that forge this header to include your own javascript file, you must just provide it to the llxHeader() function called by your page.&lt;br /&gt;
&lt;br /&gt;
Example for page /htdocs/mymodule/mypage.php :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$morejs=array(&amp;quot;/mymodule/js/mymodule.js&amp;quot;);&lt;br /&gt;
llxHeader(&#039;&#039;,&#039;Titre&#039;,&#039;&#039;,&#039;&#039;,&#039;&#039;,&#039;&#039;,$morejs,&#039;&#039;,0,0); &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Run your own code on any Dolibarr event (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If you want to execute your own code once a common Dolibarr event has occurred (example: I want to update a table in my module when an invoice is created into Dolibarr), you must create a &#039;&#039;&#039;triggers&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
See also [[Interfaces_Dolibarr_toward_foreign_systems]]&lt;br /&gt;
and [[Interfaces_from_foreign_systems_toward_Dolibarr]]&lt;br /&gt;
&lt;br /&gt;
==Insert your code inside Dolibarr hooks positions (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: When you want to add code or replace Dolibarr code into another situation than a business event (See the previous chapter for adding code during a business event).&lt;br /&gt;
&lt;br /&gt;
See page [[Hooks_system]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Add your own numbering rules==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: When you need a new rule for generated ref of elements that are not covered by existing rules.&lt;br /&gt;
&lt;br /&gt;
See page [[Create numbering module]].&lt;br /&gt;
&lt;br /&gt;
==Add your document template (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: When you want to personalized your own generated PDF or ODT documents.&lt;br /&gt;
&lt;br /&gt;
Note: To add this feature you don&#039;t need to create a module descriptor.&lt;br /&gt;
&lt;br /&gt;
Documentation to add your own template is available on page [[Create_a_PDF_document_template]] or [[Create_an_ODT_document_template]].&lt;br /&gt;
&lt;br /&gt;
==Add your skin (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: When you want to personalized your colors/fonts/images.&lt;br /&gt;
&lt;br /&gt;
Note: To add this feature you don&#039;t need to create a module descriptor.&lt;br /&gt;
&lt;br /&gt;
To add your own skin, read page [[Skins]].&lt;br /&gt;
&lt;br /&gt;
=Some coding rules and predefined functions=&lt;br /&gt;
The coding rules to be followed are defined in the [[Developer documentation]], under section &amp;quot;General Information - Language and standards development&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
A lot of predefined features for developers are also available and described into page [[Developer documentation]] under section &amp;quot;Technical components of Dolibarr&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=Create a package to distribute and install your module=&lt;br /&gt;
This process must be used to generate a package to submit it on the http://www.dolistore.com marketplace.&lt;br /&gt;
But you can use it to have a package easy to distribute on your own network.&lt;br /&gt;
&lt;br /&gt;
*Go into the directory &#039;&#039;&#039;/build&#039;&#039;&#039; and copy the file &#039;&#039;&#039;makepack-dolibarrmodules.conf&#039;&#039;&#039; into &#039;&#039;&#039;makepack-mymodule.conf&#039;&#039;&#039;. Warning, this directory may not be provided in some packages of stable versions. If so, it can be retrieved from the snapshot available for download on the Dolibarr website in area &amp;quot;Development version&amp;quot; (taken in this case the whole build directory which is autonomous and independent directory).&lt;br /&gt;
&lt;br /&gt;
Edit this file to add a list of file names for all new files you created for your module (module descriptor, new sql tables files, php page, images, etc...)&lt;br /&gt;
&lt;br /&gt;
*Run the script via Perl (need the Perl version 5.0 or later):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
perl makepack-dolibarrmodule.pl&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The script asks you the name of your module, its major and minor version. A file &#039;&#039;&#039;mymodule.zip &#039;&#039;&#039; will then be manufactured containing your module ready to be deployed.&lt;br /&gt;
&lt;br /&gt;
*The person who receives your module must then place the file in the root directory of a Dolibarr installation and perform the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf mymodule.zip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If you want your module to be public, you can submit it (the zip file) on Dolibarr marketplace website: {{LinkToPluginDownload}} (you must create an account first and be logged to use the link &amp;quot;Submit a module/product&amp;quot;).&lt;br /&gt;
**If your module was built correctly, the file will be validated later.&lt;br /&gt;
**If quality is enough and license permits it, the code might be added inside main Dolibarr sources (except if you disagree for that).&lt;br /&gt;
&lt;br /&gt;
=Enabling/activation condition of external module on DoliStore=&lt;br /&gt;
&lt;br /&gt;
See [[Module_Dolistore_Validation_Rules|Validation Rules]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_development&amp;diff=62264</id>
		<title>Module development</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_development&amp;diff=62264"/>
		<updated>2025-01-23T22:59:16Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* Module creation with the module builder */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Développement_module]]&lt;br /&gt;
[[es:Desarrollo_de_un_módulo]]&lt;br /&gt;
[[de:Modul_Entwicklung]]&lt;br /&gt;
[[zh:模块开发]]&lt;br /&gt;
[[ja:モジュール_開発]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Core]]&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
&lt;br /&gt;
To create a new module/addon for Dolibarr, there is several steps. This tutorial will describe you each of them to build a module to extend Dolibarr features, like one or several of the following :&lt;br /&gt;
&lt;br /&gt;
*Add new tables in database.&lt;br /&gt;
*Add your own menu entries.&lt;br /&gt;
*Add new screens to edit new tables.&lt;br /&gt;
*Add or remove tabs on object view (invoice, product, order, event, ...).&lt;br /&gt;
*Add predefined exports for the internal export tool.&lt;br /&gt;
*Add new information widget in the home page.&lt;br /&gt;
*Add new substitutions variables.&lt;br /&gt;
*Define new permissions.&lt;br /&gt;
*Execute code automatically triggered by a particular Dolibarr action.&lt;br /&gt;
*Insert your code inside Dolibarr hooks positions.&lt;br /&gt;
*Add your numbering rule to generate the reference of objects&lt;br /&gt;
*Add a new document template.&lt;br /&gt;
*Add a new skin.&lt;br /&gt;
&lt;br /&gt;
etc...&lt;br /&gt;
&lt;br /&gt;
Following chapters presents how to do all of this manually with an easy way.&lt;br /&gt;
&lt;br /&gt;
=Module creation with the module builder=&lt;br /&gt;
From Dolibarr v. 12.0 it is possible to create the main pages of your module with the Module Builder. To activate it:&lt;br /&gt;
&lt;br /&gt;
Go into the list of module and enable the module &amp;quot;Module Builder&amp;quot;[[File:Module Builder.png|alt=Module Builder|thumb|left]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then click on the &amp;quot;bug&amp;quot; image in the top right of screen.&lt;br /&gt;
[[File:Module Builder icon.png|alt=Module Builder icon|left|thumb]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=Template of an External Module=&lt;br /&gt;
A good model to start development of external module can be found here : [https://github.com/Dolibarr/dolibarr/tree/develop/htdocs/modulebuilder/template GitHub Dolibarr Module Modèle]&lt;br /&gt;
&lt;br /&gt;
=Create your module=&lt;br /&gt;
==Create a Module descriptor for your Module (required)==&lt;br /&gt;
&#039;&#039;&#039;When it is required&#039;&#039;&#039;: Required as soon as an addon is developed, whatever its goal is (except for adding a skin).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since Dolibarr 9.0, you should use the ModuleBuilder module provided as a standard module to generate the module descriptor&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Create your module descriptor===&lt;br /&gt;
The first step is to create a file descriptor for the module. &lt;br /&gt;
&lt;br /&gt;
*Create directory &#039;&#039;&#039;/htdocs/custom/&#039;&#039;mymodule&#039;&#039;/core/modules&#039;&#039;&#039; (for an external module) or &#039;&#039;&#039;/htdocs/&#039;&#039;mymodule&#039;&#039;/core/modules&#039;&#039;&#039; if you plan to have this module an official core module of Dolibarr. Then copy the file modMyModule.class.php from the directory &#039;&#039;&#039;htdocs/modulebuilder/template&#039;&#039;&#039; into this directory. Change the name of the file modMyModule.class.php to the name corresponding to the purpose of your module. Name of the file must start with initial &#039;mod&#039; and end with .class.php (for example if you want to give the name &#039;NewName&#039; to this file, then the name should be &#039;modNewName.class.php&#039;).&lt;br /&gt;
&lt;br /&gt;
Next modify the contents of this file as follows:&lt;br /&gt;
&lt;br /&gt;
*Replace all &amp;quot;modMyModule&amp;quot; with a value which corresponds to the purpose of your module. This value must always start with &#039;mod&#039; and contain only alpha characters (again, if the name given to the file was &#039;NewName&#039;, then replace all &amp;quot;modMyModule&amp;quot; with &amp;quot;modNewName&amp;quot;).&lt;br /&gt;
*Change the number in: $this-&amp;gt;numero = 100000 by a number that designates your module id. To avoid conflicts with other modules, you can consult the page that lists already reserved id numbers: [[List of modules id|List of modules id]].&lt;br /&gt;
*Modify any other variables defined in the constructor (see comment in the code skeleton for their meaning).&lt;br /&gt;
&lt;br /&gt;
Your file descriptor for your module is ready. See the next step to activate it.&lt;br /&gt;
&lt;br /&gt;
===Test your descriptor===&lt;br /&gt;
&lt;br /&gt;
Launch Dolibarr and go to page &#039;&#039;&#039;Setup-&amp;gt;module&#039;&#039;&#039;? &lt;br /&gt;
If you set the property version in the module description you should see a new line with your new module and the possibility to activate it or not. If you set the property version to &amp;quot;develop&amp;quot; or &amp;quot;experiental&amp;quot;, to see your module, you must first go into &#039;&#039;&#039;Setup-Others&#039;&#039;&#039; and set MAIN_FEATURES_LEVEL to 1 to see &amp;quot;experimental&amp;quot; modules or 2 to see &amp;quot;development&amp;quot; modules.&lt;br /&gt;
&lt;br /&gt;
==Tree of path for new module files (required)==&lt;br /&gt;
This is how your files must be organized when building a new module (the zip file must also match this rule).&lt;br /&gt;
Note: Only the second line is mandatory.&lt;br /&gt;
&lt;br /&gt;
{{TemplateModuleTreeSimple}}&lt;br /&gt;
&lt;br /&gt;
==Create your SQL tables and the PHP DAO class (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If your module needs to manage data of its own&lt;br /&gt;
&lt;br /&gt;
===Create your .sql file===&lt;br /&gt;
If your module is designed to manage data of its own, which are not available in the standard version of Dolibarr, it is necessary to define SQL tables to store the data.&lt;br /&gt;
&lt;br /&gt;
Scripts for creating tables and loading data by your own module are saved into a subdirectory sql (&#039;&#039;&#039;&amp;quot;mymodule/sql&amp;quot;&#039;&#039;&#039;) of your module. (With ModuleBuilder, the directory and all sql files will be created automatically when you will create a new Object from tab Object).&lt;br /&gt;
&lt;br /&gt;
Then check into your descriptor file, into function &#039;&#039;&#039;init&#039;&#039;&#039; that the line&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;$this-&amp;gt;_load_tables(&#039;/mymodule/sql/&#039;);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is not commented.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rules to follow:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Add the files about creating tables commands on the principle of an &#039;&#039;&#039;llx_mytable.sql&#039;&#039;&#039; file per table, with an optional &#039;&#039;&#039;llx_mytable.key.sql&#039;&#039;&#039; file (see existing files in &#039;&#039;&#039;install/mysql/tables&#039;&#039;&#039; for examples).&lt;br /&gt;
*The recommended type and name for SQL fields are defined into page [[Language_and_development_rules#Table_and_fields_structures]].&lt;br /&gt;
*To manage data, you must create a file called &#039;&#039;&#039;data.sql&#039;&#039;&#039; inside directory &#039;&#039;&#039;/mymodule/sql/&#039;&#039;&#039; that contains SQL command to add/edit/delete data.&lt;br /&gt;
*Don&#039;t use the double quote for strings (eg &#039;chaine&#039; not &amp;quot;chaine&amp;quot;) because the double quote have a specific meaning in PostGreSQL&lt;br /&gt;
&lt;br /&gt;
Example of content of a file data.sql&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
 delete from llx_const where name=&#039;MYMODULE_IT_WORKS&#039; and entity=&#039;__ENTITY__&#039;;&lt;br /&gt;
 insert into llx_const (name, value, type, note, visible, entity) values (&#039;MYMODULE_IT_WORKS&#039;,&#039;1&#039;,&#039;chaine&#039;,&#039;A constant vor my module&#039;,1,&#039;__ENTITY__&#039;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files must be operational for the database mysql. Rem: The files of other databases are not maintained. They will be read and converted on the fly by the driver of the other database.&lt;br /&gt;
&lt;br /&gt;
===Test your .sql files===&lt;br /&gt;
&lt;br /&gt;
Once the files ready, you can return to the page to enable Dolibarr modules and disable the module, drop those tables in the database (if they already exists) and reactivate the module. The tables should be recreated by the activation of the module. If this is not the case, check your scripts by passing them by hand, or check the Dolibarr logs.&lt;br /&gt;
&lt;br /&gt;
===Generate the PHP DAO class===&lt;br /&gt;
The DAO PHP files should have been generated by ModuleBuilder after creating an object.&lt;br /&gt;
&lt;br /&gt;
You can however create them manually by copying existing object however using ModuleBuilder is highly recommended. You should find examples into &#039;&#039;&#039;htdocs/modulebuilder/templates/class/myobject.class.php&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In this class, there are already operational CRUD (Create/Read/Update/Delete) methods to perform an insert, a fetch (select), an update, a delete of a table row. Edit the file to use the correct module name, tables and place this file in the class subdirectory of the module. The Module Builder allows you to do this with just a few mouse clicks.&lt;br /&gt;
&lt;br /&gt;
==The tab management (optional)==&lt;br /&gt;
&lt;br /&gt;
===Add or remove your own tabs on object sheets===&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: To add a tab on an object (invoices, orders, proposals, member ...)&lt;br /&gt;
&lt;br /&gt;
To do this go into the file descriptor of module previously created and edit the $this-&amp;gt;tabs array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
	// Array to add new pages in new tabs or remove existing one&lt;br /&gt;
	$this-&amp;gt;tabs = array(&#039;objecttype:+tabname1:Title1:mylangfile@mymodule:$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;read:/mymodule/mypagetab1.php?id=__ID__&#039;    // To add a new tab identified by code tabname1&lt;br /&gt;
                            &#039;objecttype:+tabname2:Title2:mylangfile@mymodule:$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;read:/mymodule/mypagetab2.php?id=__ID__&#039;,   // To add a new tab identified by code tabname2&lt;br /&gt;
                            &#039;objecttype:-tabname&#039;);                                                     // To remove an existing tab identified by code tabname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The table should contain a list of strings, each string representing a new tab. &lt;br /&gt;
The format of the string consisting of 5 parts separated by &amp;quot;:&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Part 1: The element type (object type) where the tab should appear is a value from the following:&lt;br /&gt;
{{TemplateModuleTabs}}&lt;br /&gt;
&lt;br /&gt;
*Part 2: A code to identify tab to add (start with +tabname1) or to remove (start with -tabname1)&lt;br /&gt;
*Part 3: The title of the tab(Title1). This can be a hardcoded read or better a code translation in module lang file .&lt;br /&gt;
*Part 4: The name of the file &amp;quot;*.lang&amp;quot; (mylangfile@mymodule) which contains correspondence between the code translation and language to display. If this name is followed with @mymodule, Dolibarr will search translation file &amp;quot;*.lang&amp;quot; within the module in htdocs/custom/mymodule/langs/code_CODE/mylangfile.lang, otherwise Dolibarr will look for file in htdocs/langs/code_CODE/mylangfile.lang&lt;br /&gt;
*Part 5: A condition to test if tab must be visible($user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;read) &#039;&#039;&#039;or&#039;&#039;&#039; put 1 to be always visible.&lt;br /&gt;
*Part 6: The URL of the page to display when you click on the tab (/mymodule/mypagetab1.php). The __ID__ string will be replaced automatically by the Id of the element concerned.&lt;br /&gt;
&lt;br /&gt;
To feed the contents of the tab with data from the database, see the next chapter.&lt;br /&gt;
&lt;br /&gt;
In order to get the names  &#039;tabname&#039; of existing tabs, you have to check the names used in the function &#039;product_prepare_head&#039; of the file  &#039;core/lib/module.lib.php&#039; corresponding to section &#039;$head[$h][2]&#039;.&lt;br /&gt;
&lt;br /&gt;
===Show tabs navigation into your own pages===&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: To show all standard tabs of an object (product, tiers, etc.) on your page.&lt;br /&gt;
&lt;br /&gt;
You must follow these steps :&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Include files you need into your file&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For each object type, there are two files to include with line&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;require_once($url_fichier) ;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is example of files to include (DOL_DOCUMENT_ROOT is often dolibarr/htdocs/) :&lt;br /&gt;
&lt;br /&gt;
*Object thirdparty (thirdparty) :&lt;br /&gt;
**DOL_DOCUMENT_ROOT/societe/class/societe.class.php&lt;br /&gt;
**DOL_DOCUMENT_ROOT/core/lib/company.lib.php&lt;br /&gt;
*Object product (product) :&lt;br /&gt;
**DOL_DOCUMENT_ROOT/product/class/product.class.php&lt;br /&gt;
**DOL_DOCUMENT_ROOT/core/lib/product.lib.php&lt;br /&gt;
*Object invoice (invoice) :&lt;br /&gt;
**DOL_DOCUMENT_ROOT/compta/facture/class/facture.class.php&lt;br /&gt;
**DOL_DOCUMENT_ROOT/core/lib/invoice.lib.php&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create and load the object to show into your tab&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create an instance of an object of the correct class and load object from the database by using the fetch method of an object in providing to this method the id you get from URL (ie : /mytab.php?id=1).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example :&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$id=GETPOST(&#039;id&#039;,&#039;int&#039;);&lt;br /&gt;
$ref=GETPOST(&#039;ref&#039;,&#039;alpha&#039;);&lt;br /&gt;
$product = new Product($db) ;&lt;br /&gt;
$result = $product-&amp;gt;fetch($id,$ref) ; // Test $result to check the database read is ok&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Get a list of all tabs to show for your object type&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use function XXX_prepare_head($obj), where XXX is name of object. This will return an array with all definition of tab entries to show. The parameter to put into this method is the instance of an object you want tabs.&lt;br /&gt;
&lt;br /&gt;
The resulting array has the following structure&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$head        // Array of tabs&lt;br /&gt;
$head[$h]    // Element to describe one tab.&lt;br /&gt;
$head[$h][0] // Url of page to show when you click on tab&lt;br /&gt;
$head[$h][1] // Title of tab&lt;br /&gt;
$head[$h][2] // Code name to identify the tab&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example :&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$head = product_prepare_head($product, $user) ; // parameter $user is present for some function anly&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4. show tabs into your page&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use function dol_fiche_head() to show all tabs defined into array $head returned by XX_prepare_head().&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
dol_fiche_head($links, $active=&#039;0&#039;, $title=&#039;&#039;, $notab=0, $picto=&#039;&#039;)&lt;br /&gt;
//$links  // Tableau des onglets, appelé $head plus haut.&lt;br /&gt;
//$active // Onglet actif (mettre le nom de l&#039;onglet défini dans votre fichier de module, ou un nom contenu dans $head[$h][2]). Cet onglet sera mis en surbrillance&lt;br /&gt;
//$title  // Title to show (shown into a special tab that you can&#039;t click)&lt;br /&gt;
//$notab&lt;br /&gt;
//$picto  // Name of image to show into title. Possible values are:&lt;br /&gt;
//            product&lt;br /&gt;
//            service&lt;br /&gt;
//            company&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function will show required tabs and open an html element &#039;&#039;&amp;lt; div class=&amp;quot;&amp;quot; &amp;gt;&#039;&#039; that correspond to the area under the tabs. To close area of a tab, just use &#039;&#039;&amp;lt; /div &amp;gt;&#039;&#039; into your PHP page.&lt;br /&gt;
&lt;br /&gt;
==Create or modify PHP screens (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If the purpose of your module is to add features that require new or modified screens.&lt;br /&gt;
&lt;br /&gt;
===Create a new PHP screen===&lt;br /&gt;
You must then create your PHP pages that will show/edit data from tables using the skeleton templates provided as an example in the directory &#039;&#039;&#039;modulebuilder/myobject_page.php&#039;&#039;&#039; (For the development of a script from the command line, see [[Script development]]).&lt;br /&gt;
&lt;br /&gt;
To create a new user screen, create a subdirectory of &#039;&#039;&#039;htdocs&#039;&#039;&#039; (if not already done) for your module (in &#039;&#039;&#039;htdocs/mymodule&#039;&#039;&#039; for example) to store the pages you will create.&lt;br /&gt;
&lt;br /&gt;
Copy, into that directory, the file &#039;&#039;&#039;myobject_page.php&#039;&#039;&#039; that will serve as a starting point for your page file.&lt;br /&gt;
Edit the file to have a correct relative path to the main.inc.php file. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
// Load Dolibarr environment&lt;br /&gt;
$res=0;&lt;br /&gt;
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; ! empty($_SERVER[&amp;quot;CONTEXT_DOCUMENT_ROOT&amp;quot;])) $res=@include($_SERVER[&amp;quot;CONTEXT_DOCUMENT_ROOT&amp;quot;].&amp;quot;/main.inc.php&amp;quot;);&lt;br /&gt;
// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME&lt;br /&gt;
$tmp=empty($_SERVER[&#039;SCRIPT_FILENAME&#039;])?&#039;&#039;:$_SERVER[&#039;SCRIPT_FILENAME&#039;];$tmp2=realpath(__FILE__); $i=strlen($tmp)-1; $j=strlen($tmp2)-1;&lt;br /&gt;
while($i &amp;gt; 0 &amp;amp;&amp;amp; $j &amp;gt; 0 &amp;amp;&amp;amp; isset($tmp[$i]) &amp;amp;&amp;amp; isset($tmp2[$j]) &amp;amp;&amp;amp; $tmp[$i]==$tmp2[$j]) { $i--; $j--; }&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; $i &amp;gt; 0 &amp;amp;&amp;amp; file_exists(substr($tmp, 0, ($i+1)).&amp;quot;/main.inc.php&amp;quot;)) $res=@include(substr($tmp, 0, ($i+1)).&amp;quot;/main.inc.php&amp;quot;);&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; $i &amp;gt; 0 &amp;amp;&amp;amp; file_exists(dirname(substr($tmp, 0, ($i+1))).&amp;quot;/main.inc.php&amp;quot;)) $res=@include(dirname(substr($tmp, 0, ($i+1))).&amp;quot;/main.inc.php&amp;quot;);&lt;br /&gt;
// Try main.inc.php using relative path&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; file_exists(&amp;quot;../main.inc.php&amp;quot;)) $res=@include(&amp;quot;../main.inc.php&amp;quot;);&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; file_exists(&amp;quot;../../main.inc.php&amp;quot;)) $res=@include(&amp;quot;../../main.inc.php&amp;quot;);&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; file_exists(&amp;quot;../../../main.inc.php&amp;quot;)) $res=@include(&amp;quot;../../../main.inc.php&amp;quot;);&lt;br /&gt;
if (! $res) die(&amp;quot;Include of main fails&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
As you can see, there are several tries to load the main.inc.php (or master.inc.php). The goal is to succeed in the most cases as possible. The minimum is 2 lines: one to try to load the master/main.inc.php into the dolibarr root directory and another one to try to load the file to support the case when the module is deployed into the &amp;quot;custom&amp;quot; directory. But you can have more to deal more situation. The provided example should be able to load the file main/master.inc.php in nearly all situation/setups.&lt;br /&gt;
&lt;br /&gt;
Note that you may add more &amp;quot;../&amp;quot; depending on the depth of the file relative to your module directory tree.&lt;br /&gt;
&lt;br /&gt;
It&#039;s in the main.inc.php file that is loaded technical environment variables and permissions. The following variables are objects positioned in this file:&lt;br /&gt;
&lt;br /&gt;
*$user    Object that contains the characteristics of the user + his permissions.&lt;br /&gt;
*$conf    Object that contains Dolibarr configuration.&lt;br /&gt;
*$db      Object that contains an opened connection handler to the database.&lt;br /&gt;
*$langs   Object that contains the user&#039;s language.&lt;br /&gt;
&lt;br /&gt;
Then enter your code to display the page.&lt;br /&gt;
&lt;br /&gt;
*To include a class or library dedicated to the module is done using a Dolibarr function (and not using directly include_once):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example :&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
dol_include_once(&#039;/mymodule/class/myclass.class.php&#039;, &#039;MyClass&#039;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*To include classes provided with Dolibarr, use the following syntax:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example :&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
require_once DOL_DOCUMENT_ROOT.&#039;/core/class/doli.class.php&#039;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add some fields into existing forms===&lt;br /&gt;
You may want to provide a module that adds more fields into forms (input and view) of some elements. &lt;br /&gt;
&lt;br /&gt;
A heavy solution (but not so bad) may be to replace all pages used to create element (this means to disable the &amp;quot;New element&amp;quot; menu entry and adding yours, and disable tab that shows element to replace with a tab that is your own full page (copied/pasted from original) to do same than original page but modified to add your fields and stored added data into your own table). Go to menu [[#Define your entries in the menu (optional)]] and [[#The tab management (optional)]] if this solution suits you (this solution is more powerful since you can change everything you want into the page). &lt;br /&gt;
&lt;br /&gt;
We will describe here another solution, that works only to &amp;quot;add fields&amp;quot; at end of existing fields, using the element &amp;quot;category&amp;quot; as an example but you can convert this tutorial for invoice, proposal ...&lt;br /&gt;
&lt;br /&gt;
*First thing is to add a table, owned by your module, to store the value of new fields. This table will have only one column called &amp;quot;rowid&amp;quot; (will contain the same value than field rowid of element table) + one column for each new field you want to add. Then create a class with CRUD (Create/Read/Update/Delete) methods for this new table. For this two tasks, go back to previous chapter [[#Create your SQL tables and the PHP DAO class]].&lt;br /&gt;
*Next step is to add a hook into your module to add the new fields into the form. See chapter [[Hooks_system#Implement_the_Hook]] for generic documentation to use hooks.&lt;br /&gt;
&lt;br /&gt;
If you follow this tutorial, to be able to add fields into category forms, you must do:&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
&lt;br /&gt;
===Add/replace part of fields supported by hooks===&lt;br /&gt;
See chapter [[Hooks_system#Implement_the_Hook]] to know how to use Dolibarr existing hooks to add/replace code at Dolibarr hooks place.&lt;br /&gt;
&lt;br /&gt;
===Database access===&lt;br /&gt;
If you need to edit some data in the database inside your own table, use the PHP class generated before.&lt;br /&gt;
&lt;br /&gt;
If you to make access to tables with no dedicated PHP class available, this is always possible (for example if you want to get a list of records with a particular join or filter). In this case, this is a code samples to follow:&lt;br /&gt;
&lt;br /&gt;
To make an insert, update or delete:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$db-&amp;gt;begin();   // Start transaction&lt;br /&gt;
$db-&amp;gt;query(&amp;quot;My SQL request insert, update or delete&amp;quot;);&lt;br /&gt;
$db-&amp;gt;commit();       // Validate transaction&lt;br /&gt;
or $db-&amp;gt;rollback()  // Cancel transaction&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To read:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$resql=$db-&amp;gt;query(&amp;quot;My select request&amp;quot;);&lt;br /&gt;
if ($resql)&lt;br /&gt;
{&lt;br /&gt;
	$num = $db-&amp;gt;num_rows($resql);&lt;br /&gt;
	$i = 0;&lt;br /&gt;
	if ($num)&lt;br /&gt;
	{&lt;br /&gt;
		while ($i &amp;lt; $num)&lt;br /&gt;
		{&lt;br /&gt;
			$obj = $db-&amp;gt;fetch_object($resql);&lt;br /&gt;
			if ($obj)&lt;br /&gt;
			{&lt;br /&gt;
				// You can use here results&lt;br /&gt;
				print $obj-&amp;gt;field1;&lt;br /&gt;
				print $obj-&amp;gt;field2;&lt;br /&gt;
			}&lt;br /&gt;
			$i++;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Define style of your pages===&lt;br /&gt;
To have the look of your own pages to match the Dolibarr theme, it is necessary to use the Dolibarr CSS styles.&lt;br /&gt;
&lt;br /&gt;
You can use for example:&lt;br /&gt;
&lt;br /&gt;
*class=&amp;quot;&#039;&#039;&#039;liste_titre&#039;&#039;&#039;&amp;quot; on tags &#039;&#039;tr&#039;&#039; and &#039;&#039;td&#039;&#039; for the head row of a table.&lt;br /&gt;
*class=&amp;quot;&#039;&#039;&#039;pair&#039;&#039;&#039;&amp;quot; or class=&amp;quot;&#039;&#039;&#039;impair&#039;&#039;&#039;&amp;quot; on tags &#039;&#039;tr&#039;&#039; and &#039;&#039;td&#039;&#039; of other rows of a table.&lt;br /&gt;
*class=&amp;quot;&#039;&#039;&#039;flat&#039;&#039;&#039;&amp;quot; on all input fields (&#039;&#039;input, select, textarea&#039;&#039;...).&lt;br /&gt;
*class=&amp;quot;&#039;&#039;&#039;button&#039;&#039;&#039;&amp;quot; on HTML fields with type &#039;&#039;input type=&amp;quot;submit&amp;quot;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Use the Dolibarr date picker===&lt;br /&gt;
If you want to use the Dolibarr date selector (with its calendar popup) into your pages, use the following line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
 $form=new Form($db);&lt;br /&gt;
 $form-&amp;gt;select_date(&#039;&#039;,&#039;mykey&#039;,0,0,0,&amp;quot;myform&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The string mykey will identify the date selector in the form. You must use different values if you use several date selectors in same page.&lt;br /&gt;
The string myform is the name of the FORM in which the selector is included (value found in the form name=&amp;quot;myform&amp;quot; in HTML page).&lt;br /&gt;
This means a date selector must be included necessarily into an html FORM.&lt;br /&gt;
&lt;br /&gt;
To get value after the POST of your form, the command is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$mydate = dol_mktime(12, 0 , 0, $GETPOST(&#039;mykeymonth&#039;, &#039;int&#039;), GETPOST(&#039;mykeyday&#039;, &#039;int&#039;), GETPOST(&#039;mykeyyear&#039;, &#039;int&#039;));&lt;br /&gt;
print strftime(&#039;%A %d %B %Y&#039;, $mydate);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Overwrite template file (tpl)===&lt;br /&gt;
If you want to overwrite tpl file on your module, you need to declare it on the module_parts :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
&#039;tpl&#039; =&amp;gt; 1,&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then you can put any tpl file on &#039;&#039;&#039;mymodule/core/tpl&#039;&#039;&#039;&lt;br /&gt;
as soon as the module is activate, the tpl will be overwrited&lt;br /&gt;
&lt;br /&gt;
==Add your own setup page (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If your module needs parameters, which are to be provided by the user, for proper setting up of the module.&lt;br /&gt;
&lt;br /&gt;
===Create your page to edit parameters===&lt;br /&gt;
If your module needs several parameters to be setup, you must create a page to edit options (these options will be saved in the [[Table llx_const|table &#039;&#039;&#039;llx_const&#039;&#039;&#039;]]).&lt;br /&gt;
Create a page named &#039;&#039;&#039;mymodule_setuppage.php&#039;&#039;&#039; that shows a form for possible options to update them into the above-mentioned table.&lt;br /&gt;
It is necessary to take an example from a page of the directory &#039;&#039;&#039;/admin&#039;&#039;&#039; that will show you the way to read/save your parameters.&lt;br /&gt;
Put this PHP page into the directory &#039;&#039;&#039;/admin&#039;&#039;&#039; of your module (e.g. mymodule/admin/mymodule_setuppage.php).&lt;br /&gt;
&lt;br /&gt;
===Modify the descriptor file of your module===&lt;br /&gt;
Then, within the descriptor file of your module, modify the variable &#039;&#039;&#039;config_page_url&#039;&#039;&#039; to set the name of this PHP page.&lt;br /&gt;
If the page is in the directory &#039;&#039;&#039;admin/&#039;&#039;&#039;, then the path is not required, e.g. like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;config_page_url = array(&amp;quot;mymodule_setuppage.php&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If the page is in the directory &#039;&#039;&#039;mymodule/admin/&#039;&#039;&#039;, then like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;config_page_url = array(&amp;quot;mymodule_setuppage.php@mymodule&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test your page===&lt;br /&gt;
Go into page &#039;&#039;&#039;Home-&amp;gt;Setup-&amp;gt;Modules&#039;&#039;&#039;, you should see a picture at the end of the line of your module to reach your setup page. Click on it, you should be able to view/edit parameters from your page.&lt;br /&gt;
&lt;br /&gt;
==Define your entries in menu (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If you have created PHP pages, it is necessary that those pages can be reached from menu entries in Dolibarr menu.&lt;br /&gt;
&lt;br /&gt;
===Define your menu entries===&lt;br /&gt;
For this, you must define into the module descriptor, the array this-&amp;gt;menu that declares all menus added by your module.&lt;br /&gt;
This array contains entries that will appear once your module is activated.&lt;br /&gt;
The example module descriptor file &#039;&#039;&#039;modMyModule.class.php&#039;&#039;&#039; contains an example to declare a top menu and also its left menu entries.&lt;br /&gt;
&lt;br /&gt;
This is the example of code to declare your own menu entries in a module descriptor file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
// Main menu entries&lt;br /&gt;
$this-&amp;gt;menu = array();			// List of menus to add&lt;br /&gt;
$r=0;&lt;br /&gt;
&lt;br /&gt;
// Add here entries to declare new menus&lt;br /&gt;
// Example to declare the Top Menu entry:&lt;br /&gt;
$this-&amp;gt;menu[$r]=array(	&#039;fk_menu&#039;=&amp;gt;0,			// Put 0 if this is a top menu&lt;br /&gt;
			&#039;type&#039;=&amp;gt;&#039;top&#039;,			// This is a Top menu entry&lt;br /&gt;
			&#039;titre&#039;=&amp;gt;&#039;MyModule top menu&#039;,&lt;br /&gt;
			&#039;mainmenu&#039;=&amp;gt;&#039;mymodule&#039;,&lt;br /&gt;
			&#039;leftmenu&#039;=&amp;gt;&#039;mymodule&#039;,&lt;br /&gt;
			&#039;url&#039;=&amp;gt;&#039;/mymodule/pagetop.php&#039;,&lt;br /&gt;
			&#039;langs&#039;=&amp;gt;&#039;mylangfile&#039;,	// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.&lt;br /&gt;
			&#039;position&#039;=&amp;gt;100,&lt;br /&gt;
			&#039;enabled&#039;=&amp;gt;&#039;1&#039;,			// Define condition to show or hide menu entry. Use &#039;$conf-&amp;gt;mymodule-&amp;gt;enabled&#039; if entry must be visible if module is enabled.&lt;br /&gt;
			&#039;perms&#039;=&amp;gt;&#039;1&#039;,			// Use &#039;perms&#039;=&amp;gt;&#039;$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;level1-&amp;gt;level2&#039; if you want your menu with a permission rules&lt;br /&gt;
			&#039;target&#039;=&amp;gt;&#039;&#039;,&lt;br /&gt;
			&#039;user&#039;=&amp;gt;2);				// 0=Menu for internal users, 1=external users, 2=both&lt;br /&gt;
$r++;&lt;br /&gt;
&lt;br /&gt;
// Example to declare a Left Menu entry:&lt;br /&gt;
$this-&amp;gt;menu[$r]=array(	&#039;fk_menu&#039;=&amp;gt;&#039;fk_mainmenu=xxx&#039;,		    // Use &#039;fk_mainmenu=xxx&#039; or &#039;fk_mainmenu=xxx,fk_leftmenu=yyy&#039; where xxx is mainmenucode and yyy is a leftmenucode of parent menu&lt;br /&gt;
			&#039;type&#039;=&amp;gt;&#039;left&#039;,			        // This is a Left menu entry&lt;br /&gt;
			&#039;titre&#039;=&amp;gt;&#039;MyModule left menu 1&#039;,&lt;br /&gt;
			&#039;mainmenu&#039;=&amp;gt;&#039;xxx&#039;,&lt;br /&gt;
			&#039;leftmenu&#039;=&amp;gt;&#039;yyy&#039;,&lt;br /&gt;
			&#039;url&#039;=&amp;gt;&#039;/mymodule/pagelevel1.php&#039;,&lt;br /&gt;
			&#039;langs&#039;=&amp;gt;&#039;mylangfile&#039;,	// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.&lt;br /&gt;
			&#039;position&#039;=&amp;gt;100,&lt;br /&gt;
			&#039;enabled&#039;=&amp;gt;&#039;1&#039;,			// Define condition to show or hide menu entry. Use &#039;$conf-&amp;gt;mymodule-&amp;gt;enabled&#039; if entry must be visible if module is enabled.&lt;br /&gt;
			&#039;perms&#039;=&amp;gt;&#039;1&#039;,			// Use &#039;perms&#039;=&amp;gt;&#039;$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;level1-&amp;gt;level2&#039; if you want your menu with a permission rules&lt;br /&gt;
			&#039;target&#039;=&amp;gt;&#039;&#039;,&lt;br /&gt;
			&#039;user&#039;=&amp;gt;2);				// 0=Menu for internal users,1=external users, 2=both&lt;br /&gt;
$r++;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To show the menu or not depending on a permission, modify property &#039;&#039;&#039;perms&#039;&#039;&#039; in the array. See chapter on permissions later to see how to add permissions.&lt;br /&gt;
&lt;br /&gt;
===Test your menu entries===&lt;br /&gt;
Disable and re-enable your module under the Dolibarr module setup page, menus entries must appear (if property &#039;enabled&#039; is declaration array is ok).&lt;br /&gt;
&lt;br /&gt;
==Add your own permissions (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If you want to add new permissions.&lt;br /&gt;
&lt;br /&gt;
The way to define permissions that will manage your module is done inside the module descriptor created previously.&lt;br /&gt;
Modify line &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;rights_class = &#039;mymodule&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
with correct value for mymodule.&lt;br /&gt;
&lt;br /&gt;
Then you must fill the array $this-&amp;gt;rights with as many entries than different permissions you need to manage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;rights[$r][0] = 10001;&lt;br /&gt;
$this-&amp;gt;rights[$r][1] = &#039;Label by default of permission&#039;;&lt;br /&gt;
$this-&amp;gt;rights[$r][2] = &#039;r&#039;;&lt;br /&gt;
$this-&amp;gt;rights[$r][3] = 1;&lt;br /&gt;
$this-&amp;gt;rights[$r][4] = &#039;action&#039;;&lt;br /&gt;
$this-&amp;gt;rights[$r][5] = &#039;subaction&#039;;&lt;br /&gt;
$r++;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Into $this-&amp;gt;rights[$r][0], put a permission id not already used (See into menu &#039;&#039;&#039;System info&#039;&#039;&#039; on a working installation of Dolibarr to know list of id already used by standard modules.&lt;br /&gt;
Into $this-&amp;gt;rights[$r][1], put a label by default for permission (This label will be used if no translation can be found into the file &#039;&#039;&#039;admin.lang&#039;&#039;&#039; Translation key should be &amp;quot;Permission10001=My permission Label&amp;quot;).&lt;br /&gt;
Into $this-&amp;gt;rights[$r][2], types of the permission. There are three type of permission, &#039;r&#039; for read, list or expert permission, &#039;w&#039; for write or update permission and &#039;d&#039; for delete permission.&lt;br /&gt;
Into $this-&amp;gt;rights[$r][3], put 1 if this permission must be granted automatically by default to any newly created user.&lt;br /&gt;
Into $this-&amp;gt;rights[$r][4] and $this-&amp;gt;rights[$r][5], put an action and subaction string without spaces. You will be able to test if a user has the permission in your PHP source code with the sequence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
if ($user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;action-&amp;gt;subaction) ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Define your own box (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If your module needs to provide one or several new boxes to show on home page.&lt;br /&gt;
&lt;br /&gt;
===Define your box===&lt;br /&gt;
For this, modify the array $this-&amp;gt;boxes into the module descriptor file.&lt;br /&gt;
All you have to do is to add 2 lines for each box file you will create into directory &#039;&#039;&#039;htdocs/mymodule/core/boxes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;boxes[0][&#039;file&#039;]=&#039;mybox0.php@mymodule&#039;&lt;br /&gt;
$this-&amp;gt;boxes[0][&#039;note&#039;]=&#039;My box 0&#039;&lt;br /&gt;
 ...&lt;br /&gt;
$this-&amp;gt;boxes[n][&#039;file&#039;]=&#039;myboxn.php@mymodule&#039;&lt;br /&gt;
$this-&amp;gt;boxes[n][&#039;note&#039;]=&#039;My box n&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then create files &#039;&#039;&#039;htdocs/mymodule/core/boxes/mybox0.php&#039;&#039;&#039;, &#039;&#039;&#039;htdocs/mymodule/core/boxes/mybox1.php&#039;&#039;&#039;... by copying an example from an existing box file (found into directory &#039;&#039;&#039;htdocs/core/boxes&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
===Test if your box is detected by Dolibarr===&lt;br /&gt;
Disable and enabled module.&lt;br /&gt;
&lt;br /&gt;
Go into menu &#039;&#039;&#039;Home - Setup - Boxes&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Your boxes must appear in the list of boxes you can activate. Activate the box and go on the home page to see if the box is showing correctly.&lt;br /&gt;
&lt;br /&gt;
==Define your own export (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If your module provides new predefined database export profiles (for its own tables or for already existing tables of another module).&lt;br /&gt;
&lt;br /&gt;
===Define export===&lt;br /&gt;
For this uncomment and modify arrays $this-&amp;gt;export_xxx in your module descriptor file.&lt;br /&gt;
&lt;br /&gt;
===Test your export===&lt;br /&gt;
Go into menu Tools -&amp;gt; Export. Your export will appear in the list of available predefined exports (if your module is enabled).&lt;br /&gt;
Choose it, you must see a list of all possible fields defined in the export arrays.&lt;br /&gt;
Choose on field and try to build an export file. If ok, try again with all fields.&lt;br /&gt;
&lt;br /&gt;
==Define your CSS styles (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If in your PHP pages, you use class styles that are not defined inside Dolibarr themes CSS (not recommanded).&lt;br /&gt;
&lt;br /&gt;
===Create and declare your style sheet===&lt;br /&gt;
Create a style sheet CSS named &#039;&#039;&#039;mymodule.css&#039;&#039;&#039; or &#039;&#039;&#039;mymodule.css.php&#039;&#039;&#039; and put it into directory &#039;&#039;&#039;htdocs/mymodule&#039;&#039;&#039;. You can have several CSS files per module.&lt;br /&gt;
Remember it&#039;s better to use existing styles already available by default into Dolibarr (The CSS file used by Dolibarr is file &#039;&#039;&#039;themes/mytheme/&#039;&#039;themename&#039;&#039;.css.php&#039;&#039;&#039;. Create your own CSS files only if you need absolutely to add not already existing styles.&lt;br /&gt;
&lt;br /&gt;
Once your style sheets are ready, declare them into your module descriptor file by modifying the property &#039;&#039;&#039;$this-&amp;gt;modules_parts&#039;&#039;&#039;.&lt;br /&gt;
Value to put here must be an array of relative URLs to your CSS files.&lt;br /&gt;
For example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;module_parts = array(&#039;css&#039; =&amp;gt; array(&#039;/mymodule/css/mymodule.css.php&#039;,&#039;/mymodule/css/myother.css&#039;));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test your style sheet===&lt;br /&gt;
Disable and enable your module.&lt;br /&gt;
&lt;br /&gt;
Go on the home page (index.php). Show the HTML source of the page.&lt;br /&gt;
&lt;br /&gt;
You should see into the HTML header, a line that declares your style sheet.&lt;br /&gt;
&lt;br /&gt;
==Add your Javascript functions (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If in your PHP pages, you use javascript functions not available in Dolibarr (in file lib_head.js)&lt;br /&gt;
&lt;br /&gt;
If you need to use your own javascript functions inside your PHP pages, it is necessary to have your functions, defined into your javascript file &#039;&#039;&#039;htdocs/mymodule/js/mymodule.js&#039;&#039;&#039;, included into the HTML HEAD section.&lt;br /&gt;
To ask Dolibarr that forge this header to include your own javascript file, you must just provide it to the llxHeader() function called by your page.&lt;br /&gt;
&lt;br /&gt;
Example for page /htdocs/mymodule/mypage.php :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$morejs=array(&amp;quot;/mymodule/js/mymodule.js&amp;quot;);&lt;br /&gt;
llxHeader(&#039;&#039;,&#039;Titre&#039;,&#039;&#039;,&#039;&#039;,&#039;&#039;,&#039;&#039;,$morejs,&#039;&#039;,0,0); &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Run your own code on any Dolibarr event (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If you want to execute your own code once a common Dolibarr event has occurred (example: I want to update a table in my module when an invoice is created into Dolibarr), you must create a &#039;&#039;&#039;triggers&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
See also [[Interfaces_Dolibarr_toward_foreign_systems]]&lt;br /&gt;
and [[Interfaces_from_foreign_systems_toward_Dolibarr]]&lt;br /&gt;
&lt;br /&gt;
==Insert your code inside Dolibarr hooks positions (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: When you want to add code or replace Dolibarr code into another situation than a business event (See the previous chapter for adding code during a business event).&lt;br /&gt;
&lt;br /&gt;
See page [[Hooks_system]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Add your own numbering rules==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: When you need a new rule for generated ref of elements that are not covered by existing rules.&lt;br /&gt;
&lt;br /&gt;
See page [[Create numbering module]].&lt;br /&gt;
&lt;br /&gt;
==Add your document template (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: When you want to personalized your own generated PDF or ODT documents.&lt;br /&gt;
&lt;br /&gt;
Note: To add this feature you don&#039;t need to create a module descriptor.&lt;br /&gt;
&lt;br /&gt;
Documentation to add your own template is available on page [[Create_a_PDF_document_template]] or [[Create_an_ODT_document_template]].&lt;br /&gt;
&lt;br /&gt;
==Add your skin (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: When you want to personalized your colors/fonts/images.&lt;br /&gt;
&lt;br /&gt;
Note: To add this feature you don&#039;t need to create a module descriptor.&lt;br /&gt;
&lt;br /&gt;
To add your own skin, read page [[Skins]].&lt;br /&gt;
&lt;br /&gt;
=Some coding rules and predefined functions=&lt;br /&gt;
The coding rules to be followed are defined in the [[Developer documentation]], under section &amp;quot;General Information - Language and standards development&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
A lot of predefined features for developers are also available and described into page [[Developer documentation]] under section &amp;quot;Technical components of Dolibarr&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=Create a package to distribute and install your module=&lt;br /&gt;
This process must be used to generate a package to submit it on the http://www.dolistore.com marketplace.&lt;br /&gt;
But you can use it to have a package easy to distribute on your own network.&lt;br /&gt;
&lt;br /&gt;
*Go into the directory &#039;&#039;&#039;/build&#039;&#039;&#039; and copy the file &#039;&#039;&#039;makepack-dolibarrmodules.conf&#039;&#039;&#039; into &#039;&#039;&#039;makepack-mymodule.conf&#039;&#039;&#039;. Warning, this directory may not be provided in some packages of stable versions. If so, it can be retrieved from the snapshot available for download on the Dolibarr website in area &amp;quot;Development version&amp;quot; (taken in this case the whole build directory which is autonomous and independent directory).&lt;br /&gt;
&lt;br /&gt;
Edit this file to add a list of file names for all new files you created for your module (module descriptor, new sql tables files, php page, images, etc...)&lt;br /&gt;
&lt;br /&gt;
*Run the script via Perl (need the Perl version 5.0 or later):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
perl makepack-dolibarrmodule.pl&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The script asks you the name of your module, its major and minor version. A file &#039;&#039;&#039;mymodule.zip &#039;&#039;&#039; will then be manufactured containing your module ready to be deployed.&lt;br /&gt;
&lt;br /&gt;
*The person who receives your module must then place the file in the root directory of a Dolibarr installation and perform the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf mymodule.zip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If you want your module to be public, you can submit it (the zip file) on Dolibarr marketplace website: {{LinkToPluginDownload}} (you must create an account first and be logged to use the link &amp;quot;Submit a module/product&amp;quot;).&lt;br /&gt;
**If your module was built correctly, the file will be validated later.&lt;br /&gt;
**If quality is enough and license permits it, the code might be added inside main Dolibarr sources (except if you disagree for that).&lt;br /&gt;
&lt;br /&gt;
=Enabling/activation condition of external module on DoliStore=&lt;br /&gt;
&lt;br /&gt;
See [[Module_Dolistore_Validation_Rules|Validation Rules]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_development&amp;diff=62263</id>
		<title>Module development</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_development&amp;diff=62263"/>
		<updated>2025-01-23T22:58:53Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Développement_module]]&lt;br /&gt;
[[es:Desarrollo_de_un_módulo]]&lt;br /&gt;
[[de:Modul_Entwicklung]]&lt;br /&gt;
[[zh:模块开发]]&lt;br /&gt;
[[ja:モジュール_開発]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Core]]&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
&lt;br /&gt;
To create a new module/addon for Dolibarr, there is several steps. This tutorial will describe you each of them to build a module to extend Dolibarr features, like one or several of the following :&lt;br /&gt;
&lt;br /&gt;
*Add new tables in database.&lt;br /&gt;
*Add your own menu entries.&lt;br /&gt;
*Add new screens to edit new tables.&lt;br /&gt;
*Add or remove tabs on object view (invoice, product, order, event, ...).&lt;br /&gt;
*Add predefined exports for the internal export tool.&lt;br /&gt;
*Add new information widget in the home page.&lt;br /&gt;
*Add new substitutions variables.&lt;br /&gt;
*Define new permissions.&lt;br /&gt;
*Execute code automatically triggered by a particular Dolibarr action.&lt;br /&gt;
*Insert your code inside Dolibarr hooks positions.&lt;br /&gt;
*Add your numbering rule to generate the reference of objects&lt;br /&gt;
*Add a new document template.&lt;br /&gt;
*Add a new skin.&lt;br /&gt;
&lt;br /&gt;
etc...&lt;br /&gt;
&lt;br /&gt;
Following chapters presents how to do all of this manually with an easy way.&lt;br /&gt;
&lt;br /&gt;
=Module creation with the module builder=&lt;br /&gt;
From Dolibarr v. 12.0 it is possible to create the main pages of your module with the Module Builder. To activate it:&lt;br /&gt;
&lt;br /&gt;
Go into the list of module and enable the module &amp;quot;Module Builder&amp;quot;[[File:Module Builder.png|alt=Module Builder|thumb|left]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then click on the &amp;quot;bug&amp;quot; image in the top right of screen.&lt;br /&gt;
[[File:Module Builder icon.png|alt=Module Builder icon|left|thumb]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=Template of an External Module=&lt;br /&gt;
A good model to start development of external module can be found here : [https://github.com/Dolibarr/dolibarr/tree/develop/htdocs/modulebuilder/template GitHub Dolibarr Module Modèle]&lt;br /&gt;
&lt;br /&gt;
=Create your module=&lt;br /&gt;
==Create a Module descriptor for your Module (required)==&lt;br /&gt;
&#039;&#039;&#039;When it is required&#039;&#039;&#039;: Required as soon as an addon is developed, whatever its goal is (except for adding a skin).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since Dolibarr 9.0, you should use the ModuleBuilder module provided as a standard module to generate the module descriptor&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Create your module descriptor===&lt;br /&gt;
The first step is to create a file descriptor for the module. &lt;br /&gt;
&lt;br /&gt;
*Create directory &#039;&#039;&#039;/htdocs/custom/&#039;&#039;mymodule&#039;&#039;/core/modules&#039;&#039;&#039; (for an external module) or &#039;&#039;&#039;/htdocs/&#039;&#039;mymodule&#039;&#039;/core/modules&#039;&#039;&#039; if you plan to have this module an official core module of Dolibarr. Then copy the file modMyModule.class.php from the directory &#039;&#039;&#039;htdocs/modulebuilder/template&#039;&#039;&#039; into this directory. Change the name of the file modMyModule.class.php to the name corresponding to the purpose of your module. Name of the file must start with initial &#039;mod&#039; and end with .class.php (for example if you want to give the name &#039;NewName&#039; to this file, then the name should be &#039;modNewName.class.php&#039;).&lt;br /&gt;
&lt;br /&gt;
Next modify the contents of this file as follows:&lt;br /&gt;
&lt;br /&gt;
*Replace all &amp;quot;modMyModule&amp;quot; with a value which corresponds to the purpose of your module. This value must always start with &#039;mod&#039; and contain only alpha characters (again, if the name given to the file was &#039;NewName&#039;, then replace all &amp;quot;modMyModule&amp;quot; with &amp;quot;modNewName&amp;quot;).&lt;br /&gt;
*Change the number in: $this-&amp;gt;numero = 100000 by a number that designates your module id. To avoid conflicts with other modules, you can consult the page that lists already reserved id numbers: [[List of modules id|List of modules id]].&lt;br /&gt;
*Modify any other variables defined in the constructor (see comment in the code skeleton for their meaning).&lt;br /&gt;
&lt;br /&gt;
Your file descriptor for your module is ready. See the next step to activate it.&lt;br /&gt;
&lt;br /&gt;
===Test your descriptor===&lt;br /&gt;
&lt;br /&gt;
Launch Dolibarr and go to page &#039;&#039;&#039;Setup-&amp;gt;module&#039;&#039;&#039;? &lt;br /&gt;
If you set the property version in the module description you should see a new line with your new module and the possibility to activate it or not. If you set the property version to &amp;quot;develop&amp;quot; or &amp;quot;experiental&amp;quot;, to see your module, you must first go into &#039;&#039;&#039;Setup-Others&#039;&#039;&#039; and set MAIN_FEATURES_LEVEL to 1 to see &amp;quot;experimental&amp;quot; modules or 2 to see &amp;quot;development&amp;quot; modules.&lt;br /&gt;
&lt;br /&gt;
==Tree of path for new module files (required)==&lt;br /&gt;
This is how your files must be organized when building a new module (the zip file must also match this rule).&lt;br /&gt;
Note: Only the second line is mandatory.&lt;br /&gt;
&lt;br /&gt;
{{TemplateModuleTreeSimple}}&lt;br /&gt;
&lt;br /&gt;
==Create your SQL tables and the PHP DAO class (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If your module needs to manage data of its own&lt;br /&gt;
&lt;br /&gt;
===Create your .sql file===&lt;br /&gt;
If your module is designed to manage data of its own, which are not available in the standard version of Dolibarr, it is necessary to define SQL tables to store the data.&lt;br /&gt;
&lt;br /&gt;
Scripts for creating tables and loading data by your own module are saved into a subdirectory sql (&#039;&#039;&#039;&amp;quot;mymodule/sql&amp;quot;&#039;&#039;&#039;) of your module. (With ModuleBuilder, the directory and all sql files will be created automatically when you will create a new Object from tab Object).&lt;br /&gt;
&lt;br /&gt;
Then check into your descriptor file, into function &#039;&#039;&#039;init&#039;&#039;&#039; that the line&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;$this-&amp;gt;_load_tables(&#039;/mymodule/sql/&#039;);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is not commented.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rules to follow:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Add the files about creating tables commands on the principle of an &#039;&#039;&#039;llx_mytable.sql&#039;&#039;&#039; file per table, with an optional &#039;&#039;&#039;llx_mytable.key.sql&#039;&#039;&#039; file (see existing files in &#039;&#039;&#039;install/mysql/tables&#039;&#039;&#039; for examples).&lt;br /&gt;
*The recommended type and name for SQL fields are defined into page [[Language_and_development_rules#Table_and_fields_structures]].&lt;br /&gt;
*To manage data, you must create a file called &#039;&#039;&#039;data.sql&#039;&#039;&#039; inside directory &#039;&#039;&#039;/mymodule/sql/&#039;&#039;&#039; that contains SQL command to add/edit/delete data.&lt;br /&gt;
*Don&#039;t use the double quote for strings (eg &#039;chaine&#039; not &amp;quot;chaine&amp;quot;) because the double quote have a specific meaning in PostGreSQL&lt;br /&gt;
&lt;br /&gt;
Example of content of a file data.sql&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
 delete from llx_const where name=&#039;MYMODULE_IT_WORKS&#039; and entity=&#039;__ENTITY__&#039;;&lt;br /&gt;
 insert into llx_const (name, value, type, note, visible, entity) values (&#039;MYMODULE_IT_WORKS&#039;,&#039;1&#039;,&#039;chaine&#039;,&#039;A constant vor my module&#039;,1,&#039;__ENTITY__&#039;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files must be operational for the database mysql. Rem: The files of other databases are not maintained. They will be read and converted on the fly by the driver of the other database.&lt;br /&gt;
&lt;br /&gt;
===Test your .sql files===&lt;br /&gt;
&lt;br /&gt;
Once the files ready, you can return to the page to enable Dolibarr modules and disable the module, drop those tables in the database (if they already exists) and reactivate the module. The tables should be recreated by the activation of the module. If this is not the case, check your scripts by passing them by hand, or check the Dolibarr logs.&lt;br /&gt;
&lt;br /&gt;
===Generate the PHP DAO class===&lt;br /&gt;
The DAO PHP files should have been generated by ModuleBuilder after creating an object.&lt;br /&gt;
&lt;br /&gt;
You can however create them manually by copying existing object however using ModuleBuilder is highly recommended. You should find examples into &#039;&#039;&#039;htdocs/modulebuilder/templates/class/myobject.class.php&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In this class, there are already operational CRUD (Create/Read/Update/Delete) methods to perform an insert, a fetch (select), an update, a delete of a table row. Edit the file to use the correct module name, tables and place this file in the class subdirectory of the module. The Module Builder allows you to do this with just a few mouse clicks.&lt;br /&gt;
&lt;br /&gt;
==The tab management (optional)==&lt;br /&gt;
&lt;br /&gt;
===Add or remove your own tabs on object sheets===&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: To add a tab on an object (invoices, orders, proposals, member ...)&lt;br /&gt;
&lt;br /&gt;
To do this go into the file descriptor of module previously created and edit the $this-&amp;gt;tabs array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
	// Array to add new pages in new tabs or remove existing one&lt;br /&gt;
	$this-&amp;gt;tabs = array(&#039;objecttype:+tabname1:Title1:mylangfile@mymodule:$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;read:/mymodule/mypagetab1.php?id=__ID__&#039;    // To add a new tab identified by code tabname1&lt;br /&gt;
                            &#039;objecttype:+tabname2:Title2:mylangfile@mymodule:$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;read:/mymodule/mypagetab2.php?id=__ID__&#039;,   // To add a new tab identified by code tabname2&lt;br /&gt;
                            &#039;objecttype:-tabname&#039;);                                                     // To remove an existing tab identified by code tabname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The table should contain a list of strings, each string representing a new tab. &lt;br /&gt;
The format of the string consisting of 5 parts separated by &amp;quot;:&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Part 1: The element type (object type) where the tab should appear is a value from the following:&lt;br /&gt;
{{TemplateModuleTabs}}&lt;br /&gt;
&lt;br /&gt;
*Part 2: A code to identify tab to add (start with +tabname1) or to remove (start with -tabname1)&lt;br /&gt;
*Part 3: The title of the tab(Title1). This can be a hardcoded read or better a code translation in module lang file .&lt;br /&gt;
*Part 4: The name of the file &amp;quot;*.lang&amp;quot; (mylangfile@mymodule) which contains correspondence between the code translation and language to display. If this name is followed with @mymodule, Dolibarr will search translation file &amp;quot;*.lang&amp;quot; within the module in htdocs/custom/mymodule/langs/code_CODE/mylangfile.lang, otherwise Dolibarr will look for file in htdocs/langs/code_CODE/mylangfile.lang&lt;br /&gt;
*Part 5: A condition to test if tab must be visible($user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;read) &#039;&#039;&#039;or&#039;&#039;&#039; put 1 to be always visible.&lt;br /&gt;
*Part 6: The URL of the page to display when you click on the tab (/mymodule/mypagetab1.php). The __ID__ string will be replaced automatically by the Id of the element concerned.&lt;br /&gt;
&lt;br /&gt;
To feed the contents of the tab with data from the database, see the next chapter.&lt;br /&gt;
&lt;br /&gt;
In order to get the names  &#039;tabname&#039; of existing tabs, you have to check the names used in the function &#039;product_prepare_head&#039; of the file  &#039;core/lib/module.lib.php&#039; corresponding to section &#039;$head[$h][2]&#039;.&lt;br /&gt;
&lt;br /&gt;
===Show tabs navigation into your own pages===&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: To show all standard tabs of an object (product, tiers, etc.) on your page.&lt;br /&gt;
&lt;br /&gt;
You must follow these steps :&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Include files you need into your file&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For each object type, there are two files to include with line&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;require_once($url_fichier) ;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is example of files to include (DOL_DOCUMENT_ROOT is often dolibarr/htdocs/) :&lt;br /&gt;
&lt;br /&gt;
*Object thirdparty (thirdparty) :&lt;br /&gt;
**DOL_DOCUMENT_ROOT/societe/class/societe.class.php&lt;br /&gt;
**DOL_DOCUMENT_ROOT/core/lib/company.lib.php&lt;br /&gt;
*Object product (product) :&lt;br /&gt;
**DOL_DOCUMENT_ROOT/product/class/product.class.php&lt;br /&gt;
**DOL_DOCUMENT_ROOT/core/lib/product.lib.php&lt;br /&gt;
*Object invoice (invoice) :&lt;br /&gt;
**DOL_DOCUMENT_ROOT/compta/facture/class/facture.class.php&lt;br /&gt;
**DOL_DOCUMENT_ROOT/core/lib/invoice.lib.php&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create and load the object to show into your tab&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create an instance of an object of the correct class and load object from the database by using the fetch method of an object in providing to this method the id you get from URL (ie : /mytab.php?id=1).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example :&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$id=GETPOST(&#039;id&#039;,&#039;int&#039;);&lt;br /&gt;
$ref=GETPOST(&#039;ref&#039;,&#039;alpha&#039;);&lt;br /&gt;
$product = new Product($db) ;&lt;br /&gt;
$result = $product-&amp;gt;fetch($id,$ref) ; // Test $result to check the database read is ok&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Get a list of all tabs to show for your object type&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use function XXX_prepare_head($obj), where XXX is name of object. This will return an array with all definition of tab entries to show. The parameter to put into this method is the instance of an object you want tabs.&lt;br /&gt;
&lt;br /&gt;
The resulting array has the following structure&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$head        // Array of tabs&lt;br /&gt;
$head[$h]    // Element to describe one tab.&lt;br /&gt;
$head[$h][0] // Url of page to show when you click on tab&lt;br /&gt;
$head[$h][1] // Title of tab&lt;br /&gt;
$head[$h][2] // Code name to identify the tab&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example :&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$head = product_prepare_head($product, $user) ; // parameter $user is present for some function anly&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4. show tabs into your page&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use function dol_fiche_head() to show all tabs defined into array $head returned by XX_prepare_head().&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
dol_fiche_head($links, $active=&#039;0&#039;, $title=&#039;&#039;, $notab=0, $picto=&#039;&#039;)&lt;br /&gt;
//$links  // Tableau des onglets, appelé $head plus haut.&lt;br /&gt;
//$active // Onglet actif (mettre le nom de l&#039;onglet défini dans votre fichier de module, ou un nom contenu dans $head[$h][2]). Cet onglet sera mis en surbrillance&lt;br /&gt;
//$title  // Title to show (shown into a special tab that you can&#039;t click)&lt;br /&gt;
//$notab&lt;br /&gt;
//$picto  // Name of image to show into title. Possible values are:&lt;br /&gt;
//            product&lt;br /&gt;
//            service&lt;br /&gt;
//            company&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function will show required tabs and open an html element &#039;&#039;&amp;lt; div class=&amp;quot;&amp;quot; &amp;gt;&#039;&#039; that correspond to the area under the tabs. To close area of a tab, just use &#039;&#039;&amp;lt; /div &amp;gt;&#039;&#039; into your PHP page.&lt;br /&gt;
&lt;br /&gt;
==Create or modify PHP screens (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If the purpose of your module is to add features that require new or modified screens.&lt;br /&gt;
&lt;br /&gt;
===Create a new PHP screen===&lt;br /&gt;
You must then create your PHP pages that will show/edit data from tables using the skeleton templates provided as an example in the directory &#039;&#039;&#039;modulebuilder/myobject_page.php&#039;&#039;&#039; (For the development of a script from the command line, see [[Script development]]).&lt;br /&gt;
&lt;br /&gt;
To create a new user screen, create a subdirectory of &#039;&#039;&#039;htdocs&#039;&#039;&#039; (if not already done) for your module (in &#039;&#039;&#039;htdocs/mymodule&#039;&#039;&#039; for example) to store the pages you will create.&lt;br /&gt;
&lt;br /&gt;
Copy, into that directory, the file &#039;&#039;&#039;myobject_page.php&#039;&#039;&#039; that will serve as a starting point for your page file.&lt;br /&gt;
Edit the file to have a correct relative path to the main.inc.php file. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
// Load Dolibarr environment&lt;br /&gt;
$res=0;&lt;br /&gt;
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; ! empty($_SERVER[&amp;quot;CONTEXT_DOCUMENT_ROOT&amp;quot;])) $res=@include($_SERVER[&amp;quot;CONTEXT_DOCUMENT_ROOT&amp;quot;].&amp;quot;/main.inc.php&amp;quot;);&lt;br /&gt;
// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME&lt;br /&gt;
$tmp=empty($_SERVER[&#039;SCRIPT_FILENAME&#039;])?&#039;&#039;:$_SERVER[&#039;SCRIPT_FILENAME&#039;];$tmp2=realpath(__FILE__); $i=strlen($tmp)-1; $j=strlen($tmp2)-1;&lt;br /&gt;
while($i &amp;gt; 0 &amp;amp;&amp;amp; $j &amp;gt; 0 &amp;amp;&amp;amp; isset($tmp[$i]) &amp;amp;&amp;amp; isset($tmp2[$j]) &amp;amp;&amp;amp; $tmp[$i]==$tmp2[$j]) { $i--; $j--; }&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; $i &amp;gt; 0 &amp;amp;&amp;amp; file_exists(substr($tmp, 0, ($i+1)).&amp;quot;/main.inc.php&amp;quot;)) $res=@include(substr($tmp, 0, ($i+1)).&amp;quot;/main.inc.php&amp;quot;);&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; $i &amp;gt; 0 &amp;amp;&amp;amp; file_exists(dirname(substr($tmp, 0, ($i+1))).&amp;quot;/main.inc.php&amp;quot;)) $res=@include(dirname(substr($tmp, 0, ($i+1))).&amp;quot;/main.inc.php&amp;quot;);&lt;br /&gt;
// Try main.inc.php using relative path&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; file_exists(&amp;quot;../main.inc.php&amp;quot;)) $res=@include(&amp;quot;../main.inc.php&amp;quot;);&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; file_exists(&amp;quot;../../main.inc.php&amp;quot;)) $res=@include(&amp;quot;../../main.inc.php&amp;quot;);&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; file_exists(&amp;quot;../../../main.inc.php&amp;quot;)) $res=@include(&amp;quot;../../../main.inc.php&amp;quot;);&lt;br /&gt;
if (! $res) die(&amp;quot;Include of main fails&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
As you can see, there are several tries to load the main.inc.php (or master.inc.php). The goal is to succeed in the most cases as possible. The minimum is 2 lines: one to try to load the master/main.inc.php into the dolibarr root directory and another one to try to load the file to support the case when the module is deployed into the &amp;quot;custom&amp;quot; directory. But you can have more to deal more situation. The provided example should be able to load the file main/master.inc.php in nearly all situation/setups.&lt;br /&gt;
&lt;br /&gt;
Note that you may add more &amp;quot;../&amp;quot; depending on the depth of the file relative to your module directory tree.&lt;br /&gt;
&lt;br /&gt;
It&#039;s in the main.inc.php file that is loaded technical environment variables and permissions. The following variables are objects positioned in this file:&lt;br /&gt;
&lt;br /&gt;
*$user    Object that contains the characteristics of the user + his permissions.&lt;br /&gt;
*$conf    Object that contains Dolibarr configuration.&lt;br /&gt;
*$db      Object that contains an opened connection handler to the database.&lt;br /&gt;
*$langs   Object that contains the user&#039;s language.&lt;br /&gt;
&lt;br /&gt;
Then enter your code to display the page.&lt;br /&gt;
&lt;br /&gt;
*To include a class or library dedicated to the module is done using a Dolibarr function (and not using directly include_once):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example :&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
dol_include_once(&#039;/mymodule/class/myclass.class.php&#039;, &#039;MyClass&#039;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*To include classes provided with Dolibarr, use the following syntax:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example :&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
require_once DOL_DOCUMENT_ROOT.&#039;/core/class/doli.class.php&#039;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add some fields into existing forms===&lt;br /&gt;
You may want to provide a module that adds more fields into forms (input and view) of some elements. &lt;br /&gt;
&lt;br /&gt;
A heavy solution (but not so bad) may be to replace all pages used to create element (this means to disable the &amp;quot;New element&amp;quot; menu entry and adding yours, and disable tab that shows element to replace with a tab that is your own full page (copied/pasted from original) to do same than original page but modified to add your fields and stored added data into your own table). Go to menu [[#Define your entries in the menu (optional)]] and [[#The tab management (optional)]] if this solution suits you (this solution is more powerful since you can change everything you want into the page). &lt;br /&gt;
&lt;br /&gt;
We will describe here another solution, that works only to &amp;quot;add fields&amp;quot; at end of existing fields, using the element &amp;quot;category&amp;quot; as an example but you can convert this tutorial for invoice, proposal ...&lt;br /&gt;
&lt;br /&gt;
*First thing is to add a table, owned by your module, to store the value of new fields. This table will have only one column called &amp;quot;rowid&amp;quot; (will contain the same value than field rowid of element table) + one column for each new field you want to add. Then create a class with CRUD (Create/Read/Update/Delete) methods for this new table. For this two tasks, go back to previous chapter [[#Create your SQL tables and the PHP DAO class]].&lt;br /&gt;
*Next step is to add a hook into your module to add the new fields into the form. See chapter [[Hooks_system#Implement_the_Hook]] for generic documentation to use hooks.&lt;br /&gt;
&lt;br /&gt;
If you follow this tutorial, to be able to add fields into category forms, you must do:&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
&lt;br /&gt;
===Add/replace part of fields supported by hooks===&lt;br /&gt;
See chapter [[Hooks_system#Implement_the_Hook]] to know how to use Dolibarr existing hooks to add/replace code at Dolibarr hooks place.&lt;br /&gt;
&lt;br /&gt;
===Database access===&lt;br /&gt;
If you need to edit some data in the database inside your own table, use the PHP class generated before.&lt;br /&gt;
&lt;br /&gt;
If you to make access to tables with no dedicated PHP class available, this is always possible (for example if you want to get a list of records with a particular join or filter). In this case, this is a code samples to follow:&lt;br /&gt;
&lt;br /&gt;
To make an insert, update or delete:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$db-&amp;gt;begin();   // Start transaction&lt;br /&gt;
$db-&amp;gt;query(&amp;quot;My SQL request insert, update or delete&amp;quot;);&lt;br /&gt;
$db-&amp;gt;commit();       // Validate transaction&lt;br /&gt;
or $db-&amp;gt;rollback()  // Cancel transaction&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To read:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$resql=$db-&amp;gt;query(&amp;quot;My select request&amp;quot;);&lt;br /&gt;
if ($resql)&lt;br /&gt;
{&lt;br /&gt;
	$num = $db-&amp;gt;num_rows($resql);&lt;br /&gt;
	$i = 0;&lt;br /&gt;
	if ($num)&lt;br /&gt;
	{&lt;br /&gt;
		while ($i &amp;lt; $num)&lt;br /&gt;
		{&lt;br /&gt;
			$obj = $db-&amp;gt;fetch_object($resql);&lt;br /&gt;
			if ($obj)&lt;br /&gt;
			{&lt;br /&gt;
				// You can use here results&lt;br /&gt;
				print $obj-&amp;gt;field1;&lt;br /&gt;
				print $obj-&amp;gt;field2;&lt;br /&gt;
			}&lt;br /&gt;
			$i++;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Define style of your pages===&lt;br /&gt;
To have the look of your own pages to match the Dolibarr theme, it is necessary to use the Dolibarr CSS styles.&lt;br /&gt;
&lt;br /&gt;
You can use for example:&lt;br /&gt;
&lt;br /&gt;
*class=&amp;quot;&#039;&#039;&#039;liste_titre&#039;&#039;&#039;&amp;quot; on tags &#039;&#039;tr&#039;&#039; and &#039;&#039;td&#039;&#039; for the head row of a table.&lt;br /&gt;
*class=&amp;quot;&#039;&#039;&#039;pair&#039;&#039;&#039;&amp;quot; or class=&amp;quot;&#039;&#039;&#039;impair&#039;&#039;&#039;&amp;quot; on tags &#039;&#039;tr&#039;&#039; and &#039;&#039;td&#039;&#039; of other rows of a table.&lt;br /&gt;
*class=&amp;quot;&#039;&#039;&#039;flat&#039;&#039;&#039;&amp;quot; on all input fields (&#039;&#039;input, select, textarea&#039;&#039;...).&lt;br /&gt;
*class=&amp;quot;&#039;&#039;&#039;button&#039;&#039;&#039;&amp;quot; on HTML fields with type &#039;&#039;input type=&amp;quot;submit&amp;quot;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Use the Dolibarr date picker===&lt;br /&gt;
If you want to use the Dolibarr date selector (with its calendar popup) into your pages, use the following line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
 $form=new Form($db);&lt;br /&gt;
 $form-&amp;gt;select_date(&#039;&#039;,&#039;mykey&#039;,0,0,0,&amp;quot;myform&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The string mykey will identify the date selector in the form. You must use different values if you use several date selectors in same page.&lt;br /&gt;
The string myform is the name of the FORM in which the selector is included (value found in the form name=&amp;quot;myform&amp;quot; in HTML page).&lt;br /&gt;
This means a date selector must be included necessarily into an html FORM.&lt;br /&gt;
&lt;br /&gt;
To get value after the POST of your form, the command is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$mydate = dol_mktime(12, 0 , 0, $GETPOST(&#039;mykeymonth&#039;, &#039;int&#039;), GETPOST(&#039;mykeyday&#039;, &#039;int&#039;), GETPOST(&#039;mykeyyear&#039;, &#039;int&#039;));&lt;br /&gt;
print strftime(&#039;%A %d %B %Y&#039;, $mydate);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Overwrite template file (tpl)===&lt;br /&gt;
If you want to overwrite tpl file on your module, you need to declare it on the module_parts :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
&#039;tpl&#039; =&amp;gt; 1,&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then you can put any tpl file on &#039;&#039;&#039;mymodule/core/tpl&#039;&#039;&#039;&lt;br /&gt;
as soon as the module is activate, the tpl will be overwrited&lt;br /&gt;
&lt;br /&gt;
==Add your own setup page (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If your module needs parameters, which are to be provided by the user, for proper setting up of the module.&lt;br /&gt;
&lt;br /&gt;
===Create your page to edit parameters===&lt;br /&gt;
If your module needs several parameters to be setup, you must create a page to edit options (these options will be saved in the [[Table llx_const|table &#039;&#039;&#039;llx_const&#039;&#039;&#039;]]).&lt;br /&gt;
Create a page named &#039;&#039;&#039;mymodule_setuppage.php&#039;&#039;&#039; that shows a form for possible options to update them into the above-mentioned table.&lt;br /&gt;
It is necessary to take an example from a page of the directory &#039;&#039;&#039;/admin&#039;&#039;&#039; that will show you the way to read/save your parameters.&lt;br /&gt;
Put this PHP page into the directory &#039;&#039;&#039;/admin&#039;&#039;&#039; of your module (e.g. mymodule/admin/mymodule_setuppage.php).&lt;br /&gt;
&lt;br /&gt;
===Modify the descriptor file of your module===&lt;br /&gt;
Then, within the descriptor file of your module, modify the variable &#039;&#039;&#039;config_page_url&#039;&#039;&#039; to set the name of this PHP page.&lt;br /&gt;
If the page is in the directory &#039;&#039;&#039;admin/&#039;&#039;&#039;, then the path is not required, e.g. like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;config_page_url = array(&amp;quot;mymodule_setuppage.php&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If the page is in the directory &#039;&#039;&#039;mymodule/admin/&#039;&#039;&#039;, then like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;config_page_url = array(&amp;quot;mymodule_setuppage.php@mymodule&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test your page===&lt;br /&gt;
Go into page &#039;&#039;&#039;Home-&amp;gt;Setup-&amp;gt;Modules&#039;&#039;&#039;, you should see a picture at the end of the line of your module to reach your setup page. Click on it, you should be able to view/edit parameters from your page.&lt;br /&gt;
&lt;br /&gt;
==Define your entries in menu (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If you have created PHP pages, it is necessary that those pages can be reached from menu entries in Dolibarr menu.&lt;br /&gt;
&lt;br /&gt;
===Define your menu entries===&lt;br /&gt;
For this, you must define into the module descriptor, the array this-&amp;gt;menu that declares all menus added by your module.&lt;br /&gt;
This array contains entries that will appear once your module is activated.&lt;br /&gt;
The example module descriptor file &#039;&#039;&#039;modMyModule.class.php&#039;&#039;&#039; contains an example to declare a top menu and also its left menu entries.&lt;br /&gt;
&lt;br /&gt;
This is the example of code to declare your own menu entries in a module descriptor file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
// Main menu entries&lt;br /&gt;
$this-&amp;gt;menu = array();			// List of menus to add&lt;br /&gt;
$r=0;&lt;br /&gt;
&lt;br /&gt;
// Add here entries to declare new menus&lt;br /&gt;
// Example to declare the Top Menu entry:&lt;br /&gt;
$this-&amp;gt;menu[$r]=array(	&#039;fk_menu&#039;=&amp;gt;0,			// Put 0 if this is a top menu&lt;br /&gt;
			&#039;type&#039;=&amp;gt;&#039;top&#039;,			// This is a Top menu entry&lt;br /&gt;
			&#039;titre&#039;=&amp;gt;&#039;MyModule top menu&#039;,&lt;br /&gt;
			&#039;mainmenu&#039;=&amp;gt;&#039;mymodule&#039;,&lt;br /&gt;
			&#039;leftmenu&#039;=&amp;gt;&#039;mymodule&#039;,&lt;br /&gt;
			&#039;url&#039;=&amp;gt;&#039;/mymodule/pagetop.php&#039;,&lt;br /&gt;
			&#039;langs&#039;=&amp;gt;&#039;mylangfile&#039;,	// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.&lt;br /&gt;
			&#039;position&#039;=&amp;gt;100,&lt;br /&gt;
			&#039;enabled&#039;=&amp;gt;&#039;1&#039;,			// Define condition to show or hide menu entry. Use &#039;$conf-&amp;gt;mymodule-&amp;gt;enabled&#039; if entry must be visible if module is enabled.&lt;br /&gt;
			&#039;perms&#039;=&amp;gt;&#039;1&#039;,			// Use &#039;perms&#039;=&amp;gt;&#039;$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;level1-&amp;gt;level2&#039; if you want your menu with a permission rules&lt;br /&gt;
			&#039;target&#039;=&amp;gt;&#039;&#039;,&lt;br /&gt;
			&#039;user&#039;=&amp;gt;2);				// 0=Menu for internal users, 1=external users, 2=both&lt;br /&gt;
$r++;&lt;br /&gt;
&lt;br /&gt;
// Example to declare a Left Menu entry:&lt;br /&gt;
$this-&amp;gt;menu[$r]=array(	&#039;fk_menu&#039;=&amp;gt;&#039;fk_mainmenu=xxx&#039;,		    // Use &#039;fk_mainmenu=xxx&#039; or &#039;fk_mainmenu=xxx,fk_leftmenu=yyy&#039; where xxx is mainmenucode and yyy is a leftmenucode of parent menu&lt;br /&gt;
			&#039;type&#039;=&amp;gt;&#039;left&#039;,			        // This is a Left menu entry&lt;br /&gt;
			&#039;titre&#039;=&amp;gt;&#039;MyModule left menu 1&#039;,&lt;br /&gt;
			&#039;mainmenu&#039;=&amp;gt;&#039;xxx&#039;,&lt;br /&gt;
			&#039;leftmenu&#039;=&amp;gt;&#039;yyy&#039;,&lt;br /&gt;
			&#039;url&#039;=&amp;gt;&#039;/mymodule/pagelevel1.php&#039;,&lt;br /&gt;
			&#039;langs&#039;=&amp;gt;&#039;mylangfile&#039;,	// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.&lt;br /&gt;
			&#039;position&#039;=&amp;gt;100,&lt;br /&gt;
			&#039;enabled&#039;=&amp;gt;&#039;1&#039;,			// Define condition to show or hide menu entry. Use &#039;$conf-&amp;gt;mymodule-&amp;gt;enabled&#039; if entry must be visible if module is enabled.&lt;br /&gt;
			&#039;perms&#039;=&amp;gt;&#039;1&#039;,			// Use &#039;perms&#039;=&amp;gt;&#039;$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;level1-&amp;gt;level2&#039; if you want your menu with a permission rules&lt;br /&gt;
			&#039;target&#039;=&amp;gt;&#039;&#039;,&lt;br /&gt;
			&#039;user&#039;=&amp;gt;2);				// 0=Menu for internal users,1=external users, 2=both&lt;br /&gt;
$r++;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To show the menu or not depending on a permission, modify property &#039;&#039;&#039;perms&#039;&#039;&#039; in the array. See chapter on permissions later to see how to add permissions.&lt;br /&gt;
&lt;br /&gt;
===Test your menu entries===&lt;br /&gt;
Disable and re-enable your module under the Dolibarr module setup page, menus entries must appear (if property &#039;enabled&#039; is declaration array is ok).&lt;br /&gt;
&lt;br /&gt;
==Add your own permissions (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If you want to add new permissions.&lt;br /&gt;
&lt;br /&gt;
The way to define permissions that will manage your module is done inside the module descriptor created previously.&lt;br /&gt;
Modify line &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;rights_class = &#039;mymodule&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
with correct value for mymodule.&lt;br /&gt;
&lt;br /&gt;
Then you must fill the array $this-&amp;gt;rights with as many entries than different permissions you need to manage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;rights[$r][0] = 10001;&lt;br /&gt;
$this-&amp;gt;rights[$r][1] = &#039;Label by default of permission&#039;;&lt;br /&gt;
$this-&amp;gt;rights[$r][2] = &#039;r&#039;;&lt;br /&gt;
$this-&amp;gt;rights[$r][3] = 1;&lt;br /&gt;
$this-&amp;gt;rights[$r][4] = &#039;action&#039;;&lt;br /&gt;
$this-&amp;gt;rights[$r][5] = &#039;subaction&#039;;&lt;br /&gt;
$r++;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Into $this-&amp;gt;rights[$r][0], put a permission id not already used (See into menu &#039;&#039;&#039;System info&#039;&#039;&#039; on a working installation of Dolibarr to know list of id already used by standard modules.&lt;br /&gt;
Into $this-&amp;gt;rights[$r][1], put a label by default for permission (This label will be used if no translation can be found into the file &#039;&#039;&#039;admin.lang&#039;&#039;&#039; Translation key should be &amp;quot;Permission10001=My permission Label&amp;quot;).&lt;br /&gt;
Into $this-&amp;gt;rights[$r][2], types of the permission. There are three type of permission, &#039;r&#039; for read, list or expert permission, &#039;w&#039; for write or update permission and &#039;d&#039; for delete permission.&lt;br /&gt;
Into $this-&amp;gt;rights[$r][3], put 1 if this permission must be granted automatically by default to any newly created user.&lt;br /&gt;
Into $this-&amp;gt;rights[$r][4] and $this-&amp;gt;rights[$r][5], put an action and subaction string without spaces. You will be able to test if a user has the permission in your PHP source code with the sequence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
if ($user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;action-&amp;gt;subaction) ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Define your own box (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If your module needs to provide one or several new boxes to show on home page.&lt;br /&gt;
&lt;br /&gt;
===Define your box===&lt;br /&gt;
For this, modify the array $this-&amp;gt;boxes into the module descriptor file.&lt;br /&gt;
All you have to do is to add 2 lines for each box file you will create into directory &#039;&#039;&#039;htdocs/mymodule/core/boxes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;boxes[0][&#039;file&#039;]=&#039;mybox0.php@mymodule&#039;&lt;br /&gt;
$this-&amp;gt;boxes[0][&#039;note&#039;]=&#039;My box 0&#039;&lt;br /&gt;
 ...&lt;br /&gt;
$this-&amp;gt;boxes[n][&#039;file&#039;]=&#039;myboxn.php@mymodule&#039;&lt;br /&gt;
$this-&amp;gt;boxes[n][&#039;note&#039;]=&#039;My box n&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then create files &#039;&#039;&#039;htdocs/mymodule/core/boxes/mybox0.php&#039;&#039;&#039;, &#039;&#039;&#039;htdocs/mymodule/core/boxes/mybox1.php&#039;&#039;&#039;... by copying an example from an existing box file (found into directory &#039;&#039;&#039;htdocs/core/boxes&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
===Test if your box is detected by Dolibarr===&lt;br /&gt;
Disable and enabled module.&lt;br /&gt;
&lt;br /&gt;
Go into menu &#039;&#039;&#039;Home - Setup - Boxes&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Your boxes must appear in the list of boxes you can activate. Activate the box and go on the home page to see if the box is showing correctly.&lt;br /&gt;
&lt;br /&gt;
==Define your own export (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If your module provides new predefined database export profiles (for its own tables or for already existing tables of another module).&lt;br /&gt;
&lt;br /&gt;
===Define export===&lt;br /&gt;
For this uncomment and modify arrays $this-&amp;gt;export_xxx in your module descriptor file.&lt;br /&gt;
&lt;br /&gt;
===Test your export===&lt;br /&gt;
Go into menu Tools -&amp;gt; Export. Your export will appear in the list of available predefined exports (if your module is enabled).&lt;br /&gt;
Choose it, you must see a list of all possible fields defined in the export arrays.&lt;br /&gt;
Choose on field and try to build an export file. If ok, try again with all fields.&lt;br /&gt;
&lt;br /&gt;
==Define your CSS styles (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If in your PHP pages, you use class styles that are not defined inside Dolibarr themes CSS (not recommanded).&lt;br /&gt;
&lt;br /&gt;
===Create and declare your style sheet===&lt;br /&gt;
Create a style sheet CSS named &#039;&#039;&#039;mymodule.css&#039;&#039;&#039; or &#039;&#039;&#039;mymodule.css.php&#039;&#039;&#039; and put it into directory &#039;&#039;&#039;htdocs/mymodule&#039;&#039;&#039;. You can have several CSS files per module.&lt;br /&gt;
Remember it&#039;s better to use existing styles already available by default into Dolibarr (The CSS file used by Dolibarr is file &#039;&#039;&#039;themes/mytheme/&#039;&#039;themename&#039;&#039;.css.php&#039;&#039;&#039;. Create your own CSS files only if you need absolutely to add not already existing styles.&lt;br /&gt;
&lt;br /&gt;
Once your style sheets are ready, declare them into your module descriptor file by modifying the property &#039;&#039;&#039;$this-&amp;gt;modules_parts&#039;&#039;&#039;.&lt;br /&gt;
Value to put here must be an array of relative URLs to your CSS files.&lt;br /&gt;
For example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;module_parts = array(&#039;css&#039; =&amp;gt; array(&#039;/mymodule/css/mymodule.css.php&#039;,&#039;/mymodule/css/myother.css&#039;));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test your style sheet===&lt;br /&gt;
Disable and enable your module.&lt;br /&gt;
&lt;br /&gt;
Go on the home page (index.php). Show the HTML source of the page.&lt;br /&gt;
&lt;br /&gt;
You should see into the HTML header, a line that declares your style sheet.&lt;br /&gt;
&lt;br /&gt;
==Add your Javascript functions (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If in your PHP pages, you use javascript functions not available in Dolibarr (in file lib_head.js)&lt;br /&gt;
&lt;br /&gt;
If you need to use your own javascript functions inside your PHP pages, it is necessary to have your functions, defined into your javascript file &#039;&#039;&#039;htdocs/mymodule/js/mymodule.js&#039;&#039;&#039;, included into the HTML HEAD section.&lt;br /&gt;
To ask Dolibarr that forge this header to include your own javascript file, you must just provide it to the llxHeader() function called by your page.&lt;br /&gt;
&lt;br /&gt;
Example for page /htdocs/mymodule/mypage.php :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$morejs=array(&amp;quot;/mymodule/js/mymodule.js&amp;quot;);&lt;br /&gt;
llxHeader(&#039;&#039;,&#039;Titre&#039;,&#039;&#039;,&#039;&#039;,&#039;&#039;,&#039;&#039;,$morejs,&#039;&#039;,0,0); &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Run your own code on any Dolibarr event (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If you want to execute your own code once a common Dolibarr event has occurred (example: I want to update a table in my module when an invoice is created into Dolibarr), you must create a &#039;&#039;&#039;triggers&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
See also [[Interfaces_Dolibarr_toward_foreign_systems]]&lt;br /&gt;
and [[Interfaces_from_foreign_systems_toward_Dolibarr]]&lt;br /&gt;
&lt;br /&gt;
==Insert your code inside Dolibarr hooks positions (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: When you want to add code or replace Dolibarr code into another situation than a business event (See the previous chapter for adding code during a business event).&lt;br /&gt;
&lt;br /&gt;
See page [[Hooks_system]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Add your own numbering rules==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: When you need a new rule for generated ref of elements that are not covered by existing rules.&lt;br /&gt;
&lt;br /&gt;
See page [[Create numbering module]].&lt;br /&gt;
&lt;br /&gt;
==Add your document template (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: When you want to personalized your own generated PDF or ODT documents.&lt;br /&gt;
&lt;br /&gt;
Note: To add this feature you don&#039;t need to create a module descriptor.&lt;br /&gt;
&lt;br /&gt;
Documentation to add your own template is available on page [[Create_a_PDF_document_template]] or [[Create_an_ODT_document_template]].&lt;br /&gt;
&lt;br /&gt;
==Add your skin (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: When you want to personalized your colors/fonts/images.&lt;br /&gt;
&lt;br /&gt;
Note: To add this feature you don&#039;t need to create a module descriptor.&lt;br /&gt;
&lt;br /&gt;
To add your own skin, read page [[Skins]].&lt;br /&gt;
&lt;br /&gt;
=Some coding rules and predefined functions=&lt;br /&gt;
The coding rules to be followed are defined in the [[Developer documentation]], under section &amp;quot;General Information - Language and standards development&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
A lot of predefined features for developers are also available and described into page [[Developer documentation]] under section &amp;quot;Technical components of Dolibarr&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=Create a package to distribute and install your module=&lt;br /&gt;
This process must be used to generate a package to submit it on the http://www.dolistore.com marketplace.&lt;br /&gt;
But you can use it to have a package easy to distribute on your own network.&lt;br /&gt;
&lt;br /&gt;
*Go into the directory &#039;&#039;&#039;/build&#039;&#039;&#039; and copy the file &#039;&#039;&#039;makepack-dolibarrmodules.conf&#039;&#039;&#039; into &#039;&#039;&#039;makepack-mymodule.conf&#039;&#039;&#039;. Warning, this directory may not be provided in some packages of stable versions. If so, it can be retrieved from the snapshot available for download on the Dolibarr website in area &amp;quot;Development version&amp;quot; (taken in this case the whole build directory which is autonomous and independent directory).&lt;br /&gt;
&lt;br /&gt;
Edit this file to add a list of file names for all new files you created for your module (module descriptor, new sql tables files, php page, images, etc...)&lt;br /&gt;
&lt;br /&gt;
*Run the script via Perl (need the Perl version 5.0 or later):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
perl makepack-dolibarrmodule.pl&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The script asks you the name of your module, its major and minor version. A file &#039;&#039;&#039;mymodule.zip &#039;&#039;&#039; will then be manufactured containing your module ready to be deployed.&lt;br /&gt;
&lt;br /&gt;
*The person who receives your module must then place the file in the root directory of a Dolibarr installation and perform the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf mymodule.zip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If you want your module to be public, you can submit it (the zip file) on Dolibarr marketplace website: {{LinkToPluginDownload}} (you must create an account first and be logged to use the link &amp;quot;Submit a module/product&amp;quot;).&lt;br /&gt;
**If your module was built correctly, the file will be validated later.&lt;br /&gt;
**If quality is enough and license permits it, the code might be added inside main Dolibarr sources (except if you disagree for that).&lt;br /&gt;
&lt;br /&gt;
=Enabling/activation condition of external module on DoliStore=&lt;br /&gt;
&lt;br /&gt;
See [[Module_Dolistore_Validation_Rules|Validation Rules]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:Module_Builder_icon.png&amp;diff=62262</id>
		<title>File:Module Builder icon.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:Module_Builder_icon.png&amp;diff=62262"/>
		<updated>2025-01-23T22:57:39Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Module Builder icon&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_development&amp;diff=62261</id>
		<title>Module development</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_development&amp;diff=62261"/>
		<updated>2025-01-23T22:53:34Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* Module creation with the module builder */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Développement_module]]&lt;br /&gt;
[[es:Desarrollo_de_un_módulo]]&lt;br /&gt;
[[de:Modul_Entwicklung]]&lt;br /&gt;
[[zh:模块开发]]&lt;br /&gt;
[[ja:モジュール_開発]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Core]]&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
&lt;br /&gt;
To create a new module/addon for Dolibarr, there is several steps. This tutorial will describe you each of them to build a module to extend Dolibarr features, like one or several of the following :&lt;br /&gt;
&lt;br /&gt;
*Add new tables in database.&lt;br /&gt;
*Add your own menu entries.&lt;br /&gt;
*Add new screens to edit new tables.&lt;br /&gt;
*Add or remove tabs on object view (invoice, product, order, event, ...).&lt;br /&gt;
*Add predefined exports for the internal export tool.&lt;br /&gt;
*Add new information widget in the home page.&lt;br /&gt;
*Add new substitutions variables.&lt;br /&gt;
*Define new permissions.&lt;br /&gt;
*Execute code automatically triggered by a particular Dolibarr action.&lt;br /&gt;
*Insert your code inside Dolibarr hooks positions.&lt;br /&gt;
*Add your numbering rule to generate the reference of objects&lt;br /&gt;
*Add a new document template.&lt;br /&gt;
*Add a new skin.&lt;br /&gt;
&lt;br /&gt;
etc...&lt;br /&gt;
&lt;br /&gt;
Following chapters presents how to do all of this manually with an easy way.&lt;br /&gt;
&lt;br /&gt;
=Module creation with the module builder=&lt;br /&gt;
From Dolibarr 9.0 it is possible to create the main pages of your module with the Module Builder. To activate it:&lt;br /&gt;
&lt;br /&gt;
*Go into the list of module and enable the module &amp;quot;Module Builder&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
[[File:Module Builder.png|alt=Module Builder|thumb]]&lt;br /&gt;
&lt;br /&gt;
*Then click on the &amp;quot;bug&amp;quot; image in the top right of screen.&lt;br /&gt;
&lt;br /&gt;
[[File:Module Builder.png|alt=Module Builder|thumb]]&lt;br /&gt;
&lt;br /&gt;
=Template of an External Module=&lt;br /&gt;
A good model to start development of external module can be found here : [https://github.com/Dolibarr/dolibarr/tree/develop/htdocs/modulebuilder/template GitHub Dolibarr Module Modèle]&lt;br /&gt;
&lt;br /&gt;
=Create your module=&lt;br /&gt;
==Create a Module descriptor for your Module (required)==&lt;br /&gt;
&#039;&#039;&#039;When it is required&#039;&#039;&#039;: Required as soon as an addon is developed, whatever its goal is (except for adding a skin).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since Dolibarr 9.0, you should use the ModuleBuilder module provided as a standard module to generate the module descriptor&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Create your module descriptor===&lt;br /&gt;
The first step is to create a file descriptor for the module. &lt;br /&gt;
&lt;br /&gt;
*Create directory &#039;&#039;&#039;/htdocs/custom/&#039;&#039;mymodule&#039;&#039;/core/modules&#039;&#039;&#039; (for an external module) or &#039;&#039;&#039;/htdocs/&#039;&#039;mymodule&#039;&#039;/core/modules&#039;&#039;&#039; if you plan to have this module an official core module of Dolibarr. Then copy the file modMyModule.class.php from the directory &#039;&#039;&#039;htdocs/modulebuilder/template&#039;&#039;&#039; into this directory. Change the name of the file modMyModule.class.php to the name corresponding to the purpose of your module. Name of the file must start with initial &#039;mod&#039; and end with .class.php (for example if you want to give the name &#039;NewName&#039; to this file, then the name should be &#039;modNewName.class.php&#039;).&lt;br /&gt;
&lt;br /&gt;
Next modify the contents of this file as follows:&lt;br /&gt;
&lt;br /&gt;
*Replace all &amp;quot;modMyModule&amp;quot; with a value which corresponds to the purpose of your module. This value must always start with &#039;mod&#039; and contain only alpha characters (again, if the name given to the file was &#039;NewName&#039;, then replace all &amp;quot;modMyModule&amp;quot; with &amp;quot;modNewName&amp;quot;).&lt;br /&gt;
*Change the number in: $this-&amp;gt;numero = 100000 by a number that designates your module id. To avoid conflicts with other modules, you can consult the page that lists already reserved id numbers: [[List of modules id|List of modules id]].&lt;br /&gt;
*Modify any other variables defined in the constructor (see comment in the code skeleton for their meaning).&lt;br /&gt;
&lt;br /&gt;
Your file descriptor for your module is ready. See the next step to activate it.&lt;br /&gt;
&lt;br /&gt;
===Test your descriptor===&lt;br /&gt;
&lt;br /&gt;
Launch Dolibarr and go to page &#039;&#039;&#039;Setup-&amp;gt;module&#039;&#039;&#039;? &lt;br /&gt;
If you set the property version in the module description you should see a new line with your new module and the possibility to activate it or not. If you set the property version to &amp;quot;develop&amp;quot; or &amp;quot;experiental&amp;quot;, to see your module, you must first go into &#039;&#039;&#039;Setup-Others&#039;&#039;&#039; and set MAIN_FEATURES_LEVEL to 1 to see &amp;quot;experimental&amp;quot; modules or 2 to see &amp;quot;development&amp;quot; modules.&lt;br /&gt;
&lt;br /&gt;
==Tree of path for new module files (required)==&lt;br /&gt;
This is how your files must be organized when building a new module (the zip file must also match this rule).&lt;br /&gt;
Note: Only the second line is mandatory.&lt;br /&gt;
&lt;br /&gt;
{{TemplateModuleTreeSimple}}&lt;br /&gt;
&lt;br /&gt;
==Create your SQL tables and the PHP DAO class (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If your module needs to manage data of its own&lt;br /&gt;
&lt;br /&gt;
===Create your .sql file===&lt;br /&gt;
If your module is designed to manage data of its own, which are not available in the standard version of Dolibarr, it is necessary to define SQL tables to store the data.&lt;br /&gt;
&lt;br /&gt;
Scripts for creating tables and loading data by your own module are saved into a subdirectory sql (&#039;&#039;&#039;&amp;quot;mymodule/sql&amp;quot;&#039;&#039;&#039;) of your module. (With ModuleBuilder, the directory and all sql files will be created automatically when you will create a new Object from tab Object).&lt;br /&gt;
&lt;br /&gt;
Then check into your descriptor file, into function &#039;&#039;&#039;init&#039;&#039;&#039; that the line&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;$this-&amp;gt;_load_tables(&#039;/mymodule/sql/&#039;);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is not commented.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rules to follow:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Add the files about creating tables commands on the principle of an &#039;&#039;&#039;llx_mytable.sql&#039;&#039;&#039; file per table, with an optional &#039;&#039;&#039;llx_mytable.key.sql&#039;&#039;&#039; file (see existing files in &#039;&#039;&#039;install/mysql/tables&#039;&#039;&#039; for examples).&lt;br /&gt;
*The recommended type and name for SQL fields are defined into page [[Language_and_development_rules#Table_and_fields_structures]].&lt;br /&gt;
*To manage data, you must create a file called &#039;&#039;&#039;data.sql&#039;&#039;&#039; inside directory &#039;&#039;&#039;/mymodule/sql/&#039;&#039;&#039; that contains SQL command to add/edit/delete data.&lt;br /&gt;
*Don&#039;t use the double quote for strings (eg &#039;chaine&#039; not &amp;quot;chaine&amp;quot;) because the double quote have a specific meaning in PostGreSQL&lt;br /&gt;
&lt;br /&gt;
Example of content of a file data.sql&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
 delete from llx_const where name=&#039;MYMODULE_IT_WORKS&#039; and entity=&#039;__ENTITY__&#039;;&lt;br /&gt;
 insert into llx_const (name, value, type, note, visible, entity) values (&#039;MYMODULE_IT_WORKS&#039;,&#039;1&#039;,&#039;chaine&#039;,&#039;A constant vor my module&#039;,1,&#039;__ENTITY__&#039;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files must be operational for the database mysql. Rem: The files of other databases are not maintained. They will be read and converted on the fly by the driver of the other database.&lt;br /&gt;
&lt;br /&gt;
===Test your .sql files===&lt;br /&gt;
&lt;br /&gt;
Once the files ready, you can return to the page to enable Dolibarr modules and disable the module, drop those tables in the database (if they already exists) and reactivate the module. The tables should be recreated by the activation of the module. If this is not the case, check your scripts by passing them by hand, or check the Dolibarr logs.&lt;br /&gt;
&lt;br /&gt;
===Generate the PHP DAO class===&lt;br /&gt;
The DAO PHP files should have been generated by ModuleBuilder after creating an object.&lt;br /&gt;
&lt;br /&gt;
You can however create them manually by copying existing object however using ModuleBuilder is highly recommended. You should find examples into &#039;&#039;&#039;htdocs/modulebuilder/templates/class/myobject.class.php&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In this class, there are already operational CRUD (Create/Read/Update/Delete) methods to perform an insert, a fetch (select), an update, a delete of a table row. Edit the file to use the correct module name, tables and place this file in the class subdirectory of the module. The Module Builder allows you to do this with just a few mouse clicks.&lt;br /&gt;
&lt;br /&gt;
==The tab management (optional)==&lt;br /&gt;
&lt;br /&gt;
===Add or remove your own tabs on object sheets===&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: To add a tab on an object (invoices, orders, proposals, member ...)&lt;br /&gt;
&lt;br /&gt;
To do this go into the file descriptor of module previously created and edit the $this-&amp;gt;tabs array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
	// Array to add new pages in new tabs or remove existing one&lt;br /&gt;
	$this-&amp;gt;tabs = array(&#039;objecttype:+tabname1:Title1:mylangfile@mymodule:$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;read:/mymodule/mypagetab1.php?id=__ID__&#039;    // To add a new tab identified by code tabname1&lt;br /&gt;
                            &#039;objecttype:+tabname2:Title2:mylangfile@mymodule:$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;read:/mymodule/mypagetab2.php?id=__ID__&#039;,   // To add a new tab identified by code tabname2&lt;br /&gt;
                            &#039;objecttype:-tabname&#039;);                                                     // To remove an existing tab identified by code tabname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The table should contain a list of strings, each string representing a new tab. &lt;br /&gt;
The format of the string consisting of 5 parts separated by &amp;quot;:&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Part 1: The element type (object type) where the tab should appear is a value from the following:&lt;br /&gt;
{{TemplateModuleTabs}}&lt;br /&gt;
&lt;br /&gt;
*Part 2: A code to identify tab to add (start with +tabname1) or to remove (start with -tabname1)&lt;br /&gt;
*Part 3: The title of the tab(Title1). This can be a hardcoded read or better a code translation in module lang file .&lt;br /&gt;
*Part 4: The name of the file &amp;quot;*.lang&amp;quot; (mylangfile@mymodule) which contains correspondence between the code translation and language to display. If this name is followed with @mymodule, Dolibarr will search translation file &amp;quot;*.lang&amp;quot; within the module in htdocs/custom/mymodule/langs/code_CODE/mylangfile.lang, otherwise Dolibarr will look for file in htdocs/langs/code_CODE/mylangfile.lang&lt;br /&gt;
*Part 5: A condition to test if tab must be visible($user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;read) &#039;&#039;&#039;or&#039;&#039;&#039; put 1 to be always visible.&lt;br /&gt;
*Part 6: The URL of the page to display when you click on the tab (/mymodule/mypagetab1.php). The __ID__ string will be replaced automatically by the Id of the element concerned.&lt;br /&gt;
&lt;br /&gt;
To feed the contents of the tab with data from the database, see the next chapter.&lt;br /&gt;
&lt;br /&gt;
In order to get the names  &#039;tabname&#039; of existing tabs, you have to check the names used in the function &#039;product_prepare_head&#039; of the file  &#039;core/lib/module.lib.php&#039; corresponding to section &#039;$head[$h][2]&#039;.&lt;br /&gt;
&lt;br /&gt;
===Show tabs navigation into your own pages===&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: To show all standard tabs of an object (product, tiers, etc.) on your page.&lt;br /&gt;
&lt;br /&gt;
You must follow these steps :&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Include files you need into your file&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For each object type, there are two files to include with line&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;require_once($url_fichier) ;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is example of files to include (DOL_DOCUMENT_ROOT is often dolibarr/htdocs/) :&lt;br /&gt;
&lt;br /&gt;
*Object thirdparty (thirdparty) :&lt;br /&gt;
**DOL_DOCUMENT_ROOT/societe/class/societe.class.php&lt;br /&gt;
**DOL_DOCUMENT_ROOT/core/lib/company.lib.php&lt;br /&gt;
*Object product (product) :&lt;br /&gt;
**DOL_DOCUMENT_ROOT/product/class/product.class.php&lt;br /&gt;
**DOL_DOCUMENT_ROOT/core/lib/product.lib.php&lt;br /&gt;
*Object invoice (invoice) :&lt;br /&gt;
**DOL_DOCUMENT_ROOT/compta/facture/class/facture.class.php&lt;br /&gt;
**DOL_DOCUMENT_ROOT/core/lib/invoice.lib.php&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create and load the object to show into your tab&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create an instance of an object of the correct class and load object from the database by using the fetch method of an object in providing to this method the id you get from URL (ie : /mytab.php?id=1).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example :&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$id=GETPOST(&#039;id&#039;,&#039;int&#039;);&lt;br /&gt;
$ref=GETPOST(&#039;ref&#039;,&#039;alpha&#039;);&lt;br /&gt;
$product = new Product($db) ;&lt;br /&gt;
$result = $product-&amp;gt;fetch($id,$ref) ; // Test $result to check the database read is ok&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Get a list of all tabs to show for your object type&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use function XXX_prepare_head($obj), where XXX is name of object. This will return an array with all definition of tab entries to show. The parameter to put into this method is the instance of an object you want tabs.&lt;br /&gt;
&lt;br /&gt;
The resulting array has the following structure&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$head        // Array of tabs&lt;br /&gt;
$head[$h]    // Element to describe one tab.&lt;br /&gt;
$head[$h][0] // Url of page to show when you click on tab&lt;br /&gt;
$head[$h][1] // Title of tab&lt;br /&gt;
$head[$h][2] // Code name to identify the tab&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example :&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$head = product_prepare_head($product, $user) ; // parameter $user is present for some function anly&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4. show tabs into your page&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use function dol_fiche_head() to show all tabs defined into array $head returned by XX_prepare_head().&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
dol_fiche_head($links, $active=&#039;0&#039;, $title=&#039;&#039;, $notab=0, $picto=&#039;&#039;)&lt;br /&gt;
//$links  // Tableau des onglets, appelé $head plus haut.&lt;br /&gt;
//$active // Onglet actif (mettre le nom de l&#039;onglet défini dans votre fichier de module, ou un nom contenu dans $head[$h][2]). Cet onglet sera mis en surbrillance&lt;br /&gt;
//$title  // Title to show (shown into a special tab that you can&#039;t click)&lt;br /&gt;
//$notab&lt;br /&gt;
//$picto  // Name of image to show into title. Possible values are:&lt;br /&gt;
//            product&lt;br /&gt;
//            service&lt;br /&gt;
//            company&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function will show required tabs and open an html element &#039;&#039;&amp;lt; div class=&amp;quot;&amp;quot; &amp;gt;&#039;&#039; that correspond to the area under the tabs. To close area of a tab, just use &#039;&#039;&amp;lt; /div &amp;gt;&#039;&#039; into your PHP page.&lt;br /&gt;
&lt;br /&gt;
==Create or modify PHP screens (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If the purpose of your module is to add features that require new or modified screens.&lt;br /&gt;
&lt;br /&gt;
===Create a new PHP screen===&lt;br /&gt;
You must then create your PHP pages that will show/edit data from tables using the skeleton templates provided as an example in the directory &#039;&#039;&#039;modulebuilder/myobject_page.php&#039;&#039;&#039; (For the development of a script from the command line, see [[Script development]]).&lt;br /&gt;
&lt;br /&gt;
To create a new user screen, create a subdirectory of &#039;&#039;&#039;htdocs&#039;&#039;&#039; (if not already done) for your module (in &#039;&#039;&#039;htdocs/mymodule&#039;&#039;&#039; for example) to store the pages you will create.&lt;br /&gt;
&lt;br /&gt;
Copy, into that directory, the file &#039;&#039;&#039;myobject_page.php&#039;&#039;&#039; that will serve as a starting point for your page file.&lt;br /&gt;
Edit the file to have a correct relative path to the main.inc.php file. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
// Load Dolibarr environment&lt;br /&gt;
$res=0;&lt;br /&gt;
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; ! empty($_SERVER[&amp;quot;CONTEXT_DOCUMENT_ROOT&amp;quot;])) $res=@include($_SERVER[&amp;quot;CONTEXT_DOCUMENT_ROOT&amp;quot;].&amp;quot;/main.inc.php&amp;quot;);&lt;br /&gt;
// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME&lt;br /&gt;
$tmp=empty($_SERVER[&#039;SCRIPT_FILENAME&#039;])?&#039;&#039;:$_SERVER[&#039;SCRIPT_FILENAME&#039;];$tmp2=realpath(__FILE__); $i=strlen($tmp)-1; $j=strlen($tmp2)-1;&lt;br /&gt;
while($i &amp;gt; 0 &amp;amp;&amp;amp; $j &amp;gt; 0 &amp;amp;&amp;amp; isset($tmp[$i]) &amp;amp;&amp;amp; isset($tmp2[$j]) &amp;amp;&amp;amp; $tmp[$i]==$tmp2[$j]) { $i--; $j--; }&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; $i &amp;gt; 0 &amp;amp;&amp;amp; file_exists(substr($tmp, 0, ($i+1)).&amp;quot;/main.inc.php&amp;quot;)) $res=@include(substr($tmp, 0, ($i+1)).&amp;quot;/main.inc.php&amp;quot;);&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; $i &amp;gt; 0 &amp;amp;&amp;amp; file_exists(dirname(substr($tmp, 0, ($i+1))).&amp;quot;/main.inc.php&amp;quot;)) $res=@include(dirname(substr($tmp, 0, ($i+1))).&amp;quot;/main.inc.php&amp;quot;);&lt;br /&gt;
// Try main.inc.php using relative path&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; file_exists(&amp;quot;../main.inc.php&amp;quot;)) $res=@include(&amp;quot;../main.inc.php&amp;quot;);&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; file_exists(&amp;quot;../../main.inc.php&amp;quot;)) $res=@include(&amp;quot;../../main.inc.php&amp;quot;);&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; file_exists(&amp;quot;../../../main.inc.php&amp;quot;)) $res=@include(&amp;quot;../../../main.inc.php&amp;quot;);&lt;br /&gt;
if (! $res) die(&amp;quot;Include of main fails&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
As you can see, there are several tries to load the main.inc.php (or master.inc.php). The goal is to succeed in the most cases as possible. The minimum is 2 lines: one to try to load the master/main.inc.php into the dolibarr root directory and another one to try to load the file to support the case when the module is deployed into the &amp;quot;custom&amp;quot; directory. But you can have more to deal more situation. The provided example should be able to load the file main/master.inc.php in nearly all situation/setups.&lt;br /&gt;
&lt;br /&gt;
Note that you may add more &amp;quot;../&amp;quot; depending on the depth of the file relative to your module directory tree.&lt;br /&gt;
&lt;br /&gt;
It&#039;s in the main.inc.php file that is loaded technical environment variables and permissions. The following variables are objects positioned in this file:&lt;br /&gt;
&lt;br /&gt;
*$user    Object that contains the characteristics of the user + his permissions.&lt;br /&gt;
*$conf    Object that contains Dolibarr configuration.&lt;br /&gt;
*$db      Object that contains an opened connection handler to the database.&lt;br /&gt;
*$langs   Object that contains the user&#039;s language.&lt;br /&gt;
&lt;br /&gt;
Then enter your code to display the page.&lt;br /&gt;
&lt;br /&gt;
*To include a class or library dedicated to the module is done using a Dolibarr function (and not using directly include_once):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example :&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
dol_include_once(&#039;/mymodule/class/myclass.class.php&#039;, &#039;MyClass&#039;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*To include classes provided with Dolibarr, use the following syntax:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example :&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
require_once DOL_DOCUMENT_ROOT.&#039;/core/class/doli.class.php&#039;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add some fields into existing forms===&lt;br /&gt;
You may want to provide a module that adds more fields into forms (input and view) of some elements. &lt;br /&gt;
&lt;br /&gt;
A heavy solution (but not so bad) may be to replace all pages used to create element (this means to disable the &amp;quot;New element&amp;quot; menu entry and adding yours, and disable tab that shows element to replace with a tab that is your own full page (copied/pasted from original) to do same than original page but modified to add your fields and stored added data into your own table). Go to menu [[#Define your entries in the menu (optional)]] and [[#The tab management (optional)]] if this solution suits you (this solution is more powerful since you can change everything you want into the page). &lt;br /&gt;
&lt;br /&gt;
We will describe here another solution, that works only to &amp;quot;add fields&amp;quot; at end of existing fields, using the element &amp;quot;category&amp;quot; as an example but you can convert this tutorial for invoice, proposal ...&lt;br /&gt;
&lt;br /&gt;
*First thing is to add a table, owned by your module, to store the value of new fields. This table will have only one column called &amp;quot;rowid&amp;quot; (will contain the same value than field rowid of element table) + one column for each new field you want to add. Then create a class with CRUD (Create/Read/Update/Delete) methods for this new table. For this two tasks, go back to previous chapter [[#Create your SQL tables and the PHP DAO class]].&lt;br /&gt;
*Next step is to add a hook into your module to add the new fields into the form. See chapter [[Hooks_system#Implement_the_Hook]] for generic documentation to use hooks.&lt;br /&gt;
&lt;br /&gt;
If you follow this tutorial, to be able to add fields into category forms, you must do:&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
&lt;br /&gt;
===Add/replace part of fields supported by hooks===&lt;br /&gt;
See chapter [[Hooks_system#Implement_the_Hook]] to know how to use Dolibarr existing hooks to add/replace code at Dolibarr hooks place.&lt;br /&gt;
&lt;br /&gt;
===Database access===&lt;br /&gt;
If you need to edit some data in the database inside your own table, use the PHP class generated before.&lt;br /&gt;
&lt;br /&gt;
If you to make access to tables with no dedicated PHP class available, this is always possible (for example if you want to get a list of records with a particular join or filter). In this case, this is a code samples to follow:&lt;br /&gt;
&lt;br /&gt;
To make an insert, update or delete:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$db-&amp;gt;begin();   // Start transaction&lt;br /&gt;
$db-&amp;gt;query(&amp;quot;My SQL request insert, update or delete&amp;quot;);&lt;br /&gt;
$db-&amp;gt;commit();       // Validate transaction&lt;br /&gt;
or $db-&amp;gt;rollback()  // Cancel transaction&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To read:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$resql=$db-&amp;gt;query(&amp;quot;My select request&amp;quot;);&lt;br /&gt;
if ($resql)&lt;br /&gt;
{&lt;br /&gt;
	$num = $db-&amp;gt;num_rows($resql);&lt;br /&gt;
	$i = 0;&lt;br /&gt;
	if ($num)&lt;br /&gt;
	{&lt;br /&gt;
		while ($i &amp;lt; $num)&lt;br /&gt;
		{&lt;br /&gt;
			$obj = $db-&amp;gt;fetch_object($resql);&lt;br /&gt;
			if ($obj)&lt;br /&gt;
			{&lt;br /&gt;
				// You can use here results&lt;br /&gt;
				print $obj-&amp;gt;field1;&lt;br /&gt;
				print $obj-&amp;gt;field2;&lt;br /&gt;
			}&lt;br /&gt;
			$i++;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Define style of your pages===&lt;br /&gt;
To have the look of your own pages to match the Dolibarr theme, it is necessary to use the Dolibarr CSS styles.&lt;br /&gt;
&lt;br /&gt;
You can use for example:&lt;br /&gt;
&lt;br /&gt;
*class=&amp;quot;&#039;&#039;&#039;liste_titre&#039;&#039;&#039;&amp;quot; on tags &#039;&#039;tr&#039;&#039; and &#039;&#039;td&#039;&#039; for the head row of a table.&lt;br /&gt;
*class=&amp;quot;&#039;&#039;&#039;pair&#039;&#039;&#039;&amp;quot; or class=&amp;quot;&#039;&#039;&#039;impair&#039;&#039;&#039;&amp;quot; on tags &#039;&#039;tr&#039;&#039; and &#039;&#039;td&#039;&#039; of other rows of a table.&lt;br /&gt;
*class=&amp;quot;&#039;&#039;&#039;flat&#039;&#039;&#039;&amp;quot; on all input fields (&#039;&#039;input, select, textarea&#039;&#039;...).&lt;br /&gt;
*class=&amp;quot;&#039;&#039;&#039;button&#039;&#039;&#039;&amp;quot; on HTML fields with type &#039;&#039;input type=&amp;quot;submit&amp;quot;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Use the Dolibarr date picker===&lt;br /&gt;
If you want to use the Dolibarr date selector (with its calendar popup) into your pages, use the following line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
 $form=new Form($db);&lt;br /&gt;
 $form-&amp;gt;select_date(&#039;&#039;,&#039;mykey&#039;,0,0,0,&amp;quot;myform&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The string mykey will identify the date selector in the form. You must use different values if you use several date selectors in same page.&lt;br /&gt;
The string myform is the name of the FORM in which the selector is included (value found in the form name=&amp;quot;myform&amp;quot; in HTML page).&lt;br /&gt;
This means a date selector must be included necessarily into an html FORM.&lt;br /&gt;
&lt;br /&gt;
To get value after the POST of your form, the command is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$mydate = dol_mktime(12, 0 , 0, $GETPOST(&#039;mykeymonth&#039;, &#039;int&#039;), GETPOST(&#039;mykeyday&#039;, &#039;int&#039;), GETPOST(&#039;mykeyyear&#039;, &#039;int&#039;));&lt;br /&gt;
print strftime(&#039;%A %d %B %Y&#039;, $mydate);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Overwrite template file (tpl)===&lt;br /&gt;
If you want to overwrite tpl file on your module, you need to declare it on the module_parts :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
&#039;tpl&#039; =&amp;gt; 1,&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then you can put any tpl file on &#039;&#039;&#039;mymodule/core/tpl&#039;&#039;&#039;&lt;br /&gt;
as soon as the module is activate, the tpl will be overwrited&lt;br /&gt;
&lt;br /&gt;
==Add your own setup page (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If your module needs parameters, which are to be provided by the user, for proper setting up of the module.&lt;br /&gt;
&lt;br /&gt;
===Create your page to edit parameters===&lt;br /&gt;
If your module needs several parameters to be setup, you must create a page to edit options (these options will be saved in the [[Table llx_const|table &#039;&#039;&#039;llx_const&#039;&#039;&#039;]]).&lt;br /&gt;
Create a page named &#039;&#039;&#039;mymodule_setuppage.php&#039;&#039;&#039; that shows a form for possible options to update them into the above-mentioned table.&lt;br /&gt;
It is necessary to take an example from a page of the directory &#039;&#039;&#039;/admin&#039;&#039;&#039; that will show you the way to read/save your parameters.&lt;br /&gt;
Put this PHP page into the directory &#039;&#039;&#039;/admin&#039;&#039;&#039; of your module (e.g. mymodule/admin/mymodule_setuppage.php).&lt;br /&gt;
&lt;br /&gt;
===Modify the descriptor file of your module===&lt;br /&gt;
Then, within the descriptor file of your module, modify the variable &#039;&#039;&#039;config_page_url&#039;&#039;&#039; to set the name of this PHP page.&lt;br /&gt;
If the page is in the directory &#039;&#039;&#039;admin/&#039;&#039;&#039;, then the path is not required, e.g. like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;config_page_url = array(&amp;quot;mymodule_setuppage.php&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If the page is in the directory &#039;&#039;&#039;mymodule/admin/&#039;&#039;&#039;, then like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;config_page_url = array(&amp;quot;mymodule_setuppage.php@mymodule&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test your page===&lt;br /&gt;
Go into page &#039;&#039;&#039;Home-&amp;gt;Setup-&amp;gt;Modules&#039;&#039;&#039;, you should see a picture at the end of the line of your module to reach your setup page. Click on it, you should be able to view/edit parameters from your page.&lt;br /&gt;
&lt;br /&gt;
==Define your entries in menu (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If you have created PHP pages, it is necessary that those pages can be reached from menu entries in Dolibarr menu.&lt;br /&gt;
&lt;br /&gt;
===Define your menu entries===&lt;br /&gt;
For this, you must define into the module descriptor, the array this-&amp;gt;menu that declares all menus added by your module.&lt;br /&gt;
This array contains entries that will appear once your module is activated.&lt;br /&gt;
The example module descriptor file &#039;&#039;&#039;modMyModule.class.php&#039;&#039;&#039; contains an example to declare a top menu and also its left menu entries.&lt;br /&gt;
&lt;br /&gt;
This is the example of code to declare your own menu entries in a module descriptor file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
// Main menu entries&lt;br /&gt;
$this-&amp;gt;menu = array();			// List of menus to add&lt;br /&gt;
$r=0;&lt;br /&gt;
&lt;br /&gt;
// Add here entries to declare new menus&lt;br /&gt;
// Example to declare the Top Menu entry:&lt;br /&gt;
$this-&amp;gt;menu[$r]=array(	&#039;fk_menu&#039;=&amp;gt;0,			// Put 0 if this is a top menu&lt;br /&gt;
			&#039;type&#039;=&amp;gt;&#039;top&#039;,			// This is a Top menu entry&lt;br /&gt;
			&#039;titre&#039;=&amp;gt;&#039;MyModule top menu&#039;,&lt;br /&gt;
			&#039;mainmenu&#039;=&amp;gt;&#039;mymodule&#039;,&lt;br /&gt;
			&#039;leftmenu&#039;=&amp;gt;&#039;mymodule&#039;,&lt;br /&gt;
			&#039;url&#039;=&amp;gt;&#039;/mymodule/pagetop.php&#039;,&lt;br /&gt;
			&#039;langs&#039;=&amp;gt;&#039;mylangfile&#039;,	// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.&lt;br /&gt;
			&#039;position&#039;=&amp;gt;100,&lt;br /&gt;
			&#039;enabled&#039;=&amp;gt;&#039;1&#039;,			// Define condition to show or hide menu entry. Use &#039;$conf-&amp;gt;mymodule-&amp;gt;enabled&#039; if entry must be visible if module is enabled.&lt;br /&gt;
			&#039;perms&#039;=&amp;gt;&#039;1&#039;,			// Use &#039;perms&#039;=&amp;gt;&#039;$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;level1-&amp;gt;level2&#039; if you want your menu with a permission rules&lt;br /&gt;
			&#039;target&#039;=&amp;gt;&#039;&#039;,&lt;br /&gt;
			&#039;user&#039;=&amp;gt;2);				// 0=Menu for internal users, 1=external users, 2=both&lt;br /&gt;
$r++;&lt;br /&gt;
&lt;br /&gt;
// Example to declare a Left Menu entry:&lt;br /&gt;
$this-&amp;gt;menu[$r]=array(	&#039;fk_menu&#039;=&amp;gt;&#039;fk_mainmenu=xxx&#039;,		    // Use &#039;fk_mainmenu=xxx&#039; or &#039;fk_mainmenu=xxx,fk_leftmenu=yyy&#039; where xxx is mainmenucode and yyy is a leftmenucode of parent menu&lt;br /&gt;
			&#039;type&#039;=&amp;gt;&#039;left&#039;,			        // This is a Left menu entry&lt;br /&gt;
			&#039;titre&#039;=&amp;gt;&#039;MyModule left menu 1&#039;,&lt;br /&gt;
			&#039;mainmenu&#039;=&amp;gt;&#039;xxx&#039;,&lt;br /&gt;
			&#039;leftmenu&#039;=&amp;gt;&#039;yyy&#039;,&lt;br /&gt;
			&#039;url&#039;=&amp;gt;&#039;/mymodule/pagelevel1.php&#039;,&lt;br /&gt;
			&#039;langs&#039;=&amp;gt;&#039;mylangfile&#039;,	// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.&lt;br /&gt;
			&#039;position&#039;=&amp;gt;100,&lt;br /&gt;
			&#039;enabled&#039;=&amp;gt;&#039;1&#039;,			// Define condition to show or hide menu entry. Use &#039;$conf-&amp;gt;mymodule-&amp;gt;enabled&#039; if entry must be visible if module is enabled.&lt;br /&gt;
			&#039;perms&#039;=&amp;gt;&#039;1&#039;,			// Use &#039;perms&#039;=&amp;gt;&#039;$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;level1-&amp;gt;level2&#039; if you want your menu with a permission rules&lt;br /&gt;
			&#039;target&#039;=&amp;gt;&#039;&#039;,&lt;br /&gt;
			&#039;user&#039;=&amp;gt;2);				// 0=Menu for internal users,1=external users, 2=both&lt;br /&gt;
$r++;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To show the menu or not depending on a permission, modify property &#039;&#039;&#039;perms&#039;&#039;&#039; in the array. See chapter on permissions later to see how to add permissions.&lt;br /&gt;
&lt;br /&gt;
===Test your menu entries===&lt;br /&gt;
Disable and re-enable your module under the Dolibarr module setup page, menus entries must appear (if property &#039;enabled&#039; is declaration array is ok).&lt;br /&gt;
&lt;br /&gt;
==Add your own permissions (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If you want to add new permissions.&lt;br /&gt;
&lt;br /&gt;
The way to define permissions that will manage your module is done inside the module descriptor created previously.&lt;br /&gt;
Modify line &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;rights_class = &#039;mymodule&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
with correct value for mymodule.&lt;br /&gt;
&lt;br /&gt;
Then you must fill the array $this-&amp;gt;rights with as many entries than different permissions you need to manage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;rights[$r][0] = 10001;&lt;br /&gt;
$this-&amp;gt;rights[$r][1] = &#039;Label by default of permission&#039;;&lt;br /&gt;
$this-&amp;gt;rights[$r][2] = &#039;r&#039;;&lt;br /&gt;
$this-&amp;gt;rights[$r][3] = 1;&lt;br /&gt;
$this-&amp;gt;rights[$r][4] = &#039;action&#039;;&lt;br /&gt;
$this-&amp;gt;rights[$r][5] = &#039;subaction&#039;;&lt;br /&gt;
$r++;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Into $this-&amp;gt;rights[$r][0], put a permission id not already used (See into menu &#039;&#039;&#039;System info&#039;&#039;&#039; on a working installation of Dolibarr to know list of id already used by standard modules.&lt;br /&gt;
Into $this-&amp;gt;rights[$r][1], put a label by default for permission (This label will be used if no translation can be found into the file &#039;&#039;&#039;admin.lang&#039;&#039;&#039; Translation key should be &amp;quot;Permission10001=My permission Label&amp;quot;).&lt;br /&gt;
Into $this-&amp;gt;rights[$r][2], types of the permission. There are three type of permission, &#039;r&#039; for read, list or expert permission, &#039;w&#039; for write or update permission and &#039;d&#039; for delete permission.&lt;br /&gt;
Into $this-&amp;gt;rights[$r][3], put 1 if this permission must be granted automatically by default to any newly created user.&lt;br /&gt;
Into $this-&amp;gt;rights[$r][4] and $this-&amp;gt;rights[$r][5], put an action and subaction string without spaces. You will be able to test if a user has the permission in your PHP source code with the sequence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
if ($user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;action-&amp;gt;subaction) ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Define your own box (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If your module needs to provide one or several new boxes to show on home page.&lt;br /&gt;
&lt;br /&gt;
===Define your box===&lt;br /&gt;
For this, modify the array $this-&amp;gt;boxes into the module descriptor file.&lt;br /&gt;
All you have to do is to add 2 lines for each box file you will create into directory &#039;&#039;&#039;htdocs/mymodule/core/boxes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;boxes[0][&#039;file&#039;]=&#039;mybox0.php@mymodule&#039;&lt;br /&gt;
$this-&amp;gt;boxes[0][&#039;note&#039;]=&#039;My box 0&#039;&lt;br /&gt;
 ...&lt;br /&gt;
$this-&amp;gt;boxes[n][&#039;file&#039;]=&#039;myboxn.php@mymodule&#039;&lt;br /&gt;
$this-&amp;gt;boxes[n][&#039;note&#039;]=&#039;My box n&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then create files &#039;&#039;&#039;htdocs/mymodule/core/boxes/mybox0.php&#039;&#039;&#039;, &#039;&#039;&#039;htdocs/mymodule/core/boxes/mybox1.php&#039;&#039;&#039;... by copying an example from an existing box file (found into directory &#039;&#039;&#039;htdocs/core/boxes&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
===Test if your box is detected by Dolibarr===&lt;br /&gt;
Disable and enabled module.&lt;br /&gt;
&lt;br /&gt;
Go into menu &#039;&#039;&#039;Home - Setup - Boxes&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Your boxes must appear in the list of boxes you can activate. Activate the box and go on the home page to see if the box is showing correctly.&lt;br /&gt;
&lt;br /&gt;
==Define your own export (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If your module provides new predefined database export profiles (for its own tables or for already existing tables of another module).&lt;br /&gt;
&lt;br /&gt;
===Define export===&lt;br /&gt;
For this uncomment and modify arrays $this-&amp;gt;export_xxx in your module descriptor file.&lt;br /&gt;
&lt;br /&gt;
===Test your export===&lt;br /&gt;
Go into menu Tools -&amp;gt; Export. Your export will appear in the list of available predefined exports (if your module is enabled).&lt;br /&gt;
Choose it, you must see a list of all possible fields defined in the export arrays.&lt;br /&gt;
Choose on field and try to build an export file. If ok, try again with all fields.&lt;br /&gt;
&lt;br /&gt;
==Define your CSS styles (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If in your PHP pages, you use class styles that are not defined inside Dolibarr themes CSS (not recommanded).&lt;br /&gt;
&lt;br /&gt;
===Create and declare your style sheet===&lt;br /&gt;
Create a style sheet CSS named &#039;&#039;&#039;mymodule.css&#039;&#039;&#039; or &#039;&#039;&#039;mymodule.css.php&#039;&#039;&#039; and put it into directory &#039;&#039;&#039;htdocs/mymodule&#039;&#039;&#039;. You can have several CSS files per module.&lt;br /&gt;
Remember it&#039;s better to use existing styles already available by default into Dolibarr (The CSS file used by Dolibarr is file &#039;&#039;&#039;themes/mytheme/&#039;&#039;themename&#039;&#039;.css.php&#039;&#039;&#039;. Create your own CSS files only if you need absolutely to add not already existing styles.&lt;br /&gt;
&lt;br /&gt;
Once your style sheets are ready, declare them into your module descriptor file by modifying the property &#039;&#039;&#039;$this-&amp;gt;modules_parts&#039;&#039;&#039;.&lt;br /&gt;
Value to put here must be an array of relative URLs to your CSS files.&lt;br /&gt;
For example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;module_parts = array(&#039;css&#039; =&amp;gt; array(&#039;/mymodule/css/mymodule.css.php&#039;,&#039;/mymodule/css/myother.css&#039;));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test your style sheet===&lt;br /&gt;
Disable and enable your module.&lt;br /&gt;
&lt;br /&gt;
Go on the home page (index.php). Show the HTML source of the page.&lt;br /&gt;
&lt;br /&gt;
You should see into the HTML header, a line that declares your style sheet.&lt;br /&gt;
&lt;br /&gt;
==Add your Javascript functions (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If in your PHP pages, you use javascript functions not available in Dolibarr (in file lib_head.js)&lt;br /&gt;
&lt;br /&gt;
If you need to use your own javascript functions inside your PHP pages, it is necessary to have your functions, defined into your javascript file &#039;&#039;&#039;htdocs/mymodule/js/mymodule.js&#039;&#039;&#039;, included into the HTML HEAD section.&lt;br /&gt;
To ask Dolibarr that forge this header to include your own javascript file, you must just provide it to the llxHeader() function called by your page.&lt;br /&gt;
&lt;br /&gt;
Example for page /htdocs/mymodule/mypage.php :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$morejs=array(&amp;quot;/mymodule/js/mymodule.js&amp;quot;);&lt;br /&gt;
llxHeader(&#039;&#039;,&#039;Titre&#039;,&#039;&#039;,&#039;&#039;,&#039;&#039;,&#039;&#039;,$morejs,&#039;&#039;,0,0); &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Run your own code on any Dolibarr event (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If you want to execute your own code once a common Dolibarr event has occurred (example: I want to update a table in my module when an invoice is created into Dolibarr), you must create a &#039;&#039;&#039;triggers&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
See also [[Interfaces_Dolibarr_toward_foreign_systems]]&lt;br /&gt;
and [[Interfaces_from_foreign_systems_toward_Dolibarr]]&lt;br /&gt;
&lt;br /&gt;
==Insert your code inside Dolibarr hooks positions (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: When you want to add code or replace Dolibarr code into another situation than a business event (See the previous chapter for adding code during a business event).&lt;br /&gt;
&lt;br /&gt;
See page [[Hooks_system]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Add your own numbering rules==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: When you need a new rule for generated ref of elements that are not covered by existing rules.&lt;br /&gt;
&lt;br /&gt;
See page [[Create numbering module]].&lt;br /&gt;
&lt;br /&gt;
==Add your document template (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: When you want to personalized your own generated PDF or ODT documents.&lt;br /&gt;
&lt;br /&gt;
Note: To add this feature you don&#039;t need to create a module descriptor.&lt;br /&gt;
&lt;br /&gt;
Documentation to add your own template is available on page [[Create_a_PDF_document_template]] or [[Create_an_ODT_document_template]].&lt;br /&gt;
&lt;br /&gt;
==Add your skin (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: When you want to personalized your colors/fonts/images.&lt;br /&gt;
&lt;br /&gt;
Note: To add this feature you don&#039;t need to create a module descriptor.&lt;br /&gt;
&lt;br /&gt;
To add your own skin, read page [[Skins]].&lt;br /&gt;
&lt;br /&gt;
=Some coding rules and predefined functions=&lt;br /&gt;
The coding rules to be followed are defined in the [[Developer documentation]], under section &amp;quot;General Information - Language and standards development&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
A lot of predefined features for developers are also available and described into page [[Developer documentation]] under section &amp;quot;Technical components of Dolibarr&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=Create a package to distribute and install your module=&lt;br /&gt;
This process must be used to generate a package to submit it on the http://www.dolistore.com marketplace.&lt;br /&gt;
But you can use it to have a package easy to distribute on your own network.&lt;br /&gt;
&lt;br /&gt;
*Go into the directory &#039;&#039;&#039;/build&#039;&#039;&#039; and copy the file &#039;&#039;&#039;makepack-dolibarrmodules.conf&#039;&#039;&#039; into &#039;&#039;&#039;makepack-mymodule.conf&#039;&#039;&#039;. Warning, this directory may not be provided in some packages of stable versions. If so, it can be retrieved from the snapshot available for download on the Dolibarr website in area &amp;quot;Development version&amp;quot; (taken in this case the whole build directory which is autonomous and independent directory).&lt;br /&gt;
&lt;br /&gt;
Edit this file to add a list of file names for all new files you created for your module (module descriptor, new sql tables files, php page, images, etc...)&lt;br /&gt;
&lt;br /&gt;
*Run the script via Perl (need the Perl version 5.0 or later):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
perl makepack-dolibarrmodule.pl&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The script asks you the name of your module, its major and minor version. A file &#039;&#039;&#039;mymodule.zip &#039;&#039;&#039; will then be manufactured containing your module ready to be deployed.&lt;br /&gt;
&lt;br /&gt;
*The person who receives your module must then place the file in the root directory of a Dolibarr installation and perform the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf mymodule.zip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If you want your module to be public, you can submit it (the zip file) on Dolibarr marketplace website: {{LinkToPluginDownload}} (you must create an account first and be logged to use the link &amp;quot;Submit a module/product&amp;quot;).&lt;br /&gt;
**If your module was built correctly, the file will be validated later.&lt;br /&gt;
**If quality is enough and license permits it, the code might be added inside main Dolibarr sources (except if you disagree for that).&lt;br /&gt;
&lt;br /&gt;
=Enabling/activation condition of external module on DoliStore=&lt;br /&gt;
&lt;br /&gt;
See [[Module_Dolistore_Validation_Rules|Validation Rules]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_development&amp;diff=62260</id>
		<title>Module development</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_development&amp;diff=62260"/>
		<updated>2025-01-23T22:52:17Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Développement_module]]&lt;br /&gt;
[[es:Desarrollo_de_un_módulo]]&lt;br /&gt;
[[de:Modul_Entwicklung]]&lt;br /&gt;
[[zh:模块开发]]&lt;br /&gt;
[[ja:モジュール_開発]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Core]]&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
&lt;br /&gt;
To create a new module/addon for Dolibarr, there is several steps. This tutorial will describe you each of them to build a module to extend Dolibarr features, like one or several of the following :&lt;br /&gt;
&lt;br /&gt;
*Add new tables in database.&lt;br /&gt;
*Add your own menu entries.&lt;br /&gt;
*Add new screens to edit new tables.&lt;br /&gt;
*Add or remove tabs on object view (invoice, product, order, event, ...).&lt;br /&gt;
*Add predefined exports for the internal export tool.&lt;br /&gt;
*Add new information widget in the home page.&lt;br /&gt;
*Add new substitutions variables.&lt;br /&gt;
*Define new permissions.&lt;br /&gt;
*Execute code automatically triggered by a particular Dolibarr action.&lt;br /&gt;
*Insert your code inside Dolibarr hooks positions.&lt;br /&gt;
*Add your numbering rule to generate the reference of objects&lt;br /&gt;
*Add a new document template.&lt;br /&gt;
*Add a new skin.&lt;br /&gt;
&lt;br /&gt;
etc...&lt;br /&gt;
&lt;br /&gt;
Following chapters presents how to do all of this manually with an easy way.&lt;br /&gt;
&lt;br /&gt;
=Module creation with the module builder=&lt;br /&gt;
From Dolibarr 9.0 it is possible to create the main pages of your module with the Module Builder. To activate it:&lt;br /&gt;
&lt;br /&gt;
*Go into the list of module and enable the module &amp;quot;Module Builder&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
[[File:Mod_builder_2.png|400px]]&lt;br /&gt;
&lt;br /&gt;
*Then click on the &amp;quot;bug&amp;quot; image in the top right of screen.&lt;br /&gt;
&lt;br /&gt;
[[File:Module Builder.png|alt=Module Builder|thumb]]&lt;br /&gt;
&lt;br /&gt;
=Template of an External Module=&lt;br /&gt;
A good model to start development of external module can be found here : [https://github.com/Dolibarr/dolibarr/tree/develop/htdocs/modulebuilder/template GitHub Dolibarr Module Modèle]&lt;br /&gt;
&lt;br /&gt;
=Create your module=&lt;br /&gt;
==Create a Module descriptor for your Module (required)==&lt;br /&gt;
&#039;&#039;&#039;When it is required&#039;&#039;&#039;: Required as soon as an addon is developed, whatever its goal is (except for adding a skin).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Since Dolibarr 9.0, you should use the ModuleBuilder module provided as a standard module to generate the module descriptor&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Create your module descriptor===&lt;br /&gt;
The first step is to create a file descriptor for the module. &lt;br /&gt;
&lt;br /&gt;
*Create directory &#039;&#039;&#039;/htdocs/custom/&#039;&#039;mymodule&#039;&#039;/core/modules&#039;&#039;&#039; (for an external module) or &#039;&#039;&#039;/htdocs/&#039;&#039;mymodule&#039;&#039;/core/modules&#039;&#039;&#039; if you plan to have this module an official core module of Dolibarr. Then copy the file modMyModule.class.php from the directory &#039;&#039;&#039;htdocs/modulebuilder/template&#039;&#039;&#039; into this directory. Change the name of the file modMyModule.class.php to the name corresponding to the purpose of your module. Name of the file must start with initial &#039;mod&#039; and end with .class.php (for example if you want to give the name &#039;NewName&#039; to this file, then the name should be &#039;modNewName.class.php&#039;).&lt;br /&gt;
&lt;br /&gt;
Next modify the contents of this file as follows:&lt;br /&gt;
&lt;br /&gt;
*Replace all &amp;quot;modMyModule&amp;quot; with a value which corresponds to the purpose of your module. This value must always start with &#039;mod&#039; and contain only alpha characters (again, if the name given to the file was &#039;NewName&#039;, then replace all &amp;quot;modMyModule&amp;quot; with &amp;quot;modNewName&amp;quot;).&lt;br /&gt;
*Change the number in: $this-&amp;gt;numero = 100000 by a number that designates your module id. To avoid conflicts with other modules, you can consult the page that lists already reserved id numbers: [[List of modules id|List of modules id]].&lt;br /&gt;
*Modify any other variables defined in the constructor (see comment in the code skeleton for their meaning).&lt;br /&gt;
&lt;br /&gt;
Your file descriptor for your module is ready. See the next step to activate it.&lt;br /&gt;
&lt;br /&gt;
===Test your descriptor===&lt;br /&gt;
&lt;br /&gt;
Launch Dolibarr and go to page &#039;&#039;&#039;Setup-&amp;gt;module&#039;&#039;&#039;? &lt;br /&gt;
If you set the property version in the module description you should see a new line with your new module and the possibility to activate it or not. If you set the property version to &amp;quot;develop&amp;quot; or &amp;quot;experiental&amp;quot;, to see your module, you must first go into &#039;&#039;&#039;Setup-Others&#039;&#039;&#039; and set MAIN_FEATURES_LEVEL to 1 to see &amp;quot;experimental&amp;quot; modules or 2 to see &amp;quot;development&amp;quot; modules.&lt;br /&gt;
&lt;br /&gt;
==Tree of path for new module files (required)==&lt;br /&gt;
This is how your files must be organized when building a new module (the zip file must also match this rule).&lt;br /&gt;
Note: Only the second line is mandatory.&lt;br /&gt;
&lt;br /&gt;
{{TemplateModuleTreeSimple}}&lt;br /&gt;
&lt;br /&gt;
==Create your SQL tables and the PHP DAO class (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If your module needs to manage data of its own&lt;br /&gt;
&lt;br /&gt;
===Create your .sql file===&lt;br /&gt;
If your module is designed to manage data of its own, which are not available in the standard version of Dolibarr, it is necessary to define SQL tables to store the data.&lt;br /&gt;
&lt;br /&gt;
Scripts for creating tables and loading data by your own module are saved into a subdirectory sql (&#039;&#039;&#039;&amp;quot;mymodule/sql&amp;quot;&#039;&#039;&#039;) of your module. (With ModuleBuilder, the directory and all sql files will be created automatically when you will create a new Object from tab Object).&lt;br /&gt;
&lt;br /&gt;
Then check into your descriptor file, into function &#039;&#039;&#039;init&#039;&#039;&#039; that the line&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;$this-&amp;gt;_load_tables(&#039;/mymodule/sql/&#039;);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is not commented.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Rules to follow:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Add the files about creating tables commands on the principle of an &#039;&#039;&#039;llx_mytable.sql&#039;&#039;&#039; file per table, with an optional &#039;&#039;&#039;llx_mytable.key.sql&#039;&#039;&#039; file (see existing files in &#039;&#039;&#039;install/mysql/tables&#039;&#039;&#039; for examples).&lt;br /&gt;
*The recommended type and name for SQL fields are defined into page [[Language_and_development_rules#Table_and_fields_structures]].&lt;br /&gt;
*To manage data, you must create a file called &#039;&#039;&#039;data.sql&#039;&#039;&#039; inside directory &#039;&#039;&#039;/mymodule/sql/&#039;&#039;&#039; that contains SQL command to add/edit/delete data.&lt;br /&gt;
*Don&#039;t use the double quote for strings (eg &#039;chaine&#039; not &amp;quot;chaine&amp;quot;) because the double quote have a specific meaning in PostGreSQL&lt;br /&gt;
&lt;br /&gt;
Example of content of a file data.sql&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
 delete from llx_const where name=&#039;MYMODULE_IT_WORKS&#039; and entity=&#039;__ENTITY__&#039;;&lt;br /&gt;
 insert into llx_const (name, value, type, note, visible, entity) values (&#039;MYMODULE_IT_WORKS&#039;,&#039;1&#039;,&#039;chaine&#039;,&#039;A constant vor my module&#039;,1,&#039;__ENTITY__&#039;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files must be operational for the database mysql. Rem: The files of other databases are not maintained. They will be read and converted on the fly by the driver of the other database.&lt;br /&gt;
&lt;br /&gt;
===Test your .sql files===&lt;br /&gt;
&lt;br /&gt;
Once the files ready, you can return to the page to enable Dolibarr modules and disable the module, drop those tables in the database (if they already exists) and reactivate the module. The tables should be recreated by the activation of the module. If this is not the case, check your scripts by passing them by hand, or check the Dolibarr logs.&lt;br /&gt;
&lt;br /&gt;
===Generate the PHP DAO class===&lt;br /&gt;
The DAO PHP files should have been generated by ModuleBuilder after creating an object.&lt;br /&gt;
&lt;br /&gt;
You can however create them manually by copying existing object however using ModuleBuilder is highly recommended. You should find examples into &#039;&#039;&#039;htdocs/modulebuilder/templates/class/myobject.class.php&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In this class, there are already operational CRUD (Create/Read/Update/Delete) methods to perform an insert, a fetch (select), an update, a delete of a table row. Edit the file to use the correct module name, tables and place this file in the class subdirectory of the module. The Module Builder allows you to do this with just a few mouse clicks.&lt;br /&gt;
&lt;br /&gt;
==The tab management (optional)==&lt;br /&gt;
&lt;br /&gt;
===Add or remove your own tabs on object sheets===&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: To add a tab on an object (invoices, orders, proposals, member ...)&lt;br /&gt;
&lt;br /&gt;
To do this go into the file descriptor of module previously created and edit the $this-&amp;gt;tabs array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
	// Array to add new pages in new tabs or remove existing one&lt;br /&gt;
	$this-&amp;gt;tabs = array(&#039;objecttype:+tabname1:Title1:mylangfile@mymodule:$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;read:/mymodule/mypagetab1.php?id=__ID__&#039;    // To add a new tab identified by code tabname1&lt;br /&gt;
                            &#039;objecttype:+tabname2:Title2:mylangfile@mymodule:$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;read:/mymodule/mypagetab2.php?id=__ID__&#039;,   // To add a new tab identified by code tabname2&lt;br /&gt;
                            &#039;objecttype:-tabname&#039;);                                                     // To remove an existing tab identified by code tabname&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The table should contain a list of strings, each string representing a new tab. &lt;br /&gt;
The format of the string consisting of 5 parts separated by &amp;quot;:&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Part 1: The element type (object type) where the tab should appear is a value from the following:&lt;br /&gt;
{{TemplateModuleTabs}}&lt;br /&gt;
&lt;br /&gt;
*Part 2: A code to identify tab to add (start with +tabname1) or to remove (start with -tabname1)&lt;br /&gt;
*Part 3: The title of the tab(Title1). This can be a hardcoded read or better a code translation in module lang file .&lt;br /&gt;
*Part 4: The name of the file &amp;quot;*.lang&amp;quot; (mylangfile@mymodule) which contains correspondence between the code translation and language to display. If this name is followed with @mymodule, Dolibarr will search translation file &amp;quot;*.lang&amp;quot; within the module in htdocs/custom/mymodule/langs/code_CODE/mylangfile.lang, otherwise Dolibarr will look for file in htdocs/langs/code_CODE/mylangfile.lang&lt;br /&gt;
*Part 5: A condition to test if tab must be visible($user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;read) &#039;&#039;&#039;or&#039;&#039;&#039; put 1 to be always visible.&lt;br /&gt;
*Part 6: The URL of the page to display when you click on the tab (/mymodule/mypagetab1.php). The __ID__ string will be replaced automatically by the Id of the element concerned.&lt;br /&gt;
&lt;br /&gt;
To feed the contents of the tab with data from the database, see the next chapter.&lt;br /&gt;
&lt;br /&gt;
In order to get the names  &#039;tabname&#039; of existing tabs, you have to check the names used in the function &#039;product_prepare_head&#039; of the file  &#039;core/lib/module.lib.php&#039; corresponding to section &#039;$head[$h][2]&#039;.&lt;br /&gt;
&lt;br /&gt;
===Show tabs navigation into your own pages===&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: To show all standard tabs of an object (product, tiers, etc.) on your page.&lt;br /&gt;
&lt;br /&gt;
You must follow these steps :&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1. Include files you need into your file&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For each object type, there are two files to include with line&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;require_once($url_fichier) ;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is example of files to include (DOL_DOCUMENT_ROOT is often dolibarr/htdocs/) :&lt;br /&gt;
&lt;br /&gt;
*Object thirdparty (thirdparty) :&lt;br /&gt;
**DOL_DOCUMENT_ROOT/societe/class/societe.class.php&lt;br /&gt;
**DOL_DOCUMENT_ROOT/core/lib/company.lib.php&lt;br /&gt;
*Object product (product) :&lt;br /&gt;
**DOL_DOCUMENT_ROOT/product/class/product.class.php&lt;br /&gt;
**DOL_DOCUMENT_ROOT/core/lib/product.lib.php&lt;br /&gt;
*Object invoice (invoice) :&lt;br /&gt;
**DOL_DOCUMENT_ROOT/compta/facture/class/facture.class.php&lt;br /&gt;
**DOL_DOCUMENT_ROOT/core/lib/invoice.lib.php&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2. Create and load the object to show into your tab&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create an instance of an object of the correct class and load object from the database by using the fetch method of an object in providing to this method the id you get from URL (ie : /mytab.php?id=1).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example :&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$id=GETPOST(&#039;id&#039;,&#039;int&#039;);&lt;br /&gt;
$ref=GETPOST(&#039;ref&#039;,&#039;alpha&#039;);&lt;br /&gt;
$product = new Product($db) ;&lt;br /&gt;
$result = $product-&amp;gt;fetch($id,$ref) ; // Test $result to check the database read is ok&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3. Get a list of all tabs to show for your object type&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use function XXX_prepare_head($obj), where XXX is name of object. This will return an array with all definition of tab entries to show. The parameter to put into this method is the instance of an object you want tabs.&lt;br /&gt;
&lt;br /&gt;
The resulting array has the following structure&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$head        // Array of tabs&lt;br /&gt;
$head[$h]    // Element to describe one tab.&lt;br /&gt;
$head[$h][0] // Url of page to show when you click on tab&lt;br /&gt;
$head[$h][1] // Title of tab&lt;br /&gt;
$head[$h][2] // Code name to identify the tab&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example :&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$head = product_prepare_head($product, $user) ; // parameter $user is present for some function anly&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4. show tabs into your page&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use function dol_fiche_head() to show all tabs defined into array $head returned by XX_prepare_head().&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
dol_fiche_head($links, $active=&#039;0&#039;, $title=&#039;&#039;, $notab=0, $picto=&#039;&#039;)&lt;br /&gt;
//$links  // Tableau des onglets, appelé $head plus haut.&lt;br /&gt;
//$active // Onglet actif (mettre le nom de l&#039;onglet défini dans votre fichier de module, ou un nom contenu dans $head[$h][2]). Cet onglet sera mis en surbrillance&lt;br /&gt;
//$title  // Title to show (shown into a special tab that you can&#039;t click)&lt;br /&gt;
//$notab&lt;br /&gt;
//$picto  // Name of image to show into title. Possible values are:&lt;br /&gt;
//            product&lt;br /&gt;
//            service&lt;br /&gt;
//            company&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function will show required tabs and open an html element &#039;&#039;&amp;lt; div class=&amp;quot;&amp;quot; &amp;gt;&#039;&#039; that correspond to the area under the tabs. To close area of a tab, just use &#039;&#039;&amp;lt; /div &amp;gt;&#039;&#039; into your PHP page.&lt;br /&gt;
&lt;br /&gt;
==Create or modify PHP screens (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If the purpose of your module is to add features that require new or modified screens.&lt;br /&gt;
&lt;br /&gt;
===Create a new PHP screen===&lt;br /&gt;
You must then create your PHP pages that will show/edit data from tables using the skeleton templates provided as an example in the directory &#039;&#039;&#039;modulebuilder/myobject_page.php&#039;&#039;&#039; (For the development of a script from the command line, see [[Script development]]).&lt;br /&gt;
&lt;br /&gt;
To create a new user screen, create a subdirectory of &#039;&#039;&#039;htdocs&#039;&#039;&#039; (if not already done) for your module (in &#039;&#039;&#039;htdocs/mymodule&#039;&#039;&#039; for example) to store the pages you will create.&lt;br /&gt;
&lt;br /&gt;
Copy, into that directory, the file &#039;&#039;&#039;myobject_page.php&#039;&#039;&#039; that will serve as a starting point for your page file.&lt;br /&gt;
Edit the file to have a correct relative path to the main.inc.php file. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
// Load Dolibarr environment&lt;br /&gt;
$res=0;&lt;br /&gt;
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; ! empty($_SERVER[&amp;quot;CONTEXT_DOCUMENT_ROOT&amp;quot;])) $res=@include($_SERVER[&amp;quot;CONTEXT_DOCUMENT_ROOT&amp;quot;].&amp;quot;/main.inc.php&amp;quot;);&lt;br /&gt;
// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME&lt;br /&gt;
$tmp=empty($_SERVER[&#039;SCRIPT_FILENAME&#039;])?&#039;&#039;:$_SERVER[&#039;SCRIPT_FILENAME&#039;];$tmp2=realpath(__FILE__); $i=strlen($tmp)-1; $j=strlen($tmp2)-1;&lt;br /&gt;
while($i &amp;gt; 0 &amp;amp;&amp;amp; $j &amp;gt; 0 &amp;amp;&amp;amp; isset($tmp[$i]) &amp;amp;&amp;amp; isset($tmp2[$j]) &amp;amp;&amp;amp; $tmp[$i]==$tmp2[$j]) { $i--; $j--; }&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; $i &amp;gt; 0 &amp;amp;&amp;amp; file_exists(substr($tmp, 0, ($i+1)).&amp;quot;/main.inc.php&amp;quot;)) $res=@include(substr($tmp, 0, ($i+1)).&amp;quot;/main.inc.php&amp;quot;);&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; $i &amp;gt; 0 &amp;amp;&amp;amp; file_exists(dirname(substr($tmp, 0, ($i+1))).&amp;quot;/main.inc.php&amp;quot;)) $res=@include(dirname(substr($tmp, 0, ($i+1))).&amp;quot;/main.inc.php&amp;quot;);&lt;br /&gt;
// Try main.inc.php using relative path&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; file_exists(&amp;quot;../main.inc.php&amp;quot;)) $res=@include(&amp;quot;../main.inc.php&amp;quot;);&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; file_exists(&amp;quot;../../main.inc.php&amp;quot;)) $res=@include(&amp;quot;../../main.inc.php&amp;quot;);&lt;br /&gt;
if (! $res &amp;amp;&amp;amp; file_exists(&amp;quot;../../../main.inc.php&amp;quot;)) $res=@include(&amp;quot;../../../main.inc.php&amp;quot;);&lt;br /&gt;
if (! $res) die(&amp;quot;Include of main fails&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
As you can see, there are several tries to load the main.inc.php (or master.inc.php). The goal is to succeed in the most cases as possible. The minimum is 2 lines: one to try to load the master/main.inc.php into the dolibarr root directory and another one to try to load the file to support the case when the module is deployed into the &amp;quot;custom&amp;quot; directory. But you can have more to deal more situation. The provided example should be able to load the file main/master.inc.php in nearly all situation/setups.&lt;br /&gt;
&lt;br /&gt;
Note that you may add more &amp;quot;../&amp;quot; depending on the depth of the file relative to your module directory tree.&lt;br /&gt;
&lt;br /&gt;
It&#039;s in the main.inc.php file that is loaded technical environment variables and permissions. The following variables are objects positioned in this file:&lt;br /&gt;
&lt;br /&gt;
*$user    Object that contains the characteristics of the user + his permissions.&lt;br /&gt;
*$conf    Object that contains Dolibarr configuration.&lt;br /&gt;
*$db      Object that contains an opened connection handler to the database.&lt;br /&gt;
*$langs   Object that contains the user&#039;s language.&lt;br /&gt;
&lt;br /&gt;
Then enter your code to display the page.&lt;br /&gt;
&lt;br /&gt;
*To include a class or library dedicated to the module is done using a Dolibarr function (and not using directly include_once):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example :&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
dol_include_once(&#039;/mymodule/class/myclass.class.php&#039;, &#039;MyClass&#039;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*To include classes provided with Dolibarr, use the following syntax:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example :&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
require_once DOL_DOCUMENT_ROOT.&#039;/core/class/doli.class.php&#039;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add some fields into existing forms===&lt;br /&gt;
You may want to provide a module that adds more fields into forms (input and view) of some elements. &lt;br /&gt;
&lt;br /&gt;
A heavy solution (but not so bad) may be to replace all pages used to create element (this means to disable the &amp;quot;New element&amp;quot; menu entry and adding yours, and disable tab that shows element to replace with a tab that is your own full page (copied/pasted from original) to do same than original page but modified to add your fields and stored added data into your own table). Go to menu [[#Define your entries in the menu (optional)]] and [[#The tab management (optional)]] if this solution suits you (this solution is more powerful since you can change everything you want into the page). &lt;br /&gt;
&lt;br /&gt;
We will describe here another solution, that works only to &amp;quot;add fields&amp;quot; at end of existing fields, using the element &amp;quot;category&amp;quot; as an example but you can convert this tutorial for invoice, proposal ...&lt;br /&gt;
&lt;br /&gt;
*First thing is to add a table, owned by your module, to store the value of new fields. This table will have only one column called &amp;quot;rowid&amp;quot; (will contain the same value than field rowid of element table) + one column for each new field you want to add. Then create a class with CRUD (Create/Read/Update/Delete) methods for this new table. For this two tasks, go back to previous chapter [[#Create your SQL tables and the PHP DAO class]].&lt;br /&gt;
*Next step is to add a hook into your module to add the new fields into the form. See chapter [[Hooks_system#Implement_the_Hook]] for generic documentation to use hooks.&lt;br /&gt;
&lt;br /&gt;
If you follow this tutorial, to be able to add fields into category forms, you must do:&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
&lt;br /&gt;
===Add/replace part of fields supported by hooks===&lt;br /&gt;
See chapter [[Hooks_system#Implement_the_Hook]] to know how to use Dolibarr existing hooks to add/replace code at Dolibarr hooks place.&lt;br /&gt;
&lt;br /&gt;
===Database access===&lt;br /&gt;
If you need to edit some data in the database inside your own table, use the PHP class generated before.&lt;br /&gt;
&lt;br /&gt;
If you to make access to tables with no dedicated PHP class available, this is always possible (for example if you want to get a list of records with a particular join or filter). In this case, this is a code samples to follow:&lt;br /&gt;
&lt;br /&gt;
To make an insert, update or delete:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$db-&amp;gt;begin();   // Start transaction&lt;br /&gt;
$db-&amp;gt;query(&amp;quot;My SQL request insert, update or delete&amp;quot;);&lt;br /&gt;
$db-&amp;gt;commit();       // Validate transaction&lt;br /&gt;
or $db-&amp;gt;rollback()  // Cancel transaction&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To read:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$resql=$db-&amp;gt;query(&amp;quot;My select request&amp;quot;);&lt;br /&gt;
if ($resql)&lt;br /&gt;
{&lt;br /&gt;
	$num = $db-&amp;gt;num_rows($resql);&lt;br /&gt;
	$i = 0;&lt;br /&gt;
	if ($num)&lt;br /&gt;
	{&lt;br /&gt;
		while ($i &amp;lt; $num)&lt;br /&gt;
		{&lt;br /&gt;
			$obj = $db-&amp;gt;fetch_object($resql);&lt;br /&gt;
			if ($obj)&lt;br /&gt;
			{&lt;br /&gt;
				// You can use here results&lt;br /&gt;
				print $obj-&amp;gt;field1;&lt;br /&gt;
				print $obj-&amp;gt;field2;&lt;br /&gt;
			}&lt;br /&gt;
			$i++;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Define style of your pages===&lt;br /&gt;
To have the look of your own pages to match the Dolibarr theme, it is necessary to use the Dolibarr CSS styles.&lt;br /&gt;
&lt;br /&gt;
You can use for example:&lt;br /&gt;
&lt;br /&gt;
*class=&amp;quot;&#039;&#039;&#039;liste_titre&#039;&#039;&#039;&amp;quot; on tags &#039;&#039;tr&#039;&#039; and &#039;&#039;td&#039;&#039; for the head row of a table.&lt;br /&gt;
*class=&amp;quot;&#039;&#039;&#039;pair&#039;&#039;&#039;&amp;quot; or class=&amp;quot;&#039;&#039;&#039;impair&#039;&#039;&#039;&amp;quot; on tags &#039;&#039;tr&#039;&#039; and &#039;&#039;td&#039;&#039; of other rows of a table.&lt;br /&gt;
*class=&amp;quot;&#039;&#039;&#039;flat&#039;&#039;&#039;&amp;quot; on all input fields (&#039;&#039;input, select, textarea&#039;&#039;...).&lt;br /&gt;
*class=&amp;quot;&#039;&#039;&#039;button&#039;&#039;&#039;&amp;quot; on HTML fields with type &#039;&#039;input type=&amp;quot;submit&amp;quot;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Use the Dolibarr date picker===&lt;br /&gt;
If you want to use the Dolibarr date selector (with its calendar popup) into your pages, use the following line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
 $form=new Form($db);&lt;br /&gt;
 $form-&amp;gt;select_date(&#039;&#039;,&#039;mykey&#039;,0,0,0,&amp;quot;myform&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The string mykey will identify the date selector in the form. You must use different values if you use several date selectors in same page.&lt;br /&gt;
The string myform is the name of the FORM in which the selector is included (value found in the form name=&amp;quot;myform&amp;quot; in HTML page).&lt;br /&gt;
This means a date selector must be included necessarily into an html FORM.&lt;br /&gt;
&lt;br /&gt;
To get value after the POST of your form, the command is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$mydate = dol_mktime(12, 0 , 0, $GETPOST(&#039;mykeymonth&#039;, &#039;int&#039;), GETPOST(&#039;mykeyday&#039;, &#039;int&#039;), GETPOST(&#039;mykeyyear&#039;, &#039;int&#039;));&lt;br /&gt;
print strftime(&#039;%A %d %B %Y&#039;, $mydate);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Overwrite template file (tpl)===&lt;br /&gt;
If you want to overwrite tpl file on your module, you need to declare it on the module_parts :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
&#039;tpl&#039; =&amp;gt; 1,&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then you can put any tpl file on &#039;&#039;&#039;mymodule/core/tpl&#039;&#039;&#039;&lt;br /&gt;
as soon as the module is activate, the tpl will be overwrited&lt;br /&gt;
&lt;br /&gt;
==Add your own setup page (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If your module needs parameters, which are to be provided by the user, for proper setting up of the module.&lt;br /&gt;
&lt;br /&gt;
===Create your page to edit parameters===&lt;br /&gt;
If your module needs several parameters to be setup, you must create a page to edit options (these options will be saved in the [[Table llx_const|table &#039;&#039;&#039;llx_const&#039;&#039;&#039;]]).&lt;br /&gt;
Create a page named &#039;&#039;&#039;mymodule_setuppage.php&#039;&#039;&#039; that shows a form for possible options to update them into the above-mentioned table.&lt;br /&gt;
It is necessary to take an example from a page of the directory &#039;&#039;&#039;/admin&#039;&#039;&#039; that will show you the way to read/save your parameters.&lt;br /&gt;
Put this PHP page into the directory &#039;&#039;&#039;/admin&#039;&#039;&#039; of your module (e.g. mymodule/admin/mymodule_setuppage.php).&lt;br /&gt;
&lt;br /&gt;
===Modify the descriptor file of your module===&lt;br /&gt;
Then, within the descriptor file of your module, modify the variable &#039;&#039;&#039;config_page_url&#039;&#039;&#039; to set the name of this PHP page.&lt;br /&gt;
If the page is in the directory &#039;&#039;&#039;admin/&#039;&#039;&#039;, then the path is not required, e.g. like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;config_page_url = array(&amp;quot;mymodule_setuppage.php&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If the page is in the directory &#039;&#039;&#039;mymodule/admin/&#039;&#039;&#039;, then like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;config_page_url = array(&amp;quot;mymodule_setuppage.php@mymodule&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test your page===&lt;br /&gt;
Go into page &#039;&#039;&#039;Home-&amp;gt;Setup-&amp;gt;Modules&#039;&#039;&#039;, you should see a picture at the end of the line of your module to reach your setup page. Click on it, you should be able to view/edit parameters from your page.&lt;br /&gt;
&lt;br /&gt;
==Define your entries in menu (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If you have created PHP pages, it is necessary that those pages can be reached from menu entries in Dolibarr menu.&lt;br /&gt;
&lt;br /&gt;
===Define your menu entries===&lt;br /&gt;
For this, you must define into the module descriptor, the array this-&amp;gt;menu that declares all menus added by your module.&lt;br /&gt;
This array contains entries that will appear once your module is activated.&lt;br /&gt;
The example module descriptor file &#039;&#039;&#039;modMyModule.class.php&#039;&#039;&#039; contains an example to declare a top menu and also its left menu entries.&lt;br /&gt;
&lt;br /&gt;
This is the example of code to declare your own menu entries in a module descriptor file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
// Main menu entries&lt;br /&gt;
$this-&amp;gt;menu = array();			// List of menus to add&lt;br /&gt;
$r=0;&lt;br /&gt;
&lt;br /&gt;
// Add here entries to declare new menus&lt;br /&gt;
// Example to declare the Top Menu entry:&lt;br /&gt;
$this-&amp;gt;menu[$r]=array(	&#039;fk_menu&#039;=&amp;gt;0,			// Put 0 if this is a top menu&lt;br /&gt;
			&#039;type&#039;=&amp;gt;&#039;top&#039;,			// This is a Top menu entry&lt;br /&gt;
			&#039;titre&#039;=&amp;gt;&#039;MyModule top menu&#039;,&lt;br /&gt;
			&#039;mainmenu&#039;=&amp;gt;&#039;mymodule&#039;,&lt;br /&gt;
			&#039;leftmenu&#039;=&amp;gt;&#039;mymodule&#039;,&lt;br /&gt;
			&#039;url&#039;=&amp;gt;&#039;/mymodule/pagetop.php&#039;,&lt;br /&gt;
			&#039;langs&#039;=&amp;gt;&#039;mylangfile&#039;,	// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.&lt;br /&gt;
			&#039;position&#039;=&amp;gt;100,&lt;br /&gt;
			&#039;enabled&#039;=&amp;gt;&#039;1&#039;,			// Define condition to show or hide menu entry. Use &#039;$conf-&amp;gt;mymodule-&amp;gt;enabled&#039; if entry must be visible if module is enabled.&lt;br /&gt;
			&#039;perms&#039;=&amp;gt;&#039;1&#039;,			// Use &#039;perms&#039;=&amp;gt;&#039;$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;level1-&amp;gt;level2&#039; if you want your menu with a permission rules&lt;br /&gt;
			&#039;target&#039;=&amp;gt;&#039;&#039;,&lt;br /&gt;
			&#039;user&#039;=&amp;gt;2);				// 0=Menu for internal users, 1=external users, 2=both&lt;br /&gt;
$r++;&lt;br /&gt;
&lt;br /&gt;
// Example to declare a Left Menu entry:&lt;br /&gt;
$this-&amp;gt;menu[$r]=array(	&#039;fk_menu&#039;=&amp;gt;&#039;fk_mainmenu=xxx&#039;,		    // Use &#039;fk_mainmenu=xxx&#039; or &#039;fk_mainmenu=xxx,fk_leftmenu=yyy&#039; where xxx is mainmenucode and yyy is a leftmenucode of parent menu&lt;br /&gt;
			&#039;type&#039;=&amp;gt;&#039;left&#039;,			        // This is a Left menu entry&lt;br /&gt;
			&#039;titre&#039;=&amp;gt;&#039;MyModule left menu 1&#039;,&lt;br /&gt;
			&#039;mainmenu&#039;=&amp;gt;&#039;xxx&#039;,&lt;br /&gt;
			&#039;leftmenu&#039;=&amp;gt;&#039;yyy&#039;,&lt;br /&gt;
			&#039;url&#039;=&amp;gt;&#039;/mymodule/pagelevel1.php&#039;,&lt;br /&gt;
			&#039;langs&#039;=&amp;gt;&#039;mylangfile&#039;,	// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.&lt;br /&gt;
			&#039;position&#039;=&amp;gt;100,&lt;br /&gt;
			&#039;enabled&#039;=&amp;gt;&#039;1&#039;,			// Define condition to show or hide menu entry. Use &#039;$conf-&amp;gt;mymodule-&amp;gt;enabled&#039; if entry must be visible if module is enabled.&lt;br /&gt;
			&#039;perms&#039;=&amp;gt;&#039;1&#039;,			// Use &#039;perms&#039;=&amp;gt;&#039;$user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;level1-&amp;gt;level2&#039; if you want your menu with a permission rules&lt;br /&gt;
			&#039;target&#039;=&amp;gt;&#039;&#039;,&lt;br /&gt;
			&#039;user&#039;=&amp;gt;2);				// 0=Menu for internal users,1=external users, 2=both&lt;br /&gt;
$r++;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To show the menu or not depending on a permission, modify property &#039;&#039;&#039;perms&#039;&#039;&#039; in the array. See chapter on permissions later to see how to add permissions.&lt;br /&gt;
&lt;br /&gt;
===Test your menu entries===&lt;br /&gt;
Disable and re-enable your module under the Dolibarr module setup page, menus entries must appear (if property &#039;enabled&#039; is declaration array is ok).&lt;br /&gt;
&lt;br /&gt;
==Add your own permissions (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If you want to add new permissions.&lt;br /&gt;
&lt;br /&gt;
The way to define permissions that will manage your module is done inside the module descriptor created previously.&lt;br /&gt;
Modify line &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;rights_class = &#039;mymodule&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
with correct value for mymodule.&lt;br /&gt;
&lt;br /&gt;
Then you must fill the array $this-&amp;gt;rights with as many entries than different permissions you need to manage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;rights[$r][0] = 10001;&lt;br /&gt;
$this-&amp;gt;rights[$r][1] = &#039;Label by default of permission&#039;;&lt;br /&gt;
$this-&amp;gt;rights[$r][2] = &#039;r&#039;;&lt;br /&gt;
$this-&amp;gt;rights[$r][3] = 1;&lt;br /&gt;
$this-&amp;gt;rights[$r][4] = &#039;action&#039;;&lt;br /&gt;
$this-&amp;gt;rights[$r][5] = &#039;subaction&#039;;&lt;br /&gt;
$r++;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Into $this-&amp;gt;rights[$r][0], put a permission id not already used (See into menu &#039;&#039;&#039;System info&#039;&#039;&#039; on a working installation of Dolibarr to know list of id already used by standard modules.&lt;br /&gt;
Into $this-&amp;gt;rights[$r][1], put a label by default for permission (This label will be used if no translation can be found into the file &#039;&#039;&#039;admin.lang&#039;&#039;&#039; Translation key should be &amp;quot;Permission10001=My permission Label&amp;quot;).&lt;br /&gt;
Into $this-&amp;gt;rights[$r][2], types of the permission. There are three type of permission, &#039;r&#039; for read, list or expert permission, &#039;w&#039; for write or update permission and &#039;d&#039; for delete permission.&lt;br /&gt;
Into $this-&amp;gt;rights[$r][3], put 1 if this permission must be granted automatically by default to any newly created user.&lt;br /&gt;
Into $this-&amp;gt;rights[$r][4] and $this-&amp;gt;rights[$r][5], put an action and subaction string without spaces. You will be able to test if a user has the permission in your PHP source code with the sequence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
if ($user-&amp;gt;rights-&amp;gt;mymodule-&amp;gt;action-&amp;gt;subaction) ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Define your own box (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If your module needs to provide one or several new boxes to show on home page.&lt;br /&gt;
&lt;br /&gt;
===Define your box===&lt;br /&gt;
For this, modify the array $this-&amp;gt;boxes into the module descriptor file.&lt;br /&gt;
All you have to do is to add 2 lines for each box file you will create into directory &#039;&#039;&#039;htdocs/mymodule/core/boxes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;boxes[0][&#039;file&#039;]=&#039;mybox0.php@mymodule&#039;&lt;br /&gt;
$this-&amp;gt;boxes[0][&#039;note&#039;]=&#039;My box 0&#039;&lt;br /&gt;
 ...&lt;br /&gt;
$this-&amp;gt;boxes[n][&#039;file&#039;]=&#039;myboxn.php@mymodule&#039;&lt;br /&gt;
$this-&amp;gt;boxes[n][&#039;note&#039;]=&#039;My box n&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then create files &#039;&#039;&#039;htdocs/mymodule/core/boxes/mybox0.php&#039;&#039;&#039;, &#039;&#039;&#039;htdocs/mymodule/core/boxes/mybox1.php&#039;&#039;&#039;... by copying an example from an existing box file (found into directory &#039;&#039;&#039;htdocs/core/boxes&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
===Test if your box is detected by Dolibarr===&lt;br /&gt;
Disable and enabled module.&lt;br /&gt;
&lt;br /&gt;
Go into menu &#039;&#039;&#039;Home - Setup - Boxes&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Your boxes must appear in the list of boxes you can activate. Activate the box and go on the home page to see if the box is showing correctly.&lt;br /&gt;
&lt;br /&gt;
==Define your own export (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If your module provides new predefined database export profiles (for its own tables or for already existing tables of another module).&lt;br /&gt;
&lt;br /&gt;
===Define export===&lt;br /&gt;
For this uncomment and modify arrays $this-&amp;gt;export_xxx in your module descriptor file.&lt;br /&gt;
&lt;br /&gt;
===Test your export===&lt;br /&gt;
Go into menu Tools -&amp;gt; Export. Your export will appear in the list of available predefined exports (if your module is enabled).&lt;br /&gt;
Choose it, you must see a list of all possible fields defined in the export arrays.&lt;br /&gt;
Choose on field and try to build an export file. If ok, try again with all fields.&lt;br /&gt;
&lt;br /&gt;
==Define your CSS styles (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If in your PHP pages, you use class styles that are not defined inside Dolibarr themes CSS (not recommanded).&lt;br /&gt;
&lt;br /&gt;
===Create and declare your style sheet===&lt;br /&gt;
Create a style sheet CSS named &#039;&#039;&#039;mymodule.css&#039;&#039;&#039; or &#039;&#039;&#039;mymodule.css.php&#039;&#039;&#039; and put it into directory &#039;&#039;&#039;htdocs/mymodule&#039;&#039;&#039;. You can have several CSS files per module.&lt;br /&gt;
Remember it&#039;s better to use existing styles already available by default into Dolibarr (The CSS file used by Dolibarr is file &#039;&#039;&#039;themes/mytheme/&#039;&#039;themename&#039;&#039;.css.php&#039;&#039;&#039;. Create your own CSS files only if you need absolutely to add not already existing styles.&lt;br /&gt;
&lt;br /&gt;
Once your style sheets are ready, declare them into your module descriptor file by modifying the property &#039;&#039;&#039;$this-&amp;gt;modules_parts&#039;&#039;&#039;.&lt;br /&gt;
Value to put here must be an array of relative URLs to your CSS files.&lt;br /&gt;
For example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;module_parts = array(&#039;css&#039; =&amp;gt; array(&#039;/mymodule/css/mymodule.css.php&#039;,&#039;/mymodule/css/myother.css&#039;));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Test your style sheet===&lt;br /&gt;
Disable and enable your module.&lt;br /&gt;
&lt;br /&gt;
Go on the home page (index.php). Show the HTML source of the page.&lt;br /&gt;
&lt;br /&gt;
You should see into the HTML header, a line that declares your style sheet.&lt;br /&gt;
&lt;br /&gt;
==Add your Javascript functions (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If in your PHP pages, you use javascript functions not available in Dolibarr (in file lib_head.js)&lt;br /&gt;
&lt;br /&gt;
If you need to use your own javascript functions inside your PHP pages, it is necessary to have your functions, defined into your javascript file &#039;&#039;&#039;htdocs/mymodule/js/mymodule.js&#039;&#039;&#039;, included into the HTML HEAD section.&lt;br /&gt;
To ask Dolibarr that forge this header to include your own javascript file, you must just provide it to the llxHeader() function called by your page.&lt;br /&gt;
&lt;br /&gt;
Example for page /htdocs/mymodule/mypage.php :&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$morejs=array(&amp;quot;/mymodule/js/mymodule.js&amp;quot;);&lt;br /&gt;
llxHeader(&#039;&#039;,&#039;Titre&#039;,&#039;&#039;,&#039;&#039;,&#039;&#039;,&#039;&#039;,$morejs,&#039;&#039;,0,0); &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Run your own code on any Dolibarr event (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: If you want to execute your own code once a common Dolibarr event has occurred (example: I want to update a table in my module when an invoice is created into Dolibarr), you must create a &#039;&#039;&#039;triggers&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
See also [[Interfaces_Dolibarr_toward_foreign_systems]]&lt;br /&gt;
and [[Interfaces_from_foreign_systems_toward_Dolibarr]]&lt;br /&gt;
&lt;br /&gt;
==Insert your code inside Dolibarr hooks positions (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: When you want to add code or replace Dolibarr code into another situation than a business event (See the previous chapter for adding code during a business event).&lt;br /&gt;
&lt;br /&gt;
See page [[Hooks_system]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Add your own numbering rules==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: When you need a new rule for generated ref of elements that are not covered by existing rules.&lt;br /&gt;
&lt;br /&gt;
See page [[Create numbering module]].&lt;br /&gt;
&lt;br /&gt;
==Add your document template (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: When you want to personalized your own generated PDF or ODT documents.&lt;br /&gt;
&lt;br /&gt;
Note: To add this feature you don&#039;t need to create a module descriptor.&lt;br /&gt;
&lt;br /&gt;
Documentation to add your own template is available on page [[Create_a_PDF_document_template]] or [[Create_an_ODT_document_template]].&lt;br /&gt;
&lt;br /&gt;
==Add your skin (optional)==&lt;br /&gt;
&#039;&#039;&#039;When&#039;&#039;&#039;: When you want to personalized your colors/fonts/images.&lt;br /&gt;
&lt;br /&gt;
Note: To add this feature you don&#039;t need to create a module descriptor.&lt;br /&gt;
&lt;br /&gt;
To add your own skin, read page [[Skins]].&lt;br /&gt;
&lt;br /&gt;
=Some coding rules and predefined functions=&lt;br /&gt;
The coding rules to be followed are defined in the [[Developer documentation]], under section &amp;quot;General Information - Language and standards development&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
A lot of predefined features for developers are also available and described into page [[Developer documentation]] under section &amp;quot;Technical components of Dolibarr&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=Create a package to distribute and install your module=&lt;br /&gt;
This process must be used to generate a package to submit it on the http://www.dolistore.com marketplace.&lt;br /&gt;
But you can use it to have a package easy to distribute on your own network.&lt;br /&gt;
&lt;br /&gt;
*Go into the directory &#039;&#039;&#039;/build&#039;&#039;&#039; and copy the file &#039;&#039;&#039;makepack-dolibarrmodules.conf&#039;&#039;&#039; into &#039;&#039;&#039;makepack-mymodule.conf&#039;&#039;&#039;. Warning, this directory may not be provided in some packages of stable versions. If so, it can be retrieved from the snapshot available for download on the Dolibarr website in area &amp;quot;Development version&amp;quot; (taken in this case the whole build directory which is autonomous and independent directory).&lt;br /&gt;
&lt;br /&gt;
Edit this file to add a list of file names for all new files you created for your module (module descriptor, new sql tables files, php page, images, etc...)&lt;br /&gt;
&lt;br /&gt;
*Run the script via Perl (need the Perl version 5.0 or later):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
perl makepack-dolibarrmodule.pl&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The script asks you the name of your module, its major and minor version. A file &#039;&#039;&#039;mymodule.zip &#039;&#039;&#039; will then be manufactured containing your module ready to be deployed.&lt;br /&gt;
&lt;br /&gt;
*The person who receives your module must then place the file in the root directory of a Dolibarr installation and perform the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
tar -xvf mymodule.zip&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If you want your module to be public, you can submit it (the zip file) on Dolibarr marketplace website: {{LinkToPluginDownload}} (you must create an account first and be logged to use the link &amp;quot;Submit a module/product&amp;quot;).&lt;br /&gt;
**If your module was built correctly, the file will be validated later.&lt;br /&gt;
**If quality is enough and license permits it, the code might be added inside main Dolibarr sources (except if you disagree for that).&lt;br /&gt;
&lt;br /&gt;
=Enabling/activation condition of external module on DoliStore=&lt;br /&gt;
&lt;br /&gt;
See [[Module_Dolistore_Validation_Rules|Validation Rules]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:Module_Builder.png&amp;diff=62259</id>
		<title>File:Module Builder.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:Module_Builder.png&amp;diff=62259"/>
		<updated>2025-01-23T22:47:02Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Module Builder&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62258</id>
		<title>Create a PDF document template</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62258"/>
		<updated>2025-01-23T22:02:35Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* For an existing module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Créer_un_modèle_de_document_PDF]]&lt;br /&gt;
[[es:Crear_un_modelo_de_documento_PDF]]&lt;br /&gt;
[[zh:创建PDF模板]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
&lt;br /&gt;
This page describes how to create your own document-generation module (for proposals, invoices, etc...)&lt;br /&gt;
The tutorial uses Commercial Proposals as an example but the same process is used for any type of document.&lt;br /&gt;
&lt;br /&gt;
Building a PDF template requires some PHP knowledge.&lt;br /&gt;
An ODT template does not require PHP knowledge. To build an ODT template, see this page [[Create an ODT document template]]. &lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
&lt;br /&gt;
*Dolibarr: 3.0+&lt;br /&gt;
*Knowledge in PHP development&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Find a document template that is the closest to your requirements=&lt;br /&gt;
You may review the existing templates by going to the module setup area, the Commercial Proposals setup in this case, and then clicking on the &amp;quot;preview&amp;quot; logo.&lt;br /&gt;
Choose one that is the best match to your needs. In this example, we will use the template &amp;quot;azur&amp;quot; that corresponds to the file&lt;br /&gt;
pdf_propale_azur.modules.php&lt;br /&gt;
&lt;br /&gt;
All document models are in &#039;&#039;&#039;htdocs/core/modules&#039;&#039;&#039;, in subdirectories, for example&lt;br /&gt;
propale for commercial proposals&lt;br /&gt;
facture for invoices&lt;br /&gt;
commande for orders, etc... &lt;br /&gt;
and finally &#039;&#039;&#039;doc&#039;&#039;&#039; or &#039;&#039;&#039;pdf&#039;&#039;&#039;.&lt;br /&gt;
For instance, proposal templates will be located in &#039;&#039;&#039;...core/modules/propale/doc/&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The list of recommended PDF Models :&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Module&lt;br /&gt;
!PDF Model name&lt;br /&gt;
!Dolibarr min version&lt;br /&gt;
|-&lt;br /&gt;
|Shipping&lt;br /&gt;
|espadon&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Order&lt;br /&gt;
|eratosthene&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Invoice&lt;br /&gt;
|sponge&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Proposal/Quotation&lt;br /&gt;
|cyan&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Supplier order&lt;br /&gt;
|cornas&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Delivery&lt;br /&gt;
|storm&lt;br /&gt;
|V13&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Create a new template=&lt;br /&gt;
==For an existing module==&lt;br /&gt;
Do not directly modify an existing template. Copy the file of the template used as example into a new name in same directory and edit it to change content.&lt;br /&gt;
For this example, we will call our new template &#039;mycompanyblue&#039;, based on the existing template &#039;cyan&#039;:&lt;br /&gt;
&lt;br /&gt;
*Copy and paste file pdf_cyan.modules.php&lt;br /&gt;
*Rename the copy as pdf_mycompanyblue.modules.php&lt;br /&gt;
*Edit and make the following changes in the code:&lt;br /&gt;
&lt;br /&gt;
#Rename &#039;Class pdf_cyan { &#039; to &#039;Class pdf_mycompanyblue { &#039;&lt;br /&gt;
#Rename constant $this-&amp;gt;name to match your new template name. For example for &#039;cyan&#039; template, change line &#039;$this-&amp;gt;name = &amp;quot;cyan&amp;quot;;&#039; to &#039;$this-&amp;gt;name = &amp;quot;mycompanyblue&amp;quot;;&#039;.&lt;br /&gt;
#Save file. Now the template will be available in the list of models in Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Test this model (see previous section) before going further.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==For a new module==&lt;br /&gt;
Just use the [[Module Builder]] from v12.0 to create your module. When entering the name of a new object to create, you can also check a checkbox to say that you want to manage documents for such new object. In such a case, two templates will be automatically generated (one ODT template and one PDF template).&lt;br /&gt;
&lt;br /&gt;
The templates will be generated with path:&lt;br /&gt;
&lt;br /&gt;
*custom/mymodule/core/modules/doc/pdf_standard_myobject.class.php&lt;br /&gt;
*custom/mymodule/core/modules/doc/doc_generic_myobject_odt.class.php&lt;br /&gt;
&lt;br /&gt;
=Customize content of your new template=&lt;br /&gt;
Customize the new template:&lt;br /&gt;
&lt;br /&gt;
In file pdf_propale_mycompanyblue.modules.php, look for the function &#039;_pagehead()&#039; function. It is the function that manages the display of the header.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;_pagefooter()&#039; function. It is the function that manages the display of the footer.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;write_file()&#039; function. It is the function that manages the display of the body of PDF.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Library for PDF manipulation==&lt;br /&gt;
The library used to create PDF documents in PHP is called TCPDF and can be found in htdocs/includes/tcpdf/tcpdf.class.php (or htdocs/includes/tecnickcom/tcpdf/tcpdf.class.php). This class contains the methods used to generate different parts of documents.&lt;br /&gt;
&lt;br /&gt;
Templates instantiate the FPDF class and use its methods combined with the specific data of the invoice, order etc.&lt;br /&gt;
&lt;br /&gt;
We can generally find the following calls into templates that generate PDF documents:&lt;br /&gt;
&lt;br /&gt;
*$pdf-&amp;gt;SetFont() - &#039;&#039;Define the font to use for the text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetXY() - &#039;&#039;Define position (X,Y) for next text that will be output onto page&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;MultiCell() - &#039;&#039;Draw a box containing text. Used to output any text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;GetY() - &#039;&#039;Return current Y position&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetDrawColor() - &#039;&#039;Set the color to use for new text to write - ie black (0,0,0) or white (255,255,255)&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;Rect() - &#039;&#039;Draw a rectangle whose top left corner coordinates are defined by two first parameters and bottom right corner is defined by two following parameters that are relative values&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Frame of scripts==&lt;br /&gt;
The PHP script used for generating PDF documents had the following methods (taking as example the model &amp;quot;crabe&amp;quot;) inside the class with the model&#039;s name:&lt;br /&gt;
&lt;br /&gt;
*pdf_crabe() - &#039;&#039;Creator of the object pdf&#039;&#039;&lt;br /&gt;
*write_pdf_file() - &#039;&#039;General method for generating the file. This method calls all the following ones after initializing some variables&#039;&#039;&lt;br /&gt;
*_pagehead() - &#039;&#039;Method for drawing the heading of the document, including in general the logo, the title of the document (and the date) as well as the frames of the issuer and the addressee of the document&#039;&#039;&lt;br /&gt;
*_tableau() - &#039;&#039;Method for drawing the details table (products, services,...)&#039;&#039;&lt;br /&gt;
*_tableau_info() - &#039;&#039;Method for drawing the table containing information list present in the bill&#039;&#039;&lt;br /&gt;
*_tableau_tot() - &#039;&#039;Method for drawing table of Totals&#039;&#039;&lt;br /&gt;
*_tableau_versement() - &#039;&#039;Method for drawing table of payment rules&#039;&#039;&lt;br /&gt;
*_pagefoot() - &#039;&#039;Method for drawing bottom of the page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Examples of customization==&lt;br /&gt;
===Insert a logo===&lt;br /&gt;
&lt;br /&gt;
*Add following instructions&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Image(&#039;\www\htdocs\dolibarr\document\societe\logo.jpg&#039;, 10, 5, 60.00);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With this example: 10=abscissa, 5=ordinate, 60=width of logo&lt;br /&gt;
&lt;br /&gt;
*If the logo is on or outside existing text, remove existing text by commenting the code that outputs the text or by changing its position.&lt;br /&gt;
&lt;br /&gt;
===Insert text===&lt;br /&gt;
Most common function to use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;setX(float a); // set current x position&lt;br /&gt;
$pdf-&amp;gt;setY(float b); // set current y position&lt;br /&gt;
$pdf-&amp;gt;setXY(float a,float b); // fixe les positions x et y courantes&lt;br /&gt;
$pdf-&amp;gt;SetTextColor(0,0,200); // fixe la couleur du texte&lt;br /&gt;
$pdf-&amp;gt;SetFont(&#039;Arial&#039;,&#039;B&#039;,14); // fixe la police, le type ( &#039;B&#039; pour gras, &#039;I&#039; pour italique, &#039;&#039; pour normal,...)&lt;br /&gt;
$pdf-&amp;gt;MultiCell(60, 8, &#039;Mon texte&amp;quot;, 0, &#039;L&#039;); // imprime &#039;Mon texte&#039; avec saut de ligne&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: Origin for setXY functions are the top left corner of page.&lt;br /&gt;
&lt;br /&gt;
===Add a PDF Annotation (comment)===&lt;br /&gt;
&#039;&#039;Left side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(102, 202, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Right side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(202, 102, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add Complementary Attribute (extrafiled)===&lt;br /&gt;
A dedicated page give you some advises how to integrate complementary attributes (extrafields) into PDF models of Dolibarr [[Add Extrafields on PDF Models]]&lt;br /&gt;
&lt;br /&gt;
==More information==&lt;br /&gt;
&lt;br /&gt;
*http://www.fpdf.org/?lang=en&lt;br /&gt;
*List of TCPDF&#039;s methods: tcpdf.org/doc/code/classTCPDF.html&lt;br /&gt;
&lt;br /&gt;
=Activate your new model=&lt;br /&gt;
In page Home =&amp;gt; Setup =&amp;gt; Modules =&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*activate your module&lt;br /&gt;
*eventually, set it as the default model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
&lt;br /&gt;
==Q: My PDF template doesn&#039;t understand foreign characters, it outputs them as ???==&lt;br /&gt;
&lt;br /&gt;
This is probably a font problem, the current font used for generating the PDF cannot handle the foreign characters you are trying to print. So just try to use another font.&lt;br /&gt;
&lt;br /&gt;
You will find the fonts used by Dolibarr to print PDF inside your Dolibarr folder.../includes/tecnickcom/tcpdf/fonts/&lt;br /&gt;
&lt;br /&gt;
To change the font used for generating PDF, you need to edit the &#039;main.lang&#039; file of the language you are using (you&#039;ll find the file in your Dolibarr.../langs/en_US/main.lang for instance if you use English)&lt;br /&gt;
&lt;br /&gt;
*Edit the main.lang file&lt;br /&gt;
*Locate the constant FONTFORPDF at the beginning of the file and change the value to FONTFORPDF=dejavusans for instance if you want to use dejavusans. Please note that sometimes FONTFORPDF may be missing, in this case you should add it at the beginning of the file.&lt;br /&gt;
*Save the file and try again to generate your PDF.&lt;br /&gt;
&lt;br /&gt;
If you are unlucky, you can try with more fonts, just go to the TCPDF website sourceforge.net/projects/tcpdf/files/ and download the latest zip package. Then extract only the &#039;fonts&#039; folder from the zip. Then copy the files in your Dolibarr installation .../includes/tecnickcom/tcpdf/fonts/ so you will get more fonts to play with.&lt;br /&gt;
&lt;br /&gt;
Also, please make a backup of your files modification.&lt;br /&gt;
&lt;br /&gt;
Alternative if this doesn&#039;t work: make sure the Translation class is correctly instantiated and loaded with the correct language inside your PDF templates (stored inside the $langs or $outputlangs variable).&lt;br /&gt;
&lt;br /&gt;
Thanks to Humphrey for the tip.&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62257</id>
		<title>Create a PDF document template</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62257"/>
		<updated>2025-01-23T21:50:49Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* Find a document template that is the closest to your requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Créer_un_modèle_de_document_PDF]]&lt;br /&gt;
[[es:Crear_un_modelo_de_documento_PDF]]&lt;br /&gt;
[[zh:创建PDF模板]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
&lt;br /&gt;
This page describes how to create your own document-generation module (for proposals, invoices, etc...)&lt;br /&gt;
The tutorial uses Commercial Proposals as an example but the same process is used for any type of document.&lt;br /&gt;
&lt;br /&gt;
Building a PDF template requires some PHP knowledge.&lt;br /&gt;
An ODT template does not require PHP knowledge. To build an ODT template, see this page [[Create an ODT document template]]. &lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
&lt;br /&gt;
*Dolibarr: 3.0+&lt;br /&gt;
*Knowledge in PHP development&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Find a document template that is the closest to your requirements=&lt;br /&gt;
You may review the existing templates by going to the module setup area, the Commercial Proposals setup in this case, and then clicking on the &amp;quot;preview&amp;quot; logo.&lt;br /&gt;
Choose one that is the best match to your needs. In this example, we will use the template &amp;quot;azur&amp;quot; that corresponds to the file&lt;br /&gt;
pdf_propale_azur.modules.php&lt;br /&gt;
&lt;br /&gt;
All document models are in &#039;&#039;&#039;htdocs/core/modules&#039;&#039;&#039;, in subdirectories, for example&lt;br /&gt;
propale for commercial proposals&lt;br /&gt;
facture for invoices&lt;br /&gt;
commande for orders, etc... &lt;br /&gt;
and finally &#039;&#039;&#039;doc&#039;&#039;&#039; or &#039;&#039;&#039;pdf&#039;&#039;&#039;.&lt;br /&gt;
For instance, proposal templates will be located in &#039;&#039;&#039;...core/modules/propale/doc/&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The list of recommended PDF Models :&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Module&lt;br /&gt;
!PDF Model name&lt;br /&gt;
!Dolibarr min version&lt;br /&gt;
|-&lt;br /&gt;
|Shipping&lt;br /&gt;
|espadon&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Order&lt;br /&gt;
|eratosthene&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Invoice&lt;br /&gt;
|sponge&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Proposal/Quotation&lt;br /&gt;
|cyan&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Supplier order&lt;br /&gt;
|cornas&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Delivery&lt;br /&gt;
|storm&lt;br /&gt;
|V13&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Create a new template=&lt;br /&gt;
==For an existing module==&lt;br /&gt;
Do not directly modify an existing template. Copy the file of the template used as example into a new name in same directory and edit it to change content.&lt;br /&gt;
For this example, we will call our new template &#039;mycompanyblue&#039;, based on the existing template &#039;azur&#039;:&lt;br /&gt;
&lt;br /&gt;
*Copy and paste file pdf_propale_azur.modules.php&lt;br /&gt;
*Rename the copy as pdf_propale_mycompanyblue.modules.php&lt;br /&gt;
*Edit and make the following changes in the code:&lt;br /&gt;
&lt;br /&gt;
#Rename &#039;Class pdf_propale_azur { &#039; to &#039;Class pdf_propale_mycompanyblue { &#039;&lt;br /&gt;
#Rename constant $this-&amp;gt;name to match your new template name. For example for &#039;azur&#039; template, change line &#039;$this-&amp;gt;name = &amp;quot;azur&amp;quot;;&#039; to &#039;$this-&amp;gt;name = &amp;quot;mycompanyblue&amp;quot;;&#039;.&lt;br /&gt;
#Save file. Now the template will be available in the list of models in Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Test this model (see previous section) before going further.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==For a new module==&lt;br /&gt;
Just use the [[Module Builder]] from v12.0 to create your module. When entering the name of a new object to create, you can also check a checkbox to say that you want to manage documents for such new object. In such a case, two templates will be automatically generated (one ODT template and one PDF template).&lt;br /&gt;
&lt;br /&gt;
The templates will be generated with path:&lt;br /&gt;
&lt;br /&gt;
*custom/mymodule/core/modules/doc/pdf_standard_myobject.class.php&lt;br /&gt;
*custom/mymodule/core/modules/doc/doc_generic_myobject_odt.class.php&lt;br /&gt;
&lt;br /&gt;
=Customize content of your new template=&lt;br /&gt;
Customize the new template:&lt;br /&gt;
&lt;br /&gt;
In file pdf_propale_mycompanyblue.modules.php, look for the function &#039;_pagehead()&#039; function. It is the function that manages the display of the header.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;_pagefooter()&#039; function. It is the function that manages the display of the footer.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;write_file()&#039; function. It is the function that manages the display of the body of PDF.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Library for PDF manipulation==&lt;br /&gt;
The library used to create PDF documents in PHP is called TCPDF and can be found in htdocs/includes/tcpdf/tcpdf.class.php (or htdocs/includes/tecnickcom/tcpdf/tcpdf.class.php). This class contains the methods used to generate different parts of documents.&lt;br /&gt;
&lt;br /&gt;
Templates instantiate the FPDF class and use its methods combined with the specific data of the invoice, order etc.&lt;br /&gt;
&lt;br /&gt;
We can generally find the following calls into templates that generate PDF documents:&lt;br /&gt;
&lt;br /&gt;
*$pdf-&amp;gt;SetFont() - &#039;&#039;Define the font to use for the text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetXY() - &#039;&#039;Define position (X,Y) for next text that will be output onto page&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;MultiCell() - &#039;&#039;Draw a box containing text. Used to output any text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;GetY() - &#039;&#039;Return current Y position&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetDrawColor() - &#039;&#039;Set the color to use for new text to write - ie black (0,0,0) or white (255,255,255)&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;Rect() - &#039;&#039;Draw a rectangle whose top left corner coordinates are defined by two first parameters and bottom right corner is defined by two following parameters that are relative values&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Frame of scripts==&lt;br /&gt;
The PHP script used for generating PDF documents had the following methods (taking as example the model &amp;quot;crabe&amp;quot;) inside the class with the model&#039;s name:&lt;br /&gt;
&lt;br /&gt;
*pdf_crabe() - &#039;&#039;Creator of the object pdf&#039;&#039;&lt;br /&gt;
*write_pdf_file() - &#039;&#039;General method for generating the file. This method calls all the following ones after initializing some variables&#039;&#039;&lt;br /&gt;
*_pagehead() - &#039;&#039;Method for drawing the heading of the document, including in general the logo, the title of the document (and the date) as well as the frames of the issuer and the addressee of the document&#039;&#039;&lt;br /&gt;
*_tableau() - &#039;&#039;Method for drawing the details table (products, services,...)&#039;&#039;&lt;br /&gt;
*_tableau_info() - &#039;&#039;Method for drawing the table containing information list present in the bill&#039;&#039;&lt;br /&gt;
*_tableau_tot() - &#039;&#039;Method for drawing table of Totals&#039;&#039;&lt;br /&gt;
*_tableau_versement() - &#039;&#039;Method for drawing table of payment rules&#039;&#039;&lt;br /&gt;
*_pagefoot() - &#039;&#039;Method for drawing bottom of the page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Examples of customization==&lt;br /&gt;
===Insert a logo===&lt;br /&gt;
&lt;br /&gt;
*Add following instructions&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Image(&#039;\www\htdocs\dolibarr\document\societe\logo.jpg&#039;, 10, 5, 60.00);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With this example: 10=abscissa, 5=ordinate, 60=width of logo&lt;br /&gt;
&lt;br /&gt;
*If the logo is on or outside existing text, remove existing text by commenting the code that outputs the text or by changing its position.&lt;br /&gt;
&lt;br /&gt;
===Insert text===&lt;br /&gt;
Most common function to use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;setX(float a); // set current x position&lt;br /&gt;
$pdf-&amp;gt;setY(float b); // set current y position&lt;br /&gt;
$pdf-&amp;gt;setXY(float a,float b); // fixe les positions x et y courantes&lt;br /&gt;
$pdf-&amp;gt;SetTextColor(0,0,200); // fixe la couleur du texte&lt;br /&gt;
$pdf-&amp;gt;SetFont(&#039;Arial&#039;,&#039;B&#039;,14); // fixe la police, le type ( &#039;B&#039; pour gras, &#039;I&#039; pour italique, &#039;&#039; pour normal,...)&lt;br /&gt;
$pdf-&amp;gt;MultiCell(60, 8, &#039;Mon texte&amp;quot;, 0, &#039;L&#039;); // imprime &#039;Mon texte&#039; avec saut de ligne&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: Origin for setXY functions are the top left corner of page.&lt;br /&gt;
&lt;br /&gt;
===Add a PDF Annotation (comment)===&lt;br /&gt;
&#039;&#039;Left side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(102, 202, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Right side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(202, 102, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add Complementary Attribute (extrafiled)===&lt;br /&gt;
A dedicated page give you some advises how to integrate complementary attributes (extrafields) into PDF models of Dolibarr [[Add Extrafields on PDF Models]]&lt;br /&gt;
&lt;br /&gt;
==More information==&lt;br /&gt;
&lt;br /&gt;
*http://www.fpdf.org/?lang=en&lt;br /&gt;
*List of TCPDF&#039;s methods: tcpdf.org/doc/code/classTCPDF.html&lt;br /&gt;
&lt;br /&gt;
=Activate your new model=&lt;br /&gt;
In page Home =&amp;gt; Setup =&amp;gt; Modules =&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*activate your module&lt;br /&gt;
*eventually, set it as the default model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
&lt;br /&gt;
==Q: My PDF template doesn&#039;t understand foreign characters, it outputs them as ???==&lt;br /&gt;
&lt;br /&gt;
This is probably a font problem, the current font used for generating the PDF cannot handle the foreign characters you are trying to print. So just try to use another font.&lt;br /&gt;
&lt;br /&gt;
You will find the fonts used by Dolibarr to print PDF inside your Dolibarr folder.../includes/tecnickcom/tcpdf/fonts/&lt;br /&gt;
&lt;br /&gt;
To change the font used for generating PDF, you need to edit the &#039;main.lang&#039; file of the language you are using (you&#039;ll find the file in your Dolibarr.../langs/en_US/main.lang for instance if you use English)&lt;br /&gt;
&lt;br /&gt;
*Edit the main.lang file&lt;br /&gt;
*Locate the constant FONTFORPDF at the beginning of the file and change the value to FONTFORPDF=dejavusans for instance if you want to use dejavusans. Please note that sometimes FONTFORPDF may be missing, in this case you should add it at the beginning of the file.&lt;br /&gt;
*Save the file and try again to generate your PDF.&lt;br /&gt;
&lt;br /&gt;
If you are unlucky, you can try with more fonts, just go to the TCPDF website sourceforge.net/projects/tcpdf/files/ and download the latest zip package. Then extract only the &#039;fonts&#039; folder from the zip. Then copy the files in your Dolibarr installation .../includes/tecnickcom/tcpdf/fonts/ so you will get more fonts to play with.&lt;br /&gt;
&lt;br /&gt;
Also, please make a backup of your files modification.&lt;br /&gt;
&lt;br /&gt;
Alternative if this doesn&#039;t work: make sure the Translation class is correctly instantiated and loaded with the correct language inside your PDF templates (stored inside the $langs or $outputlangs variable).&lt;br /&gt;
&lt;br /&gt;
Thanks to Humphrey for the tip.&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62256</id>
		<title>Create a PDF document template</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62256"/>
		<updated>2025-01-23T21:50:04Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* Find a document template that is the closest to your requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Créer_un_modèle_de_document_PDF]]&lt;br /&gt;
[[es:Crear_un_modelo_de_documento_PDF]]&lt;br /&gt;
[[zh:创建PDF模板]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
&lt;br /&gt;
This page describes how to create your own document-generation module (for proposals, invoices, etc...)&lt;br /&gt;
The tutorial uses Commercial Proposals as an example but the same process is used for any type of document.&lt;br /&gt;
&lt;br /&gt;
Building a PDF template requires some PHP knowledge.&lt;br /&gt;
An ODT template does not require PHP knowledge. To build an ODT template, see this page [[Create an ODT document template]]. &lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
&lt;br /&gt;
*Dolibarr: 3.0+&lt;br /&gt;
*Knowledge in PHP development&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Find a document template that is the closest to your requirements=&lt;br /&gt;
You may review the existing templates by going to the module setup area, the Commercial Proposals setup in this case, and then clicking on the &amp;quot;preview&amp;quot; logo.&lt;br /&gt;
Choose one that is the best match to your needs. In this example, we will use the template &amp;quot;azur&amp;quot; that corresponds to the file&lt;br /&gt;
pdf_propale_azur.modules.php&lt;br /&gt;
&lt;br /&gt;
All document models are in &#039;&#039;&#039;htdocs/core/modules&#039;&#039;&#039;, in subdirectories, for example&lt;br /&gt;
propale for commercial proposals&lt;br /&gt;
facture for invoices&lt;br /&gt;
commande for orders, etc... &lt;br /&gt;
and finally &#039;&#039;&#039;doc&#039;&#039;&#039; or &#039;&#039;&#039;pdf&#039;&#039;&#039;.&lt;br /&gt;
For instance, proposal templates will be located in &#039;&#039;&#039;...core/modules/propale/doc/&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The list of recommended PDF Models :&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Module&lt;br /&gt;
!PDF Model name&lt;br /&gt;
!Dolibarr min version&lt;br /&gt;
|-&lt;br /&gt;
|Shipping&lt;br /&gt;
|espadon&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Order&lt;br /&gt;
|eratosthene&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Invoice&lt;br /&gt;
|sponge&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Quotation&lt;br /&gt;
|cyan&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Supplier order&lt;br /&gt;
|cornas&lt;br /&gt;
|V12&lt;br /&gt;
|-&lt;br /&gt;
|Delivery&lt;br /&gt;
|storm&lt;br /&gt;
|V13&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Create a new template=&lt;br /&gt;
==For an existing module==&lt;br /&gt;
Do not directly modify an existing template. Copy the file of the template used as example into a new name in same directory and edit it to change content.&lt;br /&gt;
For this example, we will call our new template &#039;mycompanyblue&#039;, based on the existing template &#039;azur&#039;:&lt;br /&gt;
&lt;br /&gt;
*Copy and paste file pdf_propale_azur.modules.php&lt;br /&gt;
*Rename the copy as pdf_propale_mycompanyblue.modules.php&lt;br /&gt;
*Edit and make the following changes in the code:&lt;br /&gt;
&lt;br /&gt;
#Rename &#039;Class pdf_propale_azur { &#039; to &#039;Class pdf_propale_mycompanyblue { &#039;&lt;br /&gt;
#Rename constant $this-&amp;gt;name to match your new template name. For example for &#039;azur&#039; template, change line &#039;$this-&amp;gt;name = &amp;quot;azur&amp;quot;;&#039; to &#039;$this-&amp;gt;name = &amp;quot;mycompanyblue&amp;quot;;&#039;.&lt;br /&gt;
#Save file. Now the template will be available in the list of models in Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Test this model (see previous section) before going further.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==For a new module==&lt;br /&gt;
Just use the [[Module Builder]] from v12.0 to create your module. When entering the name of a new object to create, you can also check a checkbox to say that you want to manage documents for such new object. In such a case, two templates will be automatically generated (one ODT template and one PDF template).&lt;br /&gt;
&lt;br /&gt;
The templates will be generated with path:&lt;br /&gt;
&lt;br /&gt;
*custom/mymodule/core/modules/doc/pdf_standard_myobject.class.php&lt;br /&gt;
*custom/mymodule/core/modules/doc/doc_generic_myobject_odt.class.php&lt;br /&gt;
&lt;br /&gt;
=Customize content of your new template=&lt;br /&gt;
Customize the new template:&lt;br /&gt;
&lt;br /&gt;
In file pdf_propale_mycompanyblue.modules.php, look for the function &#039;_pagehead()&#039; function. It is the function that manages the display of the header.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;_pagefooter()&#039; function. It is the function that manages the display of the footer.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;write_file()&#039; function. It is the function that manages the display of the body of PDF.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Library for PDF manipulation==&lt;br /&gt;
The library used to create PDF documents in PHP is called TCPDF and can be found in htdocs/includes/tcpdf/tcpdf.class.php (or htdocs/includes/tecnickcom/tcpdf/tcpdf.class.php). This class contains the methods used to generate different parts of documents.&lt;br /&gt;
&lt;br /&gt;
Templates instantiate the FPDF class and use its methods combined with the specific data of the invoice, order etc.&lt;br /&gt;
&lt;br /&gt;
We can generally find the following calls into templates that generate PDF documents:&lt;br /&gt;
&lt;br /&gt;
*$pdf-&amp;gt;SetFont() - &#039;&#039;Define the font to use for the text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetXY() - &#039;&#039;Define position (X,Y) for next text that will be output onto page&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;MultiCell() - &#039;&#039;Draw a box containing text. Used to output any text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;GetY() - &#039;&#039;Return current Y position&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetDrawColor() - &#039;&#039;Set the color to use for new text to write - ie black (0,0,0) or white (255,255,255)&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;Rect() - &#039;&#039;Draw a rectangle whose top left corner coordinates are defined by two first parameters and bottom right corner is defined by two following parameters that are relative values&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Frame of scripts==&lt;br /&gt;
The PHP script used for generating PDF documents had the following methods (taking as example the model &amp;quot;crabe&amp;quot;) inside the class with the model&#039;s name:&lt;br /&gt;
&lt;br /&gt;
*pdf_crabe() - &#039;&#039;Creator of the object pdf&#039;&#039;&lt;br /&gt;
*write_pdf_file() - &#039;&#039;General method for generating the file. This method calls all the following ones after initializing some variables&#039;&#039;&lt;br /&gt;
*_pagehead() - &#039;&#039;Method for drawing the heading of the document, including in general the logo, the title of the document (and the date) as well as the frames of the issuer and the addressee of the document&#039;&#039;&lt;br /&gt;
*_tableau() - &#039;&#039;Method for drawing the details table (products, services,...)&#039;&#039;&lt;br /&gt;
*_tableau_info() - &#039;&#039;Method for drawing the table containing information list present in the bill&#039;&#039;&lt;br /&gt;
*_tableau_tot() - &#039;&#039;Method for drawing table of Totals&#039;&#039;&lt;br /&gt;
*_tableau_versement() - &#039;&#039;Method for drawing table of payment rules&#039;&#039;&lt;br /&gt;
*_pagefoot() - &#039;&#039;Method for drawing bottom of the page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Examples of customization==&lt;br /&gt;
===Insert a logo===&lt;br /&gt;
&lt;br /&gt;
*Add following instructions&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Image(&#039;\www\htdocs\dolibarr\document\societe\logo.jpg&#039;, 10, 5, 60.00);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With this example: 10=abscissa, 5=ordinate, 60=width of logo&lt;br /&gt;
&lt;br /&gt;
*If the logo is on or outside existing text, remove existing text by commenting the code that outputs the text or by changing its position.&lt;br /&gt;
&lt;br /&gt;
===Insert text===&lt;br /&gt;
Most common function to use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;setX(float a); // set current x position&lt;br /&gt;
$pdf-&amp;gt;setY(float b); // set current y position&lt;br /&gt;
$pdf-&amp;gt;setXY(float a,float b); // fixe les positions x et y courantes&lt;br /&gt;
$pdf-&amp;gt;SetTextColor(0,0,200); // fixe la couleur du texte&lt;br /&gt;
$pdf-&amp;gt;SetFont(&#039;Arial&#039;,&#039;B&#039;,14); // fixe la police, le type ( &#039;B&#039; pour gras, &#039;I&#039; pour italique, &#039;&#039; pour normal,...)&lt;br /&gt;
$pdf-&amp;gt;MultiCell(60, 8, &#039;Mon texte&amp;quot;, 0, &#039;L&#039;); // imprime &#039;Mon texte&#039; avec saut de ligne&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: Origin for setXY functions are the top left corner of page.&lt;br /&gt;
&lt;br /&gt;
===Add a PDF Annotation (comment)===&lt;br /&gt;
&#039;&#039;Left side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(102, 202, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Right side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(202, 102, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add Complementary Attribute (extrafiled)===&lt;br /&gt;
A dedicated page give you some advises how to integrate complementary attributes (extrafields) into PDF models of Dolibarr [[Add Extrafields on PDF Models]]&lt;br /&gt;
&lt;br /&gt;
==More information==&lt;br /&gt;
&lt;br /&gt;
*http://www.fpdf.org/?lang=en&lt;br /&gt;
*List of TCPDF&#039;s methods: tcpdf.org/doc/code/classTCPDF.html&lt;br /&gt;
&lt;br /&gt;
=Activate your new model=&lt;br /&gt;
In page Home =&amp;gt; Setup =&amp;gt; Modules =&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*activate your module&lt;br /&gt;
*eventually, set it as the default model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
&lt;br /&gt;
==Q: My PDF template doesn&#039;t understand foreign characters, it outputs them as ???==&lt;br /&gt;
&lt;br /&gt;
This is probably a font problem, the current font used for generating the PDF cannot handle the foreign characters you are trying to print. So just try to use another font.&lt;br /&gt;
&lt;br /&gt;
You will find the fonts used by Dolibarr to print PDF inside your Dolibarr folder.../includes/tecnickcom/tcpdf/fonts/&lt;br /&gt;
&lt;br /&gt;
To change the font used for generating PDF, you need to edit the &#039;main.lang&#039; file of the language you are using (you&#039;ll find the file in your Dolibarr.../langs/en_US/main.lang for instance if you use English)&lt;br /&gt;
&lt;br /&gt;
*Edit the main.lang file&lt;br /&gt;
*Locate the constant FONTFORPDF at the beginning of the file and change the value to FONTFORPDF=dejavusans for instance if you want to use dejavusans. Please note that sometimes FONTFORPDF may be missing, in this case you should add it at the beginning of the file.&lt;br /&gt;
*Save the file and try again to generate your PDF.&lt;br /&gt;
&lt;br /&gt;
If you are unlucky, you can try with more fonts, just go to the TCPDF website sourceforge.net/projects/tcpdf/files/ and download the latest zip package. Then extract only the &#039;fonts&#039; folder from the zip. Then copy the files in your Dolibarr installation .../includes/tecnickcom/tcpdf/fonts/ so you will get more fonts to play with.&lt;br /&gt;
&lt;br /&gt;
Also, please make a backup of your files modification.&lt;br /&gt;
&lt;br /&gt;
Alternative if this doesn&#039;t work: make sure the Translation class is correctly instantiated and loaded with the correct language inside your PDF templates (stored inside the $langs or $outputlangs variable).&lt;br /&gt;
&lt;br /&gt;
Thanks to Humphrey for the tip.&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62255</id>
		<title>Create a PDF document template</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62255"/>
		<updated>2025-01-23T21:48:37Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* For an existing module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Créer_un_modèle_de_document_PDF]]&lt;br /&gt;
[[es:Crear_un_modelo_de_documento_PDF]]&lt;br /&gt;
[[zh:创建PDF模板]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
&lt;br /&gt;
This page describes how to create your own document-generation module (for proposals, invoices, etc...)&lt;br /&gt;
The tutorial uses Commercial Proposals as an example but the same process is used for any type of document.&lt;br /&gt;
&lt;br /&gt;
Building a PDF template requires some PHP knowledge.&lt;br /&gt;
An ODT template does not require PHP knowledge. To build an ODT template, see this page [[Create an ODT document template]]. &lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
&lt;br /&gt;
*Dolibarr: 3.0+&lt;br /&gt;
*Knowledge in PHP development&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Find a document template that is the closest to your requirements=&lt;br /&gt;
You may review the existing templates by going to the module setup area, the Commercial Proposals setup in this case, and then clicking on the &amp;quot;preview&amp;quot; logo.&lt;br /&gt;
Choose one that is the best match to your needs. In this example, we will use the template &amp;quot;azur&amp;quot; that corresponds to the file&lt;br /&gt;
pdf_propale_azur.modules.php&lt;br /&gt;
&lt;br /&gt;
All document models are in &#039;&#039;&#039;htdocs/core/modules&#039;&#039;&#039;, in subdirectories, for example&lt;br /&gt;
propale for commercial proposals&lt;br /&gt;
facture for invoices&lt;br /&gt;
commande for orders, etc... &lt;br /&gt;
and finally &#039;&#039;&#039;doc&#039;&#039;&#039; or &#039;&#039;&#039;pdf&#039;&#039;&#039;.&lt;br /&gt;
For instance, proposal templates will be located in &#039;&#039;&#039;...core/modules/propale/doc/&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Create a new template=&lt;br /&gt;
==For an existing module==&lt;br /&gt;
Do not directly modify an existing template. Copy the file of the template used as example into a new name in same directory and edit it to change content.&lt;br /&gt;
For this example, we will call our new template &#039;mycompanyblue&#039;, based on the existing template &#039;azur&#039;:&lt;br /&gt;
&lt;br /&gt;
*Copy and paste file pdf_propale_azur.modules.php&lt;br /&gt;
*Rename the copy as pdf_propale_mycompanyblue.modules.php&lt;br /&gt;
*Edit and make the following changes in the code:&lt;br /&gt;
&lt;br /&gt;
#Rename &#039;Class pdf_propale_azur { &#039; to &#039;Class pdf_propale_mycompanyblue { &#039;&lt;br /&gt;
#Rename constant $this-&amp;gt;name to match your new template name. For example for &#039;azur&#039; template, change line &#039;$this-&amp;gt;name = &amp;quot;azur&amp;quot;;&#039; to &#039;$this-&amp;gt;name = &amp;quot;mycompanyblue&amp;quot;;&#039;.&lt;br /&gt;
#Save file. Now the template will be available in the list of models in Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Test this model (see previous section) before going further.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==For a new module==&lt;br /&gt;
Just use the [[Module Builder]] from v12.0 to create your module. When entering the name of a new object to create, you can also check a checkbox to say that you want to manage documents for such new object. In such a case, two templates will be automatically generated (one ODT template and one PDF template).&lt;br /&gt;
&lt;br /&gt;
The templates will be generated with path:&lt;br /&gt;
&lt;br /&gt;
*custom/mymodule/core/modules/doc/pdf_standard_myobject.class.php&lt;br /&gt;
*custom/mymodule/core/modules/doc/doc_generic_myobject_odt.class.php&lt;br /&gt;
&lt;br /&gt;
=Customize content of your new template=&lt;br /&gt;
Customize the new template:&lt;br /&gt;
&lt;br /&gt;
In file pdf_propale_mycompanyblue.modules.php, look for the function &#039;_pagehead()&#039; function. It is the function that manages the display of the header.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;_pagefooter()&#039; function. It is the function that manages the display of the footer.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;write_file()&#039; function. It is the function that manages the display of the body of PDF.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Library for PDF manipulation==&lt;br /&gt;
The library used to create PDF documents in PHP is called TCPDF and can be found in htdocs/includes/tcpdf/tcpdf.class.php (or htdocs/includes/tecnickcom/tcpdf/tcpdf.class.php). This class contains the methods used to generate different parts of documents.&lt;br /&gt;
&lt;br /&gt;
Templates instantiate the FPDF class and use its methods combined with the specific data of the invoice, order etc.&lt;br /&gt;
&lt;br /&gt;
We can generally find the following calls into templates that generate PDF documents:&lt;br /&gt;
&lt;br /&gt;
*$pdf-&amp;gt;SetFont() - &#039;&#039;Define the font to use for the text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetXY() - &#039;&#039;Define position (X,Y) for next text that will be output onto page&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;MultiCell() - &#039;&#039;Draw a box containing text. Used to output any text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;GetY() - &#039;&#039;Return current Y position&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetDrawColor() - &#039;&#039;Set the color to use for new text to write - ie black (0,0,0) or white (255,255,255)&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;Rect() - &#039;&#039;Draw a rectangle whose top left corner coordinates are defined by two first parameters and bottom right corner is defined by two following parameters that are relative values&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Frame of scripts==&lt;br /&gt;
The PHP script used for generating PDF documents had the following methods (taking as example the model &amp;quot;crabe&amp;quot;) inside the class with the model&#039;s name:&lt;br /&gt;
&lt;br /&gt;
*pdf_crabe() - &#039;&#039;Creator of the object pdf&#039;&#039;&lt;br /&gt;
*write_pdf_file() - &#039;&#039;General method for generating the file. This method calls all the following ones after initializing some variables&#039;&#039;&lt;br /&gt;
*_pagehead() - &#039;&#039;Method for drawing the heading of the document, including in general the logo, the title of the document (and the date) as well as the frames of the issuer and the addressee of the document&#039;&#039;&lt;br /&gt;
*_tableau() - &#039;&#039;Method for drawing the details table (products, services,...)&#039;&#039;&lt;br /&gt;
*_tableau_info() - &#039;&#039;Method for drawing the table containing information list present in the bill&#039;&#039;&lt;br /&gt;
*_tableau_tot() - &#039;&#039;Method for drawing table of Totals&#039;&#039;&lt;br /&gt;
*_tableau_versement() - &#039;&#039;Method for drawing table of payment rules&#039;&#039;&lt;br /&gt;
*_pagefoot() - &#039;&#039;Method for drawing bottom of the page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Examples of customization==&lt;br /&gt;
===Insert a logo===&lt;br /&gt;
&lt;br /&gt;
*Add following instructions&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Image(&#039;\www\htdocs\dolibarr\document\societe\logo.jpg&#039;, 10, 5, 60.00);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With this example: 10=abscissa, 5=ordinate, 60=width of logo&lt;br /&gt;
&lt;br /&gt;
*If the logo is on or outside existing text, remove existing text by commenting the code that outputs the text or by changing its position.&lt;br /&gt;
&lt;br /&gt;
===Insert text===&lt;br /&gt;
Most common function to use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;setX(float a); // set current x position&lt;br /&gt;
$pdf-&amp;gt;setY(float b); // set current y position&lt;br /&gt;
$pdf-&amp;gt;setXY(float a,float b); // fixe les positions x et y courantes&lt;br /&gt;
$pdf-&amp;gt;SetTextColor(0,0,200); // fixe la couleur du texte&lt;br /&gt;
$pdf-&amp;gt;SetFont(&#039;Arial&#039;,&#039;B&#039;,14); // fixe la police, le type ( &#039;B&#039; pour gras, &#039;I&#039; pour italique, &#039;&#039; pour normal,...)&lt;br /&gt;
$pdf-&amp;gt;MultiCell(60, 8, &#039;Mon texte&amp;quot;, 0, &#039;L&#039;); // imprime &#039;Mon texte&#039; avec saut de ligne&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: Origin for setXY functions are the top left corner of page.&lt;br /&gt;
&lt;br /&gt;
===Add a PDF Annotation (comment)===&lt;br /&gt;
&#039;&#039;Left side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(102, 202, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Right side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(202, 102, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add Complementary Attribute (extrafiled)===&lt;br /&gt;
A dedicated page give you some advises how to integrate complementary attributes (extrafields) into PDF models of Dolibarr [[Add Extrafields on PDF Models]]&lt;br /&gt;
&lt;br /&gt;
==More information==&lt;br /&gt;
&lt;br /&gt;
*http://www.fpdf.org/?lang=en&lt;br /&gt;
*List of TCPDF&#039;s methods: tcpdf.org/doc/code/classTCPDF.html&lt;br /&gt;
&lt;br /&gt;
=Activate your new model=&lt;br /&gt;
In page Home =&amp;gt; Setup =&amp;gt; Modules =&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*activate your module&lt;br /&gt;
*eventually, set it as the default model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
&lt;br /&gt;
==Q: My PDF template doesn&#039;t understand foreign characters, it outputs them as ???==&lt;br /&gt;
&lt;br /&gt;
This is probably a font problem, the current font used for generating the PDF cannot handle the foreign characters you are trying to print. So just try to use another font.&lt;br /&gt;
&lt;br /&gt;
You will find the fonts used by Dolibarr to print PDF inside your Dolibarr folder.../includes/tecnickcom/tcpdf/fonts/&lt;br /&gt;
&lt;br /&gt;
To change the font used for generating PDF, you need to edit the &#039;main.lang&#039; file of the language you are using (you&#039;ll find the file in your Dolibarr.../langs/en_US/main.lang for instance if you use English)&lt;br /&gt;
&lt;br /&gt;
*Edit the main.lang file&lt;br /&gt;
*Locate the constant FONTFORPDF at the beginning of the file and change the value to FONTFORPDF=dejavusans for instance if you want to use dejavusans. Please note that sometimes FONTFORPDF may be missing, in this case you should add it at the beginning of the file.&lt;br /&gt;
*Save the file and try again to generate your PDF.&lt;br /&gt;
&lt;br /&gt;
If you are unlucky, you can try with more fonts, just go to the TCPDF website sourceforge.net/projects/tcpdf/files/ and download the latest zip package. Then extract only the &#039;fonts&#039; folder from the zip. Then copy the files in your Dolibarr installation .../includes/tecnickcom/tcpdf/fonts/ so you will get more fonts to play with.&lt;br /&gt;
&lt;br /&gt;
Also, please make a backup of your files modification.&lt;br /&gt;
&lt;br /&gt;
Alternative if this doesn&#039;t work: make sure the Translation class is correctly instantiated and loaded with the correct language inside your PDF templates (stored inside the $langs or $outputlangs variable).&lt;br /&gt;
&lt;br /&gt;
Thanks to Humphrey for the tip.&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62254</id>
		<title>Create a PDF document template</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62254"/>
		<updated>2025-01-23T20:36:19Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* For an existing module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Créer_un_modèle_de_document_PDF]]&lt;br /&gt;
[[es:Crear_un_modelo_de_documento_PDF]]&lt;br /&gt;
[[zh:创建PDF模板]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
&lt;br /&gt;
This page describes how to create your own document-generation module (for proposals, invoices, etc...)&lt;br /&gt;
The tutorial uses Commercial Proposals as an example but the same process is used for any type of document.&lt;br /&gt;
&lt;br /&gt;
Building a PDF template requires some PHP knowledge.&lt;br /&gt;
An ODT template does not require PHP knowledge. To build an ODT template, see this page [[Create an ODT document template]]. &lt;br /&gt;
&lt;br /&gt;
=Prerequisite=&lt;br /&gt;
&lt;br /&gt;
*Dolibarr: 3.0+&lt;br /&gt;
*Knowledge in PHP development&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Find a document template that is the closest to your requirements=&lt;br /&gt;
You may review the existing templates by going to the module setup area, the Commercial Proposals setup in this case, and then clicking on the &amp;quot;preview&amp;quot; logo.&lt;br /&gt;
Choose one that is the best match to your needs. In this example, we will use the template &amp;quot;azur&amp;quot; that corresponds to the file&lt;br /&gt;
pdf_propale_azur.modules.php&lt;br /&gt;
&lt;br /&gt;
All document models are in &#039;&#039;&#039;htdocs/core/modules&#039;&#039;&#039;, in subdirectories, for example&lt;br /&gt;
propale for commercial proposals&lt;br /&gt;
facture for invoices&lt;br /&gt;
commandes for orders, etc... &lt;br /&gt;
and finally &#039;&#039;&#039;doc&#039;&#039;&#039; or &#039;&#039;&#039;pdf&#039;&#039;&#039;.&lt;br /&gt;
For instance, proposal templates will be located in &#039;&#039;&#039;...core/modules/propale/doc/&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Create a new template=&lt;br /&gt;
==For an existing module==&lt;br /&gt;
Do not modify an existing template. Copy the file of the template used as example into a new name in same directory than your example and edit it to change content.&lt;br /&gt;
For this example, we will call our new template &#039;mycompanyblue&#039;, based on the existing template &#039;azur&#039;:&lt;br /&gt;
&lt;br /&gt;
*Copy and paste file pdf_propale_azur.modules.php&lt;br /&gt;
*Rename the copy as pdf_propale_mycompanyblue.modules.php&lt;br /&gt;
*Edit and make the following changes in the code:&lt;br /&gt;
&lt;br /&gt;
#Rename &#039;Class pdf_propale_azur { &#039; to &#039;Class pdf_propale_mycompanyblue { &#039;&lt;br /&gt;
#Rename constant $this-&amp;gt;name to match your new template name. For example for &#039;azur&#039; template, change line &#039;$this-&amp;gt;name = &amp;quot;azur&amp;quot;;&#039; to &#039;$this-&amp;gt;name = &amp;quot;mycompanyblue&amp;quot;;&#039;.&lt;br /&gt;
#Save file. Now the template will be available in the list of models in Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Test this model (see previous section) before going further.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==For a new module==&lt;br /&gt;
Just use the [[Module Builder]] from v12.0 to create your module. When entering the name of a new object to create, you can also check a checkbox to say that you want to manage documents for such new object. In such a case, two templates will be automatically generated (one ODT template and one PDF template).&lt;br /&gt;
&lt;br /&gt;
The templates will be generated with path:&lt;br /&gt;
&lt;br /&gt;
*custom/mymodule/core/modules/doc/pdf_standard_myobject.class.php&lt;br /&gt;
*custom/mymodule/core/modules/doc/doc_generic_myobject_odt.class.php&lt;br /&gt;
&lt;br /&gt;
=Customize content of your new template=&lt;br /&gt;
Customize the new template:&lt;br /&gt;
&lt;br /&gt;
In file pdf_propale_mycompanyblue.modules.php, look for the function &#039;_pagehead()&#039; function. It is the function that manages the display of the header.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;_pagefooter()&#039; function. It is the function that manages the display of the footer.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;write_file()&#039; function. It is the function that manages the display of the body of PDF.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Library for PDF manipulation==&lt;br /&gt;
The library used to create PDF documents in PHP is called FPDF and can be found in htdocs/includes/tcpdf/tcpdf.class.php (or htdocs/includes/tecnickcom/tcpdf/tcpdf.class.php). This class contains the methods used to generate different parts of documents.&lt;br /&gt;
&lt;br /&gt;
Templates instantiate the FPDF class and use its methods combined with the specific data of the invoice, order etc.&lt;br /&gt;
&lt;br /&gt;
We can generally find the following calls into templates that generate PDF documents:&lt;br /&gt;
&lt;br /&gt;
*$pdf-&amp;gt;SetFont() - &#039;&#039;Define the font to use for the text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetXY() - &#039;&#039;Define position (X,Y) for next text that will be output onto page&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;MultiCell() - &#039;&#039;Draw a box containing text. Used to output any text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;GetY() - &#039;&#039;Return current Y position&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetDrawColor() - &#039;&#039;Set the color to use for new text to write - ie black (0,0,0) or white (255,255,255)&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;Rect() - &#039;&#039;Draw a rectangle whose top left corner coordinates are defined by two first parameters and bottom right corner is defined by two following parameters that are relative values&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Frame of scripts==&lt;br /&gt;
The PHP script used for generating PDF documents had the following methods (taking as example the model &amp;quot;crabe&amp;quot;) inside the class with the model&#039;s name:&lt;br /&gt;
&lt;br /&gt;
*pdf_crabe() - &#039;&#039;Creator of the object pdf&#039;&#039;&lt;br /&gt;
*write_pdf_file() - &#039;&#039;General method for generating the file. This method calls all the following ones after initializing some variables&#039;&#039;&lt;br /&gt;
*_pagehead() - &#039;&#039;Method for drawing the heading of the document, including in general the logo, the title of the document (and the date) as well as the frames of the issuer and the addressee of the document&#039;&#039;&lt;br /&gt;
*_tableau() - &#039;&#039;Method for drawing the details table (products, services,...)&#039;&#039;&lt;br /&gt;
*_tableau_info() - &#039;&#039;Method for drawing the table containing information list present in the bill&#039;&#039;&lt;br /&gt;
*_tableau_tot() - &#039;&#039;Method for drawing table of Totals&#039;&#039;&lt;br /&gt;
*_tableau_versement() - &#039;&#039;Method for drawing table of payment rules&#039;&#039;&lt;br /&gt;
*_pagefoot() - &#039;&#039;Method for drawing bottom of the page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Examples of customization==&lt;br /&gt;
===Insert a logo===&lt;br /&gt;
&lt;br /&gt;
*Add following instructions&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Image(&#039;\www\htdocs\dolibarr\document\societe\logo.jpg&#039;, 10, 5, 60.00);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With this example: 10=abscissa, 5=ordinate, 60=width of logo&lt;br /&gt;
&lt;br /&gt;
*If the logo is on or outside existing text, remove existing text by commenting the code that outputs the text or by changing its position.&lt;br /&gt;
&lt;br /&gt;
===Insert text===&lt;br /&gt;
Most common function to use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;setX(float a); // set current x position&lt;br /&gt;
$pdf-&amp;gt;setY(float b); // set current y position&lt;br /&gt;
$pdf-&amp;gt;setXY(float a,float b); // fixe les positions x et y courantes&lt;br /&gt;
$pdf-&amp;gt;SetTextColor(0,0,200); // fixe la couleur du texte&lt;br /&gt;
$pdf-&amp;gt;SetFont(&#039;Arial&#039;,&#039;B&#039;,14); // fixe la police, le type ( &#039;B&#039; pour gras, &#039;I&#039; pour italique, &#039;&#039; pour normal,...)&lt;br /&gt;
$pdf-&amp;gt;MultiCell(60, 8, &#039;Mon texte&amp;quot;, 0, &#039;L&#039;); // imprime &#039;Mon texte&#039; avec saut de ligne&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: Origin for setXY functions are the top left corner of page.&lt;br /&gt;
&lt;br /&gt;
===Add a PDF Annotation (comment)===&lt;br /&gt;
&#039;&#039;Left side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(102, 202, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Right side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(202, 102, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add Complementary Attribute (extrafiled)===&lt;br /&gt;
A dedicated page give you some advises how to integrate complementary attributes (extrafields) into PDF models of Dolibarr [[Add Extrafields on PDF Models]]&lt;br /&gt;
&lt;br /&gt;
==More information==&lt;br /&gt;
&lt;br /&gt;
*http://www.fpdf.org/?lang=en&lt;br /&gt;
*List of TCPDF&#039;s methods: tcpdf.org/doc/code/classTCPDF.html&lt;br /&gt;
&lt;br /&gt;
=Activate your new model=&lt;br /&gt;
In page Home =&amp;gt; Setup =&amp;gt; Modules =&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*activate your module&lt;br /&gt;
*eventually, set it as the default model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
&lt;br /&gt;
==Q: My PDF template doesn&#039;t understand foreign characters, it outputs them as ???==&lt;br /&gt;
&lt;br /&gt;
This is probably a font problem, the current font used for generating the PDF cannot handle the foreign characters you are trying to print. So just try to use another font.&lt;br /&gt;
&lt;br /&gt;
You will find the fonts used by Dolibarr to print PDF inside your Dolibarr folder.../includes/tecnickcom/tcpdf/fonts/&lt;br /&gt;
&lt;br /&gt;
To change the font used for generating PDF, you need to edit the &#039;main.lang&#039; file of the language you are using (you&#039;ll find the file in your Dolibarr.../langs/en_US/main.lang for instance if you use English)&lt;br /&gt;
&lt;br /&gt;
*Edit the main.lang file&lt;br /&gt;
*Locate the constant FONTFORPDF at the beginning of the file and change the value to FONTFORPDF=dejavusans for instance if you want to use dejavusans. Please note that sometimes FONTFORPDF may be missing, in this case you should add it at the beginning of the file.&lt;br /&gt;
*Save the file and try again to generate your PDF.&lt;br /&gt;
&lt;br /&gt;
If you are unlucky, you can try with more fonts, just go to the TCPDF website sourceforge.net/projects/tcpdf/files/ and download the latest zip package. Then extract only the &#039;fonts&#039; folder from the zip. Then copy the files in your Dolibarr installation .../includes/tecnickcom/tcpdf/fonts/ so you will get more fonts to play with.&lt;br /&gt;
&lt;br /&gt;
Also, please make a backup of your files modification.&lt;br /&gt;
&lt;br /&gt;
Alternative if this doesn&#039;t work: make sure the Translation class is correctly instantiated and loaded with the correct language inside your PDF templates (stored inside the $langs or $outputlangs variable).&lt;br /&gt;
&lt;br /&gt;
Thanks to Humphrey for the tip.&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62253</id>
		<title>Create a PDF document template</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Create_a_PDF_document_template&amp;diff=62253"/>
		<updated>2025-01-23T20:21:11Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* Find a document template that is the closest to your requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN origin interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- You can edit this section but do NOT remove these comments&lt;br /&gt;
     Links below will be automatically replicated on translated pages by PolyglotBot --&amp;gt;&lt;br /&gt;
[[fr:Créer_un_modèle_de_document_PDF]]&lt;br /&gt;
[[es:Crear_un_modelo_de_documento_PDF]]&lt;br /&gt;
[[zh:创建PDF模板]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
&lt;br /&gt;
This page describes how to create your own document-generation module (for proposals, invoices, etc...)&lt;br /&gt;
The tutorial uses Commercial Proposals as an example but the same process is used for any type of document.&lt;br /&gt;
&lt;br /&gt;
Building a PDF template requires some PHP knowledge.&lt;br /&gt;
An ODT template does not require PHP knowledge. To build an ODT template, see this page [[Create an ODT document template]]. &lt;br /&gt;
&lt;br /&gt;
=Prerequisite=&lt;br /&gt;
&lt;br /&gt;
*Dolibarr: 3.0+&lt;br /&gt;
*Knowledge in PHP development&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Find a document template that is the closest to your requirements=&lt;br /&gt;
You may review the existing templates by going to the module setup area, the Commercial Proposals setup in this case, and then clicking on the &amp;quot;preview&amp;quot; logo.&lt;br /&gt;
Choose one that is the best match to your needs. In this example, we will use the template &amp;quot;azur&amp;quot; that corresponds to the file&lt;br /&gt;
pdf_propale_azur.modules.php&lt;br /&gt;
&lt;br /&gt;
All document models are in &#039;&#039;&#039;htdocs/core/modules&#039;&#039;&#039;, in subdirectories, for example&lt;br /&gt;
propale for commercial proposals&lt;br /&gt;
facture for invoices&lt;br /&gt;
commandes for orders, etc... &lt;br /&gt;
and finally &#039;&#039;&#039;doc&#039;&#039;&#039; or &#039;&#039;&#039;pdf&#039;&#039;&#039;.&lt;br /&gt;
For instance, proposal templates will be located in &#039;&#039;&#039;...core/modules/propale/doc/&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Create a new template=&lt;br /&gt;
==For an existing module==&lt;br /&gt;
Do not modify an existing template. Copy the file of the template used as example into a new name in same directory than your example and edit it to change content.&lt;br /&gt;
For this example, we will call our new template &#039;mycompanyblue&#039;, based on the existing template &#039;azur&#039;:&lt;br /&gt;
&lt;br /&gt;
*Copy and paste file pdf_propale_azur.modules.php&lt;br /&gt;
*Rename the copy as pdf_propale_mycompanyblue.modules.php&lt;br /&gt;
*Edit and make the following changes in the code:&lt;br /&gt;
&lt;br /&gt;
#Rename &#039;Class pdf_propale_azur { &#039; to &#039;Class pdf_propale_mycompanyblue { &#039;&lt;br /&gt;
#Rename constant $this-&amp;gt;name to match your new template name. For example for &#039;azur&#039; template, change line &#039;$this-&amp;gt;name = &amp;quot;azur&amp;quot;;&#039; to &#039;$this-&amp;gt;name = &amp;quot;mycompanyblue&amp;quot;;&#039;.&lt;br /&gt;
#Save file. Now the template will be available in the list of models in Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Test this model (see previous section) before going further.&lt;br /&gt;
&lt;br /&gt;
Add into table &#039;&#039;&#039;llx_document_model&#039;&#039;&#039; the new document template that you have created.&lt;br /&gt;
&lt;br /&gt;
==For a new module==&lt;br /&gt;
Just use the [[Module Builder]] from v12.0 to create your module. When entering the name of a new object to create, you can also check a checkbox to say that you want to manage documents for such new object. In such a case, two templates will be automatically generated (one ODT template and one PDF template).&lt;br /&gt;
&lt;br /&gt;
The templates will be generated with path:&lt;br /&gt;
&lt;br /&gt;
*custom/mymodule/core/modules/doc/pdf_standard_myobject.class.php&lt;br /&gt;
*custom/mymodule/core/modules/doc/doc_generic_myobject_odt.class.php&lt;br /&gt;
&lt;br /&gt;
=Customize content of your new template=&lt;br /&gt;
Customize the new template:&lt;br /&gt;
&lt;br /&gt;
In file pdf_propale_mycompanyblue.modules.php, look for the function &#039;_pagehead()&#039; function. It is the function that manages the display of the header.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;_pagefooter()&#039; function. It is the function that manages the display of the footer.&lt;br /&gt;
&lt;br /&gt;
Look for the &#039;write_file()&#039; function. It is the function that manages the display of the body of PDF.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Library for PDF manipulation==&lt;br /&gt;
The library used to create PDF documents in PHP is called FPDF and can be found in htdocs/includes/tcpdf/tcpdf.class.php (or htdocs/includes/tecnickcom/tcpdf/tcpdf.class.php). This class contains the methods used to generate different parts of documents.&lt;br /&gt;
&lt;br /&gt;
Templates instantiate the FPDF class and use its methods combined with the specific data of the invoice, order etc.&lt;br /&gt;
&lt;br /&gt;
We can generally find the following calls into templates that generate PDF documents:&lt;br /&gt;
&lt;br /&gt;
*$pdf-&amp;gt;SetFont() - &#039;&#039;Define the font to use for the text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetXY() - &#039;&#039;Define position (X,Y) for next text that will be output onto page&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;MultiCell() - &#039;&#039;Draw a box containing text. Used to output any text&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;GetY() - &#039;&#039;Return current Y position&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;SetDrawColor() - &#039;&#039;Set the color to use for new text to write - ie black (0,0,0) or white (255,255,255)&#039;&#039;&lt;br /&gt;
*$pdf-&amp;gt;Rect() - &#039;&#039;Draw a rectangle whose top left corner coordinates are defined by two first parameters and bottom right corner is defined by two following parameters that are relative values&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Frame of scripts==&lt;br /&gt;
The PHP script used for generating PDF documents had the following methods (taking as example the model &amp;quot;crabe&amp;quot;) inside the class with the model&#039;s name:&lt;br /&gt;
&lt;br /&gt;
*pdf_crabe() - &#039;&#039;Creator of the object pdf&#039;&#039;&lt;br /&gt;
*write_pdf_file() - &#039;&#039;General method for generating the file. This method calls all the following ones after initializing some variables&#039;&#039;&lt;br /&gt;
*_pagehead() - &#039;&#039;Method for drawing the heading of the document, including in general the logo, the title of the document (and the date) as well as the frames of the issuer and the addressee of the document&#039;&#039;&lt;br /&gt;
*_tableau() - &#039;&#039;Method for drawing the details table (products, services,...)&#039;&#039;&lt;br /&gt;
*_tableau_info() - &#039;&#039;Method for drawing the table containing information list present in the bill&#039;&#039;&lt;br /&gt;
*_tableau_tot() - &#039;&#039;Method for drawing table of Totals&#039;&#039;&lt;br /&gt;
*_tableau_versement() - &#039;&#039;Method for drawing table of payment rules&#039;&#039;&lt;br /&gt;
*_pagefoot() - &#039;&#039;Method for drawing bottom of the page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Examples of customization==&lt;br /&gt;
===Insert a logo===&lt;br /&gt;
&lt;br /&gt;
*Add following instructions&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Image(&#039;\www\htdocs\dolibarr\document\societe\logo.jpg&#039;, 10, 5, 60.00);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
With this example: 10=abscissa, 5=ordinate, 60=width of logo&lt;br /&gt;
&lt;br /&gt;
*If the logo is on or outside existing text, remove existing text by commenting the code that outputs the text or by changing its position.&lt;br /&gt;
&lt;br /&gt;
===Insert text===&lt;br /&gt;
Most common function to use&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;setX(float a); // set current x position&lt;br /&gt;
$pdf-&amp;gt;setY(float b); // set current y position&lt;br /&gt;
$pdf-&amp;gt;setXY(float a,float b); // fixe les positions x et y courantes&lt;br /&gt;
$pdf-&amp;gt;SetTextColor(0,0,200); // fixe la couleur du texte&lt;br /&gt;
$pdf-&amp;gt;SetFont(&#039;Arial&#039;,&#039;B&#039;,14); // fixe la police, le type ( &#039;B&#039; pour gras, &#039;I&#039; pour italique, &#039;&#039; pour normal,...)&lt;br /&gt;
$pdf-&amp;gt;MultiCell(60, 8, &#039;Mon texte&amp;quot;, 0, &#039;L&#039;); // imprime &#039;Mon texte&#039; avec saut de ligne&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note: Origin for setXY functions are the top left corner of page.&lt;br /&gt;
&lt;br /&gt;
===Add a PDF Annotation (comment)===&lt;br /&gt;
&#039;&#039;Left side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(102, 202, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Right side of the page around the middle:&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
$pdf-&amp;gt;Annotation(202, 102, 10, 10, &amp;quot;this is the comment text&amp;quot;, array(&#039;Subtype&#039;=&amp;gt;&#039;Text&#039;, &#039;Name&#039; =&amp;gt; &#039;Comment&#039;, &#039;T&#039; =&amp;gt; &#039;this is comment author&#039;, &#039;Subj&#039; =&amp;gt; &#039;this is comment title&#039;, &#039;C&#039; =&amp;gt; array(255, 255, 0)));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add Complementary Attribute (extrafiled)===&lt;br /&gt;
A dedicated page give you some advises how to integrate complementary attributes (extrafields) into PDF models of Dolibarr [[Add Extrafields on PDF Models]]&lt;br /&gt;
&lt;br /&gt;
==More information==&lt;br /&gt;
&lt;br /&gt;
*http://www.fpdf.org/?lang=en&lt;br /&gt;
*List of TCPDF&#039;s methods: tcpdf.org/doc/code/classTCPDF.html&lt;br /&gt;
&lt;br /&gt;
=Activate your new model=&lt;br /&gt;
In page Home =&amp;gt; Setup =&amp;gt; Modules =&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*activate your module&lt;br /&gt;
*eventually, set it as the default model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
&lt;br /&gt;
==Q: My PDF template doesn&#039;t understand foreign characters, it outputs them as ???==&lt;br /&gt;
&lt;br /&gt;
This is probably a font problem, the current font used for generating the PDF cannot handle the foreign characters you are trying to print. So just try to use another font.&lt;br /&gt;
&lt;br /&gt;
You will find the fonts used by Dolibarr to print PDF inside your Dolibarr folder.../includes/tecnickcom/tcpdf/fonts/&lt;br /&gt;
&lt;br /&gt;
To change the font used for generating PDF, you need to edit the &#039;main.lang&#039; file of the language you are using (you&#039;ll find the file in your Dolibarr.../langs/en_US/main.lang for instance if you use English)&lt;br /&gt;
&lt;br /&gt;
*Edit the main.lang file&lt;br /&gt;
*Locate the constant FONTFORPDF at the beginning of the file and change the value to FONTFORPDF=dejavusans for instance if you want to use dejavusans. Please note that sometimes FONTFORPDF may be missing, in this case you should add it at the beginning of the file.&lt;br /&gt;
*Save the file and try again to generate your PDF.&lt;br /&gt;
&lt;br /&gt;
If you are unlucky, you can try with more fonts, just go to the TCPDF website sourceforge.net/projects/tcpdf/files/ and download the latest zip package. Then extract only the &#039;fonts&#039; folder from the zip. Then copy the files in your Dolibarr installation .../includes/tecnickcom/tcpdf/fonts/ so you will get more fonts to play with.&lt;br /&gt;
&lt;br /&gt;
Also, please make a backup of your files modification.&lt;br /&gt;
&lt;br /&gt;
Alternative if this doesn&#039;t work: make sure the Translation class is correctly instantiated and loaded with the correct language inside your PDF templates (stored inside the $langs or $outputlangs variable).&lt;br /&gt;
&lt;br /&gt;
Thanks to Humphrey for the tip.&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=61978</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=61978"/>
		<updated>2024-12-08T18:21:01Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* Timeline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page presents a description of the rules and solutions for electronic invoicing (e-invoicing, e-billing) and e reporting.&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions to read, generate and send e-invoice depend on your country...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you need to install the module:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*E-reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
Note: Belgium already offers a platform called Mercurius, where you can send manually classic invoice to get a Peppol invoice.&lt;br /&gt;
&lt;br /&gt;
A peppol file can be validated here: https://ecosio.com/en/peppol-and-xml-document-validator/#&lt;br /&gt;
&lt;br /&gt;
To know if a peppol file has been published on the oeppol network, you can follow this tutorial: https://openpeppol.atlassian.net/wiki/spaces/Belgium/pages/624689399/Ma+facture+a-t-elle+t+bien+re+ue+par+le+client+Quel+est+son+statut&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factur-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually onto this platform, or to use a third-party service for submission directly from Dolibarr, for example by using:&lt;br /&gt;
&lt;br /&gt;
*The Chorus Pro Module - Subscription from EasyaSolution.&lt;br /&gt;
*The EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*E-reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
*Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
*Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*E-reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing: From 1/7/2025 all companies are required to issue and receive their invoices in electronic format&lt;br /&gt;
&lt;br /&gt;
Digital delivery note: From 1/4/2025 for companies with a turnover exceeding 200000€ and from 1/10/2025 compulsory for all legal entities&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
E-reporting is implemented by Independent Authority for Public Revenue (IAPR) MyDATA platform&lt;br /&gt;
&lt;br /&gt;
*For Dolibarr versions 13.0.0 - 18.0.4 download *https://github.com/evansgl/dolibarr-mydata/releases/tag/1.8&lt;br /&gt;
*For Dolibarr versions 19.0.0+ use &amp;quot;dolibarr-19 branch&amp;quot; *https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Only for companies with B2G transactions&lt;br /&gt;
*E-reporting: Yes&lt;br /&gt;
*Digital delivery note: Yes&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2024, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
There are two solutions:&lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;Fatturazione elettronica &amp;amp; Professionisti Smart&amp;quot; module: https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html&lt;br /&gt;
*The &amp;quot;Fatture Elettroniche ITA&amp;quot; module available from the site https://www.dolibarr.it&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*E-reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The obligation for economic operators to invoice electronically is staggered:&lt;br /&gt;
&lt;br /&gt;
*Large economic operators: from 18 May 2022&lt;br /&gt;
*Medium-sized economic operators: from 18 October 2022&lt;br /&gt;
*Small and newly established economic operators: from 18 March 2023&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
While there&#039;s no specific mention of Dolibarr support for Luxembourg e-invoicing, users can likely use the Peppol XML module available for other countries:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: Yes (mandatory as per the timeline above)&lt;br /&gt;
*E-reporting: Not specifically mentioned&lt;br /&gt;
&lt;br /&gt;
The legal framework is based on:&lt;br /&gt;
&lt;br /&gt;
*Law of 13 December 2021 amending the Law of 16 May 2019 on electronic invoicing in public procurement and concession contracts&lt;br /&gt;
*Grand-Ducal Regulation of 13 December 2021 determining the common delivery network and alternative technical solutions for electronic invoicing&lt;br /&gt;
&lt;br /&gt;
Luxembourg has chosen the Peppol network as the common delivery network for automated receipt of electronic invoices. For economic operators unable to use Peppol, alternative non-automated solutions (online forms) are available through Guichet.lu.&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
==Timeline==&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Mexican electronic format, you need to install the CFDIXML module:&lt;br /&gt;
&lt;br /&gt;
*https://github.com/avadnc/cfdixml&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
=Netherlands (Peppol BIS Billing 3.0, NLCIUS)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in The Netherlands are NLCIUS (Dutch CIUS) and Peppol BIS Billing 3.0 with country-specific rules equal to NL CIUS.&lt;br /&gt;
Peppol BIS Billing 3.0 is now the preferred format but not mandatory.&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
N/A&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+The+Netherlands (NO VERIFICATION)&lt;br /&gt;
*B2G: N/A&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*E-reporting: N/A&lt;br /&gt;
&lt;br /&gt;
=Spain (Facturae - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain is called Facturae. VeriFactu is the system and network to send and validate invoices.&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
The following module is required:&lt;br /&gt;
&lt;br /&gt;
*https://www.2byte.es/index.php/productos/modulo-2facturae&lt;br /&gt;
&lt;br /&gt;
With the 2Facturae module you can create the XML in billura format through your ERP &amp;amp; CRM Dolibarr, in order to be able to digitally sign the XML (through digital signature portals or your own digital signature software), and once signed, to be able to import at the entry point of the corresponding administration.&lt;br /&gt;
&lt;br /&gt;
Another solution to be ready and compliant with the VeryFactu system is to install an external module called &amp;quot;Ley antifraude y VeriFactu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note: As the law is evolving frequently and may depends on your business, you MUST check with your book keeper or your laywer that this suits completely the law and the need of your own business.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: N/A&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*E-reporting: N/A&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The a red payment slip (called BV) and an orange payment slip (called BVR) is no more required after 2022.&lt;br /&gt;
&lt;br /&gt;
QR-Bill is expected for PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer since the 20th june 2020.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To obtain such a section:&lt;br /&gt;
&lt;br /&gt;
*You can install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html&lt;br /&gt;
*The other option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but an external PHP library will be required for the first generation of the PDF.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=61758</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=61758"/>
		<updated>2024-10-27T17:04:11Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* Greece (Peppol BIS Billing CIUS 3.0) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page presents a description of the rules and solutions for electronic invoicing (e-invoicing, e-billing) and e reporting.&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions depend on your country...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you need to install the module:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*E-reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
Note: Belgium already offers a platform called Mercurius, where you can send manually classic invoice to get a Peppol invoice.&lt;br /&gt;
&lt;br /&gt;
A peppol file can be validated here: https://ecosio.com/en/peppol-and-xml-document-validator/#&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factur-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually or use a third-party service for submission directly from Dolibarr. For example, using:&lt;br /&gt;
&lt;br /&gt;
*Chorus Pro Module - Subscription from EasyaSolution.&lt;br /&gt;
*EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*E-reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
*Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
*Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*E-reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing: From 1/7/2025 all companies are required to issue and receive their invoices in electronic format&lt;br /&gt;
&lt;br /&gt;
Digital delivery note: From 1/12/2024 for companies with a turnover exceeding 200000€ and from 1/4/2025 compulsory for all legal entities&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
E-reporting is implemented by Independent Authority for Public Revenue (IAPR) MyDATA platform&lt;br /&gt;
&lt;br /&gt;
*For Dolibarr versions 13.0.0 - 18.0.4 download *https://github.com/evansgl/dolibarr-mydata/releases/tag/1.8&lt;br /&gt;
*For Dolibarr versions 19.0.0+ use &amp;quot;dolibarr-19 branch&amp;quot; *https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Only for companies with B2G transactions&lt;br /&gt;
*E-reporting: Yes&lt;br /&gt;
*Digital delivery note: Yes&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2024, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
There are two solutions:&lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;Fatturazione elettronica &amp;amp; Professionisti Smart&amp;quot; module: https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html&lt;br /&gt;
*The &amp;quot;Fatture Elettroniche ITA&amp;quot; module available from the site https://www.dolibarr.it&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*E-reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The obligation for economic operators to invoice electronically is staggered:&lt;br /&gt;
&lt;br /&gt;
*Large economic operators: from 18 May 2022&lt;br /&gt;
*Medium-sized economic operators: from 18 October 2022&lt;br /&gt;
*Small and newly established economic operators: from 18 March 2023&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
While there&#039;s no specific mention of Dolibarr support for Luxembourg e-invoicing, users can likely use the Peppol XML module available for other countries:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: Yes (mandatory as per the timeline above)&lt;br /&gt;
*E-reporting: Not specifically mentioned&lt;br /&gt;
&lt;br /&gt;
The legal framework is based on:&lt;br /&gt;
&lt;br /&gt;
*Law of 13 December 2021 amending the Law of 16 May 2019 on electronic invoicing in public procurement and concession contracts&lt;br /&gt;
*Grand-Ducal Regulation of 13 December 2021 determining the common delivery network and alternative technical solutions for electronic invoicing&lt;br /&gt;
&lt;br /&gt;
Luxembourg has chosen the Peppol network as the common delivery network for automated receipt of electronic invoices. For economic operators unable to use Peppol, alternative non-automated solutions (online forms) are available through Guichet.lu.&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
==Timeline==&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Mexican electronic format, you need to install the CFDIXML module:&lt;br /&gt;
&lt;br /&gt;
*https://github.com/avadnc/cfdixml&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
=Netherlands (Peppol BIS Billing 3.0, NLCIUS)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in The Netherlands are NLCIUS (Dutch CIUS) and Peppol BIS Billing 3.0 with country-specific rules equal to NL CIUS.&lt;br /&gt;
Peppol BIS Billing 3.0 is now the preferred format but not mandatory.&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
N/A&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+The+Netherlands (NO VERIFICATION)&lt;br /&gt;
*B2G: N/A&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*E-reporting: N/A&lt;br /&gt;
&lt;br /&gt;
=Spain (Facturae - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain IS Facturae&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
The following module is required:&lt;br /&gt;
&lt;br /&gt;
*https://www.2byte.es/index.php/productos/modulo-2facturae&lt;br /&gt;
&lt;br /&gt;
With the 2Facturae module you can create the XML in billura format through your ERP &amp;amp; CRM Dolibarr, in order to be able to digitally sign the XML (through digital signature portals or your own digital signature software), and once signed, to be able to import at the entry point of the corresponding administration.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: N/A&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*E-reporting: N/A&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The a red payment slip (called BV) and an orange payment slip (called BVR) is no more required after 2022.&lt;br /&gt;
&lt;br /&gt;
QR-Bill is expected for PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer since the 20th june 2020.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To obtain such a section:&lt;br /&gt;
&lt;br /&gt;
*You can install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html&lt;br /&gt;
*The other option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but an external PHP library will be required for the first generation of the PDF.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=61743</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=61743"/>
		<updated>2024-10-25T23:06:00Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page presents a description of the rules and solutions for electronic invoicing (e-invoicing, e-billing) and e reporting.&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions depend on your country...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you need to install the module:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*E-reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
Note: Belgium already offers a platform called Mercurius, where you can send manually classic invoice to get a Peppol invoice.&lt;br /&gt;
&lt;br /&gt;
A peppol file can be validated here: https://ecosio.com/en/peppol-and-xml-document-validator/#&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factur-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually or use a third-party service for submission directly from Dolibarr. For example, using:&lt;br /&gt;
&lt;br /&gt;
*Chorus Pro Module - Subscription from EasyaSolution.&lt;br /&gt;
*EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*E-reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
&lt;br /&gt;
*Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
*Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Not yet&lt;br /&gt;
*E-reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
eInvoicing: Probably from 1/7/2025, announcement pending&lt;br /&gt;
&lt;br /&gt;
Digital delivery note: From 1/12/2024 for companies with a turnover exceeding 200000€ and from 1/4/2025 compulsory for all legal entities&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
E-reporting is implemented by Independent Authority for Public Revenue (IAPR) MyDATA platform&lt;br /&gt;
&lt;br /&gt;
*For Dolibarr versions 13.0.0 - 18.0.4 download *https://github.com/evansgl/dolibarr-mydata/releases/tag/1.8&lt;br /&gt;
*For Dolibarr versions 19.0.0+ use &amp;quot;dolibarr-19 branch&amp;quot; *https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Only for companies with B2G transactions&lt;br /&gt;
*E-reporting: Yes&lt;br /&gt;
*Digital delivery note: Yes&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2024, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
There are two solutions:&lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;Fatturazione elettronica &amp;amp; Professionisti Smart&amp;quot; module: https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html&lt;br /&gt;
*The &amp;quot;Fatture Elettroniche ITA&amp;quot; module available from the site https://www.dolibarr.it&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*E-reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The obligation for economic operators to invoice electronically is staggered:&lt;br /&gt;
&lt;br /&gt;
*Large economic operators: from 18 May 2022&lt;br /&gt;
*Medium-sized economic operators: from 18 October 2022&lt;br /&gt;
*Small and newly established economic operators: from 18 March 2023&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
While there&#039;s no specific mention of Dolibarr support for Luxembourg e-invoicing, users can likely use the Peppol XML module available for other countries:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: Yes (mandatory as per the timeline above)&lt;br /&gt;
*E-reporting: Not specifically mentioned&lt;br /&gt;
&lt;br /&gt;
The legal framework is based on:&lt;br /&gt;
&lt;br /&gt;
*Law of 13 December 2021 amending the Law of 16 May 2019 on electronic invoicing in public procurement and concession contracts&lt;br /&gt;
*Grand-Ducal Regulation of 13 December 2021 determining the common delivery network and alternative technical solutions for electronic invoicing&lt;br /&gt;
&lt;br /&gt;
Luxembourg has chosen the Peppol network as the common delivery network for automated receipt of electronic invoices. For economic operators unable to use Peppol, alternative non-automated solutions (online forms) are available through Guichet.lu.&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
==Timeline==&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Mexican electronic format, you need to install the CFDIXML module:&lt;br /&gt;
&lt;br /&gt;
*https://github.com/avadnc/cfdixml&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
=Netherlands (Peppol BIS Billing 3.0, NLCIUS)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in The Netherlands are NLCIUS (Dutch CIUS) and Peppol BIS Billing 3.0 with country-specific rules equal to NL CIUS.&lt;br /&gt;
Peppol BIS Billing 3.0 is now the preferred format but not mandatory.&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
N/A&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+The+Netherlands (NO VERIFICATION)&lt;br /&gt;
*B2G: N/A&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*E-reporting: N/A&lt;br /&gt;
&lt;br /&gt;
=Spain (Facturae - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain IS Facturae&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
The following module is required:&lt;br /&gt;
&lt;br /&gt;
*https://www.2byte.es/index.php/productos/modulo-2facturae&lt;br /&gt;
&lt;br /&gt;
With the 2Facturae module you can create the XML in billura format through your ERP &amp;amp; CRM Dolibarr, in order to be able to digitally sign the XML (through digital signature portals or your own digital signature software), and once signed, to be able to import at the entry point of the corresponding administration.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: N/A&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*E-reporting: N/A&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
&lt;br /&gt;
*E-reporting:&lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The a red payment slip (called BV) and an orange payment slip (called BVR) is no more required after 2022.&lt;br /&gt;
&lt;br /&gt;
QR-Bill is expected for PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer since the 20th june 2020.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To obtain such a section:&lt;br /&gt;
&lt;br /&gt;
*You can install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html&lt;br /&gt;
*The other option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but an external PHP library will be required for the first generation of the PDF.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
*B2G:&lt;br /&gt;
*B2B:&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=61470</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=61470"/>
		<updated>2024-09-19T18:46:32Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* Legislation and current status */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page presents a description of the rules and solutions for electronic invoicing (e-invoicing) and e reporting.&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions depend on your country...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you need to install the module:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
* B2G: Yes&lt;br /&gt;
* B2B: Not yet&lt;br /&gt;
* E-reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factur-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually or use a third-party service for submission directly from Dolibarr. For example, using:&lt;br /&gt;
&lt;br /&gt;
*Chorus Pro Module - Subscription from EasyaSolution.&lt;br /&gt;
*EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
* B2G: Yes&lt;br /&gt;
* B2B: Not yet&lt;br /&gt;
* E-reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
* Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
* Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
* B2G: Yes&lt;br /&gt;
* B2B: Not yet&lt;br /&gt;
* E-reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
E-reporting is implemented by Independent Authority for Public Revenue (IAPR) MyDATA platform&lt;br /&gt;
*For Dolibarr versions 13.0.0 - 18.0.4 download *https://github.com/evansgl/dolibarr-mydata/releases/tag/1.8&lt;br /&gt;
*For Dolibarr versions 19.0.0+ use &amp;quot;dolibarr-19 branch&amp;quot; *https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
* B2G: Yes&lt;br /&gt;
* B2B: Only for companies with B2G transactions&lt;br /&gt;
* E-reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2024, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
There are two solutions:&lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;Fatturazione elettronica &amp;amp; Professionisti Smart&amp;quot; module: https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html&lt;br /&gt;
*The &amp;quot;Fatture Elettroniche ITA&amp;quot; module available from the site https://www.dolibarr.it&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*E-reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The obligation for economic operators to invoice electronically is staggered:&lt;br /&gt;
&lt;br /&gt;
*Large economic operators: from 18 May 2022&lt;br /&gt;
*Medium-sized economic operators: from 18 October 2022&lt;br /&gt;
*Small and newly established economic operators: from 18 March 2023&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
While there&#039;s no specific mention of Dolibarr support for Luxembourg e-invoicing, users can likely use the Peppol XML module available for other countries:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: Yes (mandatory as per the timeline above)&lt;br /&gt;
*E-reporting: Not specifically mentioned&lt;br /&gt;
&lt;br /&gt;
The legal framework is based on:&lt;br /&gt;
&lt;br /&gt;
*Law of 13 December 2021 amending the Law of 16 May 2019 on electronic invoicing in public procurement and concession contracts&lt;br /&gt;
*Grand-Ducal Regulation of 13 December 2021 determining the common delivery network and alternative technical solutions for electronic invoicing&lt;br /&gt;
&lt;br /&gt;
Luxembourg has chosen the Peppol network as the common delivery network for automated receipt of electronic invoices. For economic operators unable to use Peppol, alternative non-automated solutions (online forms) are available through Guichet.lu.&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
==Timeline==&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Mexican electronic format, you need to install the CFDIXML module:&lt;br /&gt;
&lt;br /&gt;
*https://github.com/avadnc/cfdixml&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
* B2G: &lt;br /&gt;
* B2B:  &lt;br /&gt;
* E-reporting:  &lt;br /&gt;
&lt;br /&gt;
=Netherlands (Peppol BIS Billing 3.0, NLCIUS)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in The Netherlands are NLCIUS (Dutch CIUS) and Peppol BIS Billing 3.0 with country-specific rules equal to NL CIUS.&lt;br /&gt;
Peppol BIS Billing 3.0 is now the preferred format but not mandatory.&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
N/A&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+The+Netherlands (NO VERIFICATION)&lt;br /&gt;
* B2G: N/A&lt;br /&gt;
* B2B: N/A&lt;br /&gt;
* E-reporting: N/A&lt;br /&gt;
&lt;br /&gt;
=Spain (Facturae - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain IS Facturae&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
The following module is required:&lt;br /&gt;
&lt;br /&gt;
*https://www.2byte.es/index.php/productos/modulo-2facturae&lt;br /&gt;
With the 2Facturae module you can create the XML in billura format through your ERP &amp;amp; CRM Dolibarr, in order to be able to digitally sign the XML (through digital signature portals or your own digital signature software), and once signed, to be able to import at the entry point of the corresponding administration.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: N/A&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*E-reporting: N/A&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
* E-reporting: &lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The a red payment slip (called BV) and an orange payment slip (called BVR) is no more required after 2022.&lt;br /&gt;
&lt;br /&gt;
QR-Bill is expected for PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer since the 20th june 2020.&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To obtain such a section:&lt;br /&gt;
&lt;br /&gt;
*You can install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html&lt;br /&gt;
*The other option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but an external PHP library will be required for the first generation of the PDF.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
* B2G: &lt;br /&gt;
* B2B:&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=61450</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=61450"/>
		<updated>2024-09-16T21:15:50Z</updated>

		<summary type="html">&lt;p&gt;Sonikf: /* Spain (Facturae - VeriFactu) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page presents a description of the rules and solutions for electronic invoicing (e-invoicing) and e reporting.&lt;br /&gt;
&lt;br /&gt;
The laws, rules, and solutions depend on your country...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Belgium (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Belgium is Peppol BIS Billing 3.0, which uses the UBL structure defined by the OASIS organization: https://docs.oasis-open.org/ubl/&lt;br /&gt;
&lt;br /&gt;
Here are some links about this format:&lt;br /&gt;
&lt;br /&gt;
*https://peppol.eu/&lt;br /&gt;
*https://docs.peppol.eu/poacc/billing/3.0/&lt;br /&gt;
==Timeline==&lt;br /&gt;
The Belgian parliament approved the law implementing mandatory domestic B2B eInvoicing in Belgium as from 1 January 2026&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you need to install the module:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Belgium&lt;br /&gt;
* B2G: Yes&lt;br /&gt;
* B2B: Not yet&lt;br /&gt;
* E-reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=France (Factur-X, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The government has specified three types of electronic invoice formats:&lt;br /&gt;
&lt;br /&gt;
*Factur-X, sometimes incorrectly written as FactureX (Hybrid Format PDF A/3 + Structured Data in XML included in the PDF)&lt;br /&gt;
*CIUS for Chorus Pro (Cross Industry Invoice (CII))&lt;br /&gt;
*Peppol BIS Billing 3.0 (Universal Business Language (UBL) format)&lt;br /&gt;
&lt;br /&gt;
Any of these formats can be used in France. The Dolibarr software has chosen the first format. It is already compatible (see below).&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
Initially, the first deadline was set for January 1, 2024. The schedule was modified at the end of 2023 by the government. It is now as follows:&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2026: Obligation to receive electronic invoices for all businesses.&lt;br /&gt;
&lt;br /&gt;
All companies are required to receive their invoices in electronic format. Only large companies (employing at least 5,000 employees or with a turnover exceeding 1.5 billion euros) and medium-sized companies (employing between 250 and 4,999 employees or with a turnover not exceeding 1.5 billion euros) are required to issue invoices in electronic format.&lt;br /&gt;
&lt;br /&gt;
*From September 1, 2027: All SMEs and micro-enterprises will be required to issue electronic invoices (postponable until December 1, 2027).&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Factur-X format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
&lt;br /&gt;
This module, or a modified or Dolibarrized version of the module, will be integrated as standard in a future version of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
Once the document is generated, it must be transmitted to a centralized platform. Sending the invoice directly to your client via email will no longer be possible.&lt;br /&gt;
&lt;br /&gt;
Dolibarr, like any invoicing software, will therefore need to interface with a PDP (private intermediary operator) or the PPF (the state&#039;s centralized platform for submitting invoices). This point has not yet been developed because the government platform and specifications for such automatic invoice transfer are not yet ready. The development will be carried out as soon as they are available. See the page [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, where it is mandatory to submit invoices in certain cases (e.g., invoices intended for the administration). To interface your Dolibarr with this platform, you need to either submit invoices manually or use a third-party service for submission directly from Dolibarr. For example, using:&lt;br /&gt;
&lt;br /&gt;
*Chorus Pro Module - Subscription from EasyaSolution.&lt;br /&gt;
*EDI Chorus Module&lt;br /&gt;
*The platform [[HeyBilly]] which interfaces with the Chorus APIs and Dolibarr APIs.&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+France&lt;br /&gt;
* B2G: Yes&lt;br /&gt;
* B2B: Not yet&lt;br /&gt;
* E-reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
=Germany (Factur-X / ZUGFeRD, Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Germany is Factur-X, which is the same as in France. However, its German name, ZUGFeRD, can also be used.&lt;br /&gt;
This standard involves integrating structured invoice data into an XML file embedded within the PDF A/3 of the invoice.&lt;br /&gt;
All authorities at federal and national level are mandated to always offer a Peppol transmission if an automated data exchange is provided for the delivery of eInvoices. The XRechnung format being specific to Germany, economic operators should select a provider that is accredited by the German Peppol Authority. This ensures that the service provider conducts Peppol transactions in Germany.&lt;br /&gt;
==Timeline==&lt;br /&gt;
* Mandatory issuance of eInvoices for companies with an annual turnover exceeding 800 000, 00 EUR. In 2027&lt;br /&gt;
* Mandatory issue of eInvoice for every B2B transaction in 2028&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in this format, you need to install the FacturX module available on Dolistore:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/crm-gestion-relation-client/1511-FacturX---Facture---lectronique--Chorus----.html&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Germany (NO VERIFICATION)&lt;br /&gt;
* B2G: Yes&lt;br /&gt;
* B2B: Not yet&lt;br /&gt;
* E-reporting: Not yet&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Greece (Peppol BIS Billing CIUS 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Greece is Peppol BIS Billing CIUS 3.0&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
E-reporting is implemented by Independent Authority for Public Revenue (IAPR) MyDATA platform&lt;br /&gt;
*For Dolibarr versions 13.0.0 - 18.0.4 download *https://github.com/evansgl/dolibarr-mydata/releases/tag/1.8&lt;br /&gt;
*For Dolibarr versions 19.0.0+ use &amp;quot;dolibarr-19 branch&amp;quot; *https://github.com/evansgl/dolibarr-mydata/tree/dolibarr-19&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Greece&lt;br /&gt;
* B2G: Yes&lt;br /&gt;
* B2B: Not yet&lt;br /&gt;
* E-reporting: Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Italy (FatturaPA)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Italy is FatturaPA (national XML standard)&lt;br /&gt;
==Timeline==&lt;br /&gt;
As of January 2024, eInvoicing is mandatory for B2B and B2C for all Italian operators&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
There are two solutions:&lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;Fatturazione elettronica &amp;amp; Professionisti Smart&amp;quot; module: https://www.dolistore.com/en/modules/1054-Fatturazione-elettronica---Professionisti-Smart.html&lt;br /&gt;
*The &amp;quot;Fatture Elettroniche ITA&amp;quot; module available from the site https://www.dolibarr.it&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Italy (NO VERIFICATION)&lt;br /&gt;
*B2G: Yes&lt;br /&gt;
*B2B: Yes&lt;br /&gt;
*E-reporting: Yes&lt;br /&gt;
&lt;br /&gt;
=Luxembourg (Peppol BIS Billing 3.0)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Luxembourg is Peppol BIS Billing 3.0, which must comply with European standard EN 16931-1:2017. Two syntaxes are permitted:&lt;br /&gt;
&lt;br /&gt;
*XML UBL (Universal Business Language) defined in standard ISO/IEC 19845:2015&lt;br /&gt;
*XML UN/CEFACT CII (Cross Industry Invoice)&lt;br /&gt;
&lt;br /&gt;
==Timeline==&lt;br /&gt;
The obligation for economic operators to invoice electronically is staggered:&lt;br /&gt;
&lt;br /&gt;
*Large economic operators: from 18 May 2022&lt;br /&gt;
*Medium-sized economic operators: from 18 October 2022&lt;br /&gt;
*Small and newly established economic operators: from 18 March 2023&lt;br /&gt;
&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
While there&#039;s no specific mention of Dolibarr support for Luxembourg e-invoicing, users can likely use the Peppol XML module available for other countries:&lt;br /&gt;
&lt;br /&gt;
*https://www.dolistore.com/fr/modules/1585-Peppol-XML---facture-electronique.html&lt;br /&gt;
&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Luxembourg&lt;br /&gt;
&lt;br /&gt;
https://mindigital.gouvernement.lu/en/dossiers/2021/facturation-electronique.html&lt;br /&gt;
&lt;br /&gt;
*B2G: Yes (mandatory since 18 April 2019 or 18 April 2020 for sub-central contracting authorities)&lt;br /&gt;
*B2B: Yes (mandatory as per the timeline above)&lt;br /&gt;
*E-reporting: Not specifically mentioned&lt;br /&gt;
&lt;br /&gt;
The legal framework is based on:&lt;br /&gt;
&lt;br /&gt;
*Law of 13 December 2021 amending the Law of 16 May 2019 on electronic invoicing in public procurement and concession contracts&lt;br /&gt;
*Grand-Ducal Regulation of 13 December 2021 determining the common delivery network and alternative technical solutions for electronic invoicing&lt;br /&gt;
&lt;br /&gt;
Luxembourg has chosen the Peppol network as the common delivery network for automated receipt of electronic invoices. For economic operators unable to use Peppol, alternative non-automated solutions (online forms) are available through Guichet.lu.&lt;br /&gt;
&lt;br /&gt;
=Mexico (CFDIXML)=&lt;br /&gt;
==Format==&lt;br /&gt;
==Timeline==&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
To generate invoices in the Mexican electronic format, you need to install the CFDIXML module:&lt;br /&gt;
&lt;br /&gt;
*https://github.com/avadnc/cfdixml&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
* B2G: &lt;br /&gt;
* B2B:  &lt;br /&gt;
* E-reporting:  &lt;br /&gt;
&lt;br /&gt;
=Netherlands (Peppol BIS Billing 3.0, NLCIUS)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in The Netherlands are NLCIUS (Dutch CIUS) and Peppol BIS Billing 3.0 with country-specific rules equal to NL CIUS.&lt;br /&gt;
Peppol BIS Billing 3.0 is now the preferred format but not mandatory.&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
N/A&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+The+Netherlands (NO VERIFICATION)&lt;br /&gt;
* B2G: N/A&lt;br /&gt;
* B2B: N/A&lt;br /&gt;
* E-reporting: N/A&lt;br /&gt;
&lt;br /&gt;
=Spain (Facturae - VeriFactu)=&lt;br /&gt;
==Format==&lt;br /&gt;
The electronic invoice format in Spain IS Facturae&lt;br /&gt;
==Timeline==&lt;br /&gt;
N/A&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
The following module is required:&lt;br /&gt;
&lt;br /&gt;
*https://www.2byte.es/index.php/productos/modulo-2facturae&lt;br /&gt;
With the 2Facturae module you can create the XML in billura format through your ERP &amp;amp; CRM Dolibarr, in order to be able to digitally sign the XML (through digital signature portals or your own digital signature software), and once signed, to be able to import at the entry point of the corresponding administration.&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
*https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing+in+Spain (NO VERIFICATION)&lt;br /&gt;
*B2G: N/A&lt;br /&gt;
*B2B: N/A&lt;br /&gt;
*E-reporting: N/A&lt;br /&gt;
&lt;br /&gt;
=Switzerland (QR-Bill)=&lt;br /&gt;
==Format==&lt;br /&gt;
==Timeline==&lt;br /&gt;
==Dolibarr support==&lt;br /&gt;
==Legislation and current status==&lt;br /&gt;
&lt;br /&gt;
* B2G: &lt;br /&gt;
* B2B: &lt;br /&gt;
* E-reporting: &lt;br /&gt;
&lt;br /&gt;
Until 2022, Switzerland required invoices to be accompanied by a red payment slip (called BV) and an orange payment slip (called BVR). This is no longer the case. Instead, PDF invoices in Euro or Swiss Francs, which can or must be paid by bank transfer, must include, at the bottom of the page for example, a section containing all the information required for payment by transfer. This is called the QR-Bill or QR-Invoice.&lt;br /&gt;
&lt;br /&gt;
*Complete PDF standard: https://www.six-group.com/dam/download/banking-services/standardization/qr-bill/ig-qr-bill-v2.2-fr.pdf&lt;br /&gt;
*More info: https://www.six-group.com/fr/products-services/banking-services/payment-standardization.html&lt;br /&gt;
*FAQ: https://www.six-group.com/fr/products-services/banking-services/payment-standardization/downloads-faq/faq.html&lt;br /&gt;
&lt;br /&gt;
To obtain such a section:&lt;br /&gt;
&lt;br /&gt;
*You can install the following module: https://www.dolistore.com/fr/modules/286-SwissBanking.html&lt;br /&gt;
*The other option is to activate the experimental option INVOICE_ADD_SWISS_QR_CODE:&lt;br /&gt;
**Setting the value to &#039;1&#039; will generate and print the QR code only.&lt;br /&gt;
**If the option is set to &#039;bottom&#039;, the entire section at the bottom of the invoice will be displayed, but an external PHP library will be required for the first generation of the PDF.&lt;/div&gt;</summary>
		<author><name>Sonikf</name></author>
	</entry>
</feed>