<?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=Esprit-libre</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=Esprit-libre"/>
	<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php/Special:Contributions/Esprit-libre"/>
	<updated>2026-12-05T04:52:48Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=66571</id>
		<title>Electronic Billing</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Electronic_Billing&amp;diff=66571"/>
		<updated>2026-07-01T13:09:08Z</updated>

		<summary type="html">&lt;p&gt;Esprit-libre: Renaming PDPConnectFR to EInvoicing&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;
*EM Peppol (Access Point Peppyrus) https://www.dolistore.com/product.php?id=2740&amp;amp;title=em-peppol&amp;amp;l=fr&lt;br /&gt;
*WiwiTRouter (Access Point B2BRouter): https://www.dolistore.com/product.php?id=2537&amp;amp;title=wiwitrouter-invoice-facturation-electronique-peppol-dgfip&amp;amp;l=fr&lt;br /&gt;
*Toutatis (Access Point Toutatis) https://www.dolistore.com/product.php?id=2427&amp;amp;title=peppol-full-integration-client&lt;br /&gt;
*WiwiRouter (Access Point B2BRouter) https://www.dolistore.com/product.php?id=2537&amp;amp;title=wiwitrouter-invoice-facturation-electronique-peppol&amp;amp;l=fr&lt;br /&gt;
*DoliFalco (Access Point Falco) https://www.dolistore.com/product.php?id=2635&amp;amp;title=dolifalco&amp;amp;l=fr&lt;br /&gt;
*Peppol MultiAP (Multi-AP but seems to need another module to import Supplier invoices) https://www.dolistore.com/product.php?id=884&amp;amp;title=peppol-xml-ubl-facture-electronique-multi-ap&amp;amp;l=fr&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 E-invoices and to send or retreive them to a certified Access Point, you need to install [[Module EInvoicing (Generic, FR, ...)|the Module EInvoincing]].&lt;br /&gt;
&lt;br /&gt;
You can install the module from your Dolibarr, from menu &amp;quot;Home - Setup - Module - Install&amp;quot; external module when using Dolibarr v24+. If you are using an older version, you will be able to download the module from DoliStore.com.&lt;br /&gt;
&lt;br /&gt;
Currently the source code of the module can be found at: https://github.com/Dolibarr/dolibarr-community-modules/tree/main/einvoicing&lt;br /&gt;
&lt;br /&gt;
The module allows you to generate E-invoice (with format Factur-X or CII). Once the document is generated, it can be transmitted to the Access Point. Sending the invoice directly to your client, alone, via email will no longer be possible. Also, the module allows you to download invoices sent by your suppliers to its Access Point.&lt;br /&gt;
&lt;br /&gt;
So, Dolibarr, like any invoicing software, need to connect to an official Access Point (Called PA in France for Plateforme Agréée, or formerly PDP) and this features is provided by the module for few Access Points. See documentation on [[Module EInvoicing (Generic, FR, ...)|Module EInvoicing]] for more information on which Access Point is supported.&lt;br /&gt;
&lt;br /&gt;
The development of this modules is managed by the [[GIFF Facture électronique]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: France already offers a platform called Chorus-Pro, on which 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 sprain/swiss-qr-bill will be requested at the first generation of the PDF (The library must be installed into directory htdocs/includes/sprain/swiss-qr-bill/). Note: This is an experimental feature not yet supported.&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>Esprit-libre</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cr%C3%A9er_un_mod%C3%A8le_de_document_ODT_ou_ODS&amp;diff=37114</id>
		<title>Créer un modèle de document ODT ou ODS</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cr%C3%A9er_un_mod%C3%A8le_de_document_ODT_ou_ODS&amp;diff=37114"/>
		<updated>2017-04-25T13:07:11Z</updated>

		<summary type="html">&lt;p&gt;Esprit-libre: /* Créer votre document */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUtil}}&lt;br /&gt;
Cette page décrit comment construire un modèle de document ODT pour utiliser la génération de document ODT.&lt;br /&gt;
&lt;br /&gt;
Pour savoir comment générer un modèle de document PDF, voir la page [[Créer un modèle de document PDF]].&lt;br /&gt;
Créer un modèle PDF requiert des connaissances en programmation PHP mais pas la création de modèles ODT. &lt;br /&gt;
&lt;br /&gt;
== Prérequis ==&lt;br /&gt;
* Dolibarr: 3.1+&lt;br /&gt;
* OpenOffice: 3.2+, LibreOffice, ...&lt;br /&gt;
&lt;br /&gt;
== Créer votre document ==&lt;br /&gt;
* Créer un document OpenOffice ou LibreOffice en partant de rien ou en prenant un example fournis. Si vous partez d&#039;un exemple, vous les trouverez installés dans les sous-répertoires du répertoire &#039;&#039;&#039;documents/doctemplates&#039;&#039;&#039;&lt;br /&gt;
* Éditer le document en utilisant toutes les fonctions de votre suite bureautique.&lt;br /&gt;
Inclure dans votre documents les tags des informations que vous voulez voir. Les tags seront remplacés automatiquement au moment de la génération du document par Dolibarr. La liste des tags disponibles est décrite dans le chapitre suivant.&lt;br /&gt;
&lt;br /&gt;
[[File:warning.png]] Attention, les tags sont entourés de {} ou [] pour les tableaux ou conditions (voir plus loin) et doivent être tapés d&#039;une traite sous la suite Office (sans retour arrière ou effacement, ni par copié-collé). Dans le cas contraire, la suite Office ajoutera des informations invisibles qui empêche le remplacement. Il est également possible d&#039;utiliser les copier-coller en faisant un collage spécial sans formatage (CTRL+MAJ+V).&lt;br /&gt;
&lt;br /&gt;
== Tags ==&lt;br /&gt;
Voici la liste des tags qui seront remplacés par les informations appropriées:&lt;br /&gt;
&lt;br /&gt;
===Company/foundation information===&lt;br /&gt;
{{TagsOdtMyCompany}}&lt;br /&gt;
&lt;br /&gt;
===Customers, prospects or suppliers information===&lt;br /&gt;
{{TagsOdtThirdParty}}&lt;br /&gt;
&lt;br /&gt;
=== Information utilisateur ===&lt;br /&gt;
{{TagsOdtUser}}&lt;br /&gt;
&lt;br /&gt;
=== Autres informations ===&lt;br /&gt;
{{TagsOdtOther}}&lt;br /&gt;
&lt;br /&gt;
===Informations sur l&#039;objet (facture, proposition commerciale, commande, ...)===&lt;br /&gt;
{{TagsOdtObjects}}&lt;br /&gt;
&lt;br /&gt;
===Lignes des objets===&lt;br /&gt;
Voici comment utiliser les tableaux de lignes des objets (lignes de factures, commandes, etc...). Vous devez créer un tableau dans le document et utiliser une balise &amp;quot;begin&amp;quot; et &amp;quot;end&amp;quot; pour définir la ligne du tableau. Cette ligne sera répétée autant de fois que requis au moment de la génération.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[!-- BEGIN row.lines --]&lt;br /&gt;
...&lt;br /&gt;
[!-- END row.lines --]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ensuite, ajouter les tags de votre choix dans les lignes parmi ceux-ci:&lt;br /&gt;
{{TagsOdtLines}}&lt;br /&gt;
&lt;br /&gt;
Voici un exemple de ce que vous pourriez avoir dans votre traitement de texte:&lt;br /&gt;
[[File:Line for document generation.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Substitution conditionnelle ===&lt;br /&gt;
&lt;br /&gt;
Vous pouvez utiliser des &#039;&#039;&#039;remplacements conditionnels&#039;&#039;&#039;, ce qui en termes simples signifie que vous pouvez décider d&#039;imprimer quelque chose si une variable est vrai, ou imprimer autre chose si elle est fausse (ou rien du tout) - et cela marche non seulement avec du texte, mais aussi toute structure plus complexe comme les tableaux et les images.&lt;br /&gt;
&lt;br /&gt;
Exemple:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[!-- IF {my_var} --]&lt;br /&gt;
Print this text if {my_var} is true (can be any value but null/0/empty string)&lt;br /&gt;
[!-- ELSE {my_var} --]&lt;br /&gt;
Or print this if it&#039;s false (null/0/empty string)&lt;br /&gt;
[!-- ENDIF {my_var} --]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: le tag ELSE est bien sûr optionnel, vous pouvez sans problème juste utiliser un IF/ENDIF si vous préférez.&lt;br /&gt;
&lt;br /&gt;
ATTENTION: le format de cette balise spéciale est très précis et pointilleux, faire attention à &#039;&#039;&#039;mettre un seul espace&#039;&#039;&#039; entre:&lt;br /&gt;
* [!--&lt;br /&gt;
* IF/ELSE/ENDIF&lt;br /&gt;
* {my var}&lt;br /&gt;
* --]&lt;br /&gt;
&lt;br /&gt;
=== Autres tags personnalisés ===&lt;br /&gt;
Si vous voulez ajouter un champ de substitution non prédéfini, il y a une solution:&lt;br /&gt;
* Ajouter un fichier nommé &lt;br /&gt;
&#039;&#039;&#039;htdocs/monmodule/core/substitutions/functions_mymodule.lib.php&#039;&#039;&#039;&lt;br /&gt;
* Dans ce fichier , écrivez juste une fonction du genre:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
/** 		Function called to complete substitution array (before generating on ODT, or a personalized email)&lt;br /&gt;
 * 		functions xxx_completesubstitutionarray are called by make_substitutions() if file&lt;br /&gt;
 * 		is inside directory htdocs/core/substitutions&lt;br /&gt;
 * &lt;br /&gt;
 *		@param	array		$substitutionarray	Array with substitution key=&amp;gt;val&lt;br /&gt;
 *		@param	Translate	$langs			Output langs&lt;br /&gt;
 *		@param	Object		$object			Object to use to get values&lt;br /&gt;
 * 		@return	void					The entry parameter $substitutionarray is modified&lt;br /&gt;
 */&lt;br /&gt;
function mymodule_completesubstitutionarray(&amp;amp;$substitutionarray,$langs,$object)&lt;br /&gt;
{&lt;br /&gt;
   global $conf,$db;&lt;br /&gt;
&lt;br /&gt;
   $myvalue=&#039;Put here calculated value to insert&#039;;&lt;br /&gt;
   $substitutionarray[&#039;myowntag&#039;]=$myvalue;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
La fonction sera appelée avant la génération du document afin de compléter le tableau des substitutions afin que le tag &#039;&#039;&#039;myowntag&#039;&#039;&#039; soit remplacé par la valeur définie dans &#039;&#039;&#039;$myvalue&#039;&#039;&#039;.&lt;br /&gt;
Vous pouvez ajouter autant de tag que désiré, et mettre le code que vous voulez pour définir les valeurs (recherche en base, en fichier, calcul, partir des variables reçues ou globales...).&lt;br /&gt;
&lt;br /&gt;
Attention: Le premier paramètre dans la déclaration de la fonction doit commencer par &amp;amp; car il est modifié par le code et doit être retourné modifié. &lt;br /&gt;
&lt;br /&gt;
Pour que vote votre fonction de substitution soit bien appelée, il vous faut:&lt;br /&gt;
* Vérifier que votre fichier de substitution est bien stocké dans le répertoire &#039;&#039;&#039;htdocs/mymodule/core/substitutions&#039;&#039;&#039;&lt;br /&gt;
* Créer un module (Voir la page [[Développement module]]) avec son fichier descripteur de module.&lt;br /&gt;
* Vérifier que le fichier descripteur de module contient une entrée pour déclarer qu&#039;il y a un fichier de substitution à appeler. Cette doit être &lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;module_parts = array(&#039;substitutions&#039; =&amp;gt; 1)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* Activer le module (un module doit être activé et désactivé pour prendre en compte les changement dans son fichier descripteur)&lt;br /&gt;
&lt;br /&gt;
=== Autres tags personnalisées pour les lignes ===&lt;br /&gt;
&lt;br /&gt;
Cette fonctionnalité est disponible depuis Dolibarr v3.3 (version de développement futur).&lt;br /&gt;
&lt;br /&gt;
De manière similaire au chapitre précédent, vous devez définir une fonction de la même façon mais avec quelques différences:&lt;br /&gt;
&lt;br /&gt;
* Créez ou modifiez le même fichier que précédemment (voir le chapitre précédent).&lt;br /&gt;
* Voici les différences: dans le fichier, écrire une autre fonction avec presque le même nom mais avec &#039;_lines&#039; en suffixe, et également ajouter une nouvelle variable $lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
/** 		Function called to complete substitution array for lines (before generating on ODT, or a personalized email)&lt;br /&gt;
 * 		functions xxx_completesubstitutionarray_lines are called by make_substitutions() if file&lt;br /&gt;
 * 		is inside directory htdocs/core/substitutions&lt;br /&gt;
 * &lt;br /&gt;
 *		@param	array		$substitutionarray	Array with substitution key=&amp;gt;val&lt;br /&gt;
 *		@param	Translate	$langs			Output langs&lt;br /&gt;
 *		@param	Object		$object			Object to use to get values&lt;br /&gt;
 *              @param  Object          $line                   Current line being processed, use this object to get values&lt;br /&gt;
 * 		@return	void					The entry parameter $substitutionarray is modified&lt;br /&gt;
 */&lt;br /&gt;
function mymodule_completesubstitutionarray_lines(&amp;amp;$substitutionarray,$langs,$object,$line) {&lt;br /&gt;
{&lt;br /&gt;
   global $conf,$db;&lt;br /&gt;
&lt;br /&gt;
   $myvalue=&#039;Put here calculated value to insert&#039;;&lt;br /&gt;
   $substitutionarray[&#039;myowntag&#039;]=$myvalue;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Contrairement à la fonction précédente qui n&#039;est jamais appelée qu&#039;une seule fois, cette fonction sera appelée à chaque fois qu&#039;une ligne de produit sera traitée, en vous donnant chaque fois un objet $line différent que vous pouvez traiter. Cela vous permet de faire des substitutions de tags différentes pour chaque produit.&lt;br /&gt;
&lt;br /&gt;
== Enregistrer votre document ==&lt;br /&gt;
Pour voir apparaitre votre modèle de document dans la liste des modèles disponibles, placer le dans le sous-répertoire adéquat qui se trouve dans le répertoire &#039;&#039;&#039;documents/doctemplates&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Esprit-libre</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cr%C3%A9er_un_mod%C3%A8le_de_document_ODT_ou_ODS&amp;diff=37113</id>
		<title>Créer un modèle de document ODT ou ODS</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cr%C3%A9er_un_mod%C3%A8le_de_document_ODT_ou_ODS&amp;diff=37113"/>
		<updated>2017-04-25T13:03:34Z</updated>

		<summary type="html">&lt;p&gt;Esprit-libre: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUtil}}&lt;br /&gt;
Cette page décrit comment construire un modèle de document ODT pour utiliser la génération de document ODT.&lt;br /&gt;
&lt;br /&gt;
Pour savoir comment générer un modèle de document PDF, voir la page [[Créer un modèle de document PDF]].&lt;br /&gt;
Créer un modèle PDF requiert des connaissances en programmation PHP mais pas la création de modèles ODT. &lt;br /&gt;
&lt;br /&gt;
== Prérequis ==&lt;br /&gt;
* Dolibarr: 3.1+&lt;br /&gt;
* OpenOffice: 3.2+, LibreOffice, ...&lt;br /&gt;
&lt;br /&gt;
== Créer votre document ==&lt;br /&gt;
* Créer un document OpenOffice ou LibreOffice en partant de rien ou en prenant un example fournis. Si vous partez d&#039;un exemple, vous les trouverez installés dans les sous-répertoires du répertoire &#039;&#039;&#039;documents/doctemplates&#039;&#039;&#039;&lt;br /&gt;
* Editer le document en utilisant toutes les fonctions de votre suite bureautique.&lt;br /&gt;
Incluer dans votre documents les tags des informations que vous voulez voir. Les tags seront remplacés automatiquement au moment de la génération du document par Dolibarr. La liste des tags disponibles est décrite dans le chapitre suivant.&lt;br /&gt;
&lt;br /&gt;
[[File:warning.png]] Attention, les tags sont entourés de {} ou [] pour les tableaux ou conditions (voir plus loin) et doivent être tapés d&#039;une traite sous la suite Office (sans retour arrière ou effacement, ni par copié-collé). Dans le cas contraire, la suite Office ajoutera des informations invisibles qui empêche le remplacement.&lt;br /&gt;
&lt;br /&gt;
== Tags ==&lt;br /&gt;
Voici la liste des tags qui seront remplacés par les informations appropriées:&lt;br /&gt;
&lt;br /&gt;
===Company/foundation information===&lt;br /&gt;
{{TagsOdtMyCompany}}&lt;br /&gt;
&lt;br /&gt;
===Customers, prospects or suppliers information===&lt;br /&gt;
{{TagsOdtThirdParty}}&lt;br /&gt;
&lt;br /&gt;
=== Information utilisateur ===&lt;br /&gt;
{{TagsOdtUser}}&lt;br /&gt;
&lt;br /&gt;
=== Autres informations ===&lt;br /&gt;
{{TagsOdtOther}}&lt;br /&gt;
&lt;br /&gt;
===Informations sur l&#039;objet (facture, proposition commerciale, commande, ...)===&lt;br /&gt;
{{TagsOdtObjects}}&lt;br /&gt;
&lt;br /&gt;
===Lignes des objets===&lt;br /&gt;
Voici comment utiliser les tableaux de lignes des objets (lignes de factures, commandes, etc...). Vous devez créer un tableau dans le document et utiliser une balise &amp;quot;begin&amp;quot; et &amp;quot;end&amp;quot; pour définir la ligne du tableau. Cette ligne sera répétée autant de fois que requis au moment de la génération.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[!-- BEGIN row.lines --]&lt;br /&gt;
...&lt;br /&gt;
[!-- END row.lines --]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ensuite, ajouter les tags de votre choix dans les lignes parmi ceux-ci:&lt;br /&gt;
{{TagsOdtLines}}&lt;br /&gt;
&lt;br /&gt;
Voici un exemple de ce que vous pourriez avoir dans votre traitement de texte:&lt;br /&gt;
[[File:Line for document generation.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Substitution conditionnelle ===&lt;br /&gt;
&lt;br /&gt;
Vous pouvez utiliser des &#039;&#039;&#039;remplacements conditionnels&#039;&#039;&#039;, ce qui en termes simples signifie que vous pouvez décider d&#039;imprimer quelque chose si une variable est vrai, ou imprimer autre chose si elle est fausse (ou rien du tout) - et cela marche non seulement avec du texte, mais aussi toute structure plus complexe comme les tableaux et les images.&lt;br /&gt;
&lt;br /&gt;
Exemple:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[!-- IF {my_var} --]&lt;br /&gt;
Print this text if {my_var} is true (can be any value but null/0/empty string)&lt;br /&gt;
[!-- ELSE {my_var} --]&lt;br /&gt;
Or print this if it&#039;s false (null/0/empty string)&lt;br /&gt;
[!-- ENDIF {my_var} --]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: le tag ELSE est bien sûr optionnel, vous pouvez sans problème juste utiliser un IF/ENDIF si vous préférez.&lt;br /&gt;
&lt;br /&gt;
ATTENTION: le format de cette balise spéciale est très précis et pointilleux, faire attention à &#039;&#039;&#039;mettre un seul espace&#039;&#039;&#039; entre:&lt;br /&gt;
* [!--&lt;br /&gt;
* IF/ELSE/ENDIF&lt;br /&gt;
* {my var}&lt;br /&gt;
* --]&lt;br /&gt;
&lt;br /&gt;
=== Autres tags personnalisés ===&lt;br /&gt;
Si vous voulez ajouter un champ de substitution non prédéfini, il y a une solution:&lt;br /&gt;
* Ajouter un fichier nommé &lt;br /&gt;
&#039;&#039;&#039;htdocs/monmodule/core/substitutions/functions_mymodule.lib.php&#039;&#039;&#039;&lt;br /&gt;
* Dans ce fichier , écrivez juste une fonction du genre:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
/** 		Function called to complete substitution array (before generating on ODT, or a personalized email)&lt;br /&gt;
 * 		functions xxx_completesubstitutionarray are called by make_substitutions() if file&lt;br /&gt;
 * 		is inside directory htdocs/core/substitutions&lt;br /&gt;
 * &lt;br /&gt;
 *		@param	array		$substitutionarray	Array with substitution key=&amp;gt;val&lt;br /&gt;
 *		@param	Translate	$langs			Output langs&lt;br /&gt;
 *		@param	Object		$object			Object to use to get values&lt;br /&gt;
 * 		@return	void					The entry parameter $substitutionarray is modified&lt;br /&gt;
 */&lt;br /&gt;
function mymodule_completesubstitutionarray(&amp;amp;$substitutionarray,$langs,$object)&lt;br /&gt;
{&lt;br /&gt;
   global $conf,$db;&lt;br /&gt;
&lt;br /&gt;
   $myvalue=&#039;Put here calculated value to insert&#039;;&lt;br /&gt;
   $substitutionarray[&#039;myowntag&#039;]=$myvalue;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
La fonction sera appelée avant la génération du document afin de compléter le tableau des substitutions afin que le tag &#039;&#039;&#039;myowntag&#039;&#039;&#039; soit remplacé par la valeur définie dans &#039;&#039;&#039;$myvalue&#039;&#039;&#039;.&lt;br /&gt;
Vous pouvez ajouter autant de tag que désiré, et mettre le code que vous voulez pour définir les valeurs (recherche en base, en fichier, calcul, partir des variables reçues ou globales...).&lt;br /&gt;
&lt;br /&gt;
Attention: Le premier paramètre dans la déclaration de la fonction doit commencer par &amp;amp; car il est modifié par le code et doit être retourné modifié. &lt;br /&gt;
&lt;br /&gt;
Pour que vote votre fonction de substitution soit bien appelée, il vous faut:&lt;br /&gt;
* Vérifier que votre fichier de substitution est bien stocké dans le répertoire &#039;&#039;&#039;htdocs/mymodule/core/substitutions&#039;&#039;&#039;&lt;br /&gt;
* Créer un module (Voir la page [[Développement module]]) avec son fichier descripteur de module.&lt;br /&gt;
* Vérifier que le fichier descripteur de module contient une entrée pour déclarer qu&#039;il y a un fichier de substitution à appeler. Cette doit être &lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;module_parts = array(&#039;substitutions&#039; =&amp;gt; 1)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* Activer le module (un module doit être activé et désactivé pour prendre en compte les changement dans son fichier descripteur)&lt;br /&gt;
&lt;br /&gt;
=== Autres tags personnalisées pour les lignes ===&lt;br /&gt;
&lt;br /&gt;
Cette fonctionnalité est disponible depuis Dolibarr v3.3 (version de développement futur).&lt;br /&gt;
&lt;br /&gt;
De manière similaire au chapitre précédent, vous devez définir une fonction de la même façon mais avec quelques différences:&lt;br /&gt;
&lt;br /&gt;
* Créez ou modifiez le même fichier que précédemment (voir le chapitre précédent).&lt;br /&gt;
* Voici les différences: dans le fichier, écrire une autre fonction avec presque le même nom mais avec &#039;_lines&#039; en suffixe, et également ajouter une nouvelle variable $lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
/** 		Function called to complete substitution array for lines (before generating on ODT, or a personalized email)&lt;br /&gt;
 * 		functions xxx_completesubstitutionarray_lines are called by make_substitutions() if file&lt;br /&gt;
 * 		is inside directory htdocs/core/substitutions&lt;br /&gt;
 * &lt;br /&gt;
 *		@param	array		$substitutionarray	Array with substitution key=&amp;gt;val&lt;br /&gt;
 *		@param	Translate	$langs			Output langs&lt;br /&gt;
 *		@param	Object		$object			Object to use to get values&lt;br /&gt;
 *              @param  Object          $line                   Current line being processed, use this object to get values&lt;br /&gt;
 * 		@return	void					The entry parameter $substitutionarray is modified&lt;br /&gt;
 */&lt;br /&gt;
function mymodule_completesubstitutionarray_lines(&amp;amp;$substitutionarray,$langs,$object,$line) {&lt;br /&gt;
{&lt;br /&gt;
   global $conf,$db;&lt;br /&gt;
&lt;br /&gt;
   $myvalue=&#039;Put here calculated value to insert&#039;;&lt;br /&gt;
   $substitutionarray[&#039;myowntag&#039;]=$myvalue;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Contrairement à la fonction précédente qui n&#039;est jamais appelée qu&#039;une seule fois, cette fonction sera appelée à chaque fois qu&#039;une ligne de produit sera traitée, en vous donnant chaque fois un objet $line différent que vous pouvez traiter. Cela vous permet de faire des substitutions de tags différentes pour chaque produit.&lt;br /&gt;
&lt;br /&gt;
== Enregistrer votre document ==&lt;br /&gt;
Pour voir apparaitre votre modèle de document dans la liste des modèles disponibles, placer le dans le sous-répertoire adéquat qui se trouve dans le répertoire &#039;&#039;&#039;documents/doctemplates&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Esprit-libre</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Template:TagsOdtLines&amp;diff=37112</id>
		<title>Template:TagsOdtLines</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Template:TagsOdtLines&amp;diff=37112"/>
		<updated>2017-04-25T12:05:50Z</updated>

		<summary type="html">&lt;p&gt;Esprit-libre: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
{line_fulldesc}&lt;br /&gt;
{line_product_ref}&lt;br /&gt;
{line_product_label}&lt;br /&gt;
{line_desc}&lt;br /&gt;
{line_vatrate}&lt;br /&gt;
{line_up}&lt;br /&gt;
{line_up_locale}&lt;br /&gt;
{line_qty}&lt;br /&gt;
{line_discount_percent}&lt;br /&gt;
{line_price_ht}&lt;br /&gt;
{line_price_ht_locale}&lt;br /&gt;
{line_price_vat}&lt;br /&gt;
{line_price_vat_locale}&lt;br /&gt;
{line_price_ttc}&lt;br /&gt;
{line_price_ttc_locale}&lt;br /&gt;
{line_date_start}&lt;br /&gt;
{line_date_start_rfc}&lt;br /&gt;
{line_date_end}&lt;br /&gt;
{line_date_end_rfc}&lt;br /&gt;
&lt;br /&gt;
Extra fields:&lt;br /&gt;
{line_options_xxx} : Value of extra field (where xxx is code of extra field)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Esprit-libre</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Cr%C3%A9er_un_mod%C3%A8le_de_document_ODT_ou_ODS&amp;diff=37111</id>
		<title>Créer un modèle de document ODT ou ODS</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Cr%C3%A9er_un_mod%C3%A8le_de_document_ODT_ou_ODS&amp;diff=37111"/>
		<updated>2017-04-25T12:05:22Z</updated>

		<summary type="html">&lt;p&gt;Esprit-libre: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUtil}}&lt;br /&gt;
Cette page décrit comment construire un modèle de document ODT pour utiliser la génération de document ODT.&lt;br /&gt;
&lt;br /&gt;
Pour savoir comment générer un modèle de document PDF, voir la page [[Créer un modèle de document PDF]].&lt;br /&gt;
Créer un modèle PDF requiert des connaissances en programmation PHP mais pas la création de modèles ODT. &lt;br /&gt;
&lt;br /&gt;
== Prérequis ==&lt;br /&gt;
* Dolibarr: 3.1+&lt;br /&gt;
* OpenOffice: 3.2+, LibreOffice, ...&lt;br /&gt;
&lt;br /&gt;
== Créer votre document ==&lt;br /&gt;
* Créer un document OpenOffice ou LibreOffice en partant de rien ou en prenant un example fournis. Si vous partez d&#039;un exemple, vous les trouverez installés dans les sous-répertoires du répertoire &#039;&#039;&#039;documents/doctemplates&#039;&#039;&#039;&lt;br /&gt;
* Editer le document en utilisant toutes les fonctions de votre suite bureautique.&lt;br /&gt;
Incluer dans votre documents les tags des informations que vous voulez voir. Les tags seront remplacés automatiquement au moment de la génération du document par Dolibarr. La liste des tags disponibles est décrite dans le chapitre suivant.&lt;br /&gt;
&lt;br /&gt;
[[File:warning.png]] Attention, les tags sont entourés de {} ou [] pour les tableaux ou conditions (voir plus loin) et doivent être tapés d&#039;une traite sous la suite Office (sans retour arrière ou effacement, ni par copié-collé). Dans le cas contraire, la suite Office ajoutera des informations invisibles qui empêche le remplacement.&lt;br /&gt;
&lt;br /&gt;
== Tags ==&lt;br /&gt;
Voici la liste des tags qui seront remplacés par les informations appropriées:&lt;br /&gt;
&lt;br /&gt;
===Company/foundation information===&lt;br /&gt;
{{TagsOdtMyCompany}}&lt;br /&gt;
&lt;br /&gt;
===Customers, prospects or suppliers information===&lt;br /&gt;
{{TagsOdtThirdParty}}&lt;br /&gt;
&lt;br /&gt;
=== Information utilisateur ===&lt;br /&gt;
{{TagsOdtUser}}&lt;br /&gt;
&lt;br /&gt;
=== Autres informations ===&lt;br /&gt;
{{TagsOdtOther}}&lt;br /&gt;
&lt;br /&gt;
===Informations sur l&#039;objet (facture, proposition commerciale, commande, ...)===&lt;br /&gt;
{{TagsOdtObjects}}&lt;br /&gt;
&lt;br /&gt;
===Lignes des objets===&lt;br /&gt;
Voici comment utiliser les tableaux de lignes des objets (lignes de factures, commandes, etc...). Vous devez créer un tableau dans le document et utiliser une balise &amp;quot;begin&amp;quot; et &amp;quot;end&amp;quot; pour définir la ligne du tableau. Cette ligne sera répétée autant de fois que requis au moment de la génération.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[!-- BEGIN row.lines --]&lt;br /&gt;
...&lt;br /&gt;
[!-- END row.lines --]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ensuite, ajouter les tags de votre choix dans les lignes parmi ceux-ci:&lt;br /&gt;
{{TagsOdtLines}}&lt;br /&gt;
&lt;br /&gt;
Voici un exemple de ce que vous pourriez avoir dans votre traitement de texte:&lt;br /&gt;
[[File:Line for document generation.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Substitution conditionnelle ===&lt;br /&gt;
&lt;br /&gt;
Vous pouvez utiliser des &#039;&#039;&#039;remplacements conditionnels&#039;&#039;&#039;, ce qui en termes simples signifie que vous pouvez décider d&#039;imprimer quelque chose si une variable est vrai, ou imprimer autre chose si elle est fausse (ou rien du tout) - et cela marche non seulement avec du texte, mais aussi toute structure plus complexe comme les tableaux et les images.&lt;br /&gt;
&lt;br /&gt;
Exemple:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[!-- IF {my_var} --]&lt;br /&gt;
Print this text if {my_var} is true (can be any value but null/0/empty string)&lt;br /&gt;
[!-- ELSE {my_var} --]&lt;br /&gt;
Or print this if it&#039;s false (null/0/empty string)&lt;br /&gt;
[!-- ENDIF {my_var} --]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: le tag ELSE est biensûr optionnel, vous pouvez sans problème juste utiliser un IF/ENDIF si vous préférez.&lt;br /&gt;
&lt;br /&gt;
ATTENTION: le format de cette balise spéciale est très précis et pointilleux, faire attention à &#039;&#039;&#039;mettre un seul espace&#039;&#039;&#039; entre:&lt;br /&gt;
* [!--&lt;br /&gt;
* IF/ELSE/ENDIF&lt;br /&gt;
* {my var}&lt;br /&gt;
* --]&lt;br /&gt;
&lt;br /&gt;
=== Autres tags personnalisés ===&lt;br /&gt;
Si vous voulez ajouter un champ de substitution non prédéfini, il y a une solution:&lt;br /&gt;
* Ajouter un fichier nommé &lt;br /&gt;
&#039;&#039;&#039;htdocs/monmodule/core/substitutions/functions_mymodule.lib.php&#039;&#039;&#039;&lt;br /&gt;
* Dans ce fichier , écrivez juste une fonction du genre:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
/** 		Function called to complete substitution array (before generating on ODT, or a personalized email)&lt;br /&gt;
 * 		functions xxx_completesubstitutionarray are called by make_substitutions() if file&lt;br /&gt;
 * 		is inside directory htdocs/core/substitutions&lt;br /&gt;
 * &lt;br /&gt;
 *		@param	array		$substitutionarray	Array with substitution key=&amp;gt;val&lt;br /&gt;
 *		@param	Translate	$langs			Output langs&lt;br /&gt;
 *		@param	Object		$object			Object to use to get values&lt;br /&gt;
 * 		@return	void					The entry parameter $substitutionarray is modified&lt;br /&gt;
 */&lt;br /&gt;
function mymodule_completesubstitutionarray(&amp;amp;$substitutionarray,$langs,$object)&lt;br /&gt;
{&lt;br /&gt;
   global $conf,$db;&lt;br /&gt;
&lt;br /&gt;
   $myvalue=&#039;Put here calculated value to insert&#039;;&lt;br /&gt;
   $substitutionarray[&#039;myowntag&#039;]=$myvalue;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
La fonction sera appelée avant la génération du document afin de compléter le tableau des substitutions afin que le tag &#039;&#039;&#039;myowntag&#039;&#039;&#039; soit remplacé par la valeur définie dans &#039;&#039;&#039;$myvalue&#039;&#039;&#039;.&lt;br /&gt;
Vous pouvez ajouter autant de tag que désiré, et mettre le code que vous voulez pour définir les valeurs (recherche en base, en fichier, calcul, partir des variables reçues ou globales...).&lt;br /&gt;
&lt;br /&gt;
Attention: Le premier paramètre dans la déclaration de la fonction doit commencer par &amp;amp; car il est modifié par le code et doit être retourné modifié. &lt;br /&gt;
&lt;br /&gt;
Pour que vote votre fonction de substitution soit bien appelée, il vous faut:&lt;br /&gt;
* Vérifier que votre fichier de substitution est bien stocké dans le répertoire &#039;&#039;&#039;htdocs/mymodule/core/substitutions&#039;&#039;&#039;&lt;br /&gt;
* Créer un module (Voir la page [[Développement module]]) avec son fichier descripteur de module.&lt;br /&gt;
* Vérifier que le fichier descripteur de module contient une entrée pour déclarer qu&#039;il y a un fichier de substitution à appeler. Cette doit être &lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$this-&amp;gt;module_parts = array(&#039;substitutions&#039; =&amp;gt; 1)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* Activer le module (un module doit être activé et désactivé pour prendre en compte les changement dans son fichier descripteur)&lt;br /&gt;
&lt;br /&gt;
=== Autres tags personnalisées pour les lignes ===&lt;br /&gt;
&lt;br /&gt;
Cette fonctionnalité est disponible depuis Dolibarr v3.3 (version de développement futur).&lt;br /&gt;
&lt;br /&gt;
De manière similaire au chapitre précédent, vous devez définir une fonction de la même façon mais avec quelques différences:&lt;br /&gt;
&lt;br /&gt;
* Créez ou modifiez le même fichier que précédemment (voir le chapitre précédent).&lt;br /&gt;
* Voici les différences: dans le fichier, écrire une autre fonction avec presque le même nom mais avec &#039;_lines&#039; en suffixe, et également ajouter une nouvelle variable $lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
/** 		Function called to complete substitution array for lines (before generating on ODT, or a personalized email)&lt;br /&gt;
 * 		functions xxx_completesubstitutionarray_lines are called by make_substitutions() if file&lt;br /&gt;
 * 		is inside directory htdocs/core/substitutions&lt;br /&gt;
 * &lt;br /&gt;
 *		@param	array		$substitutionarray	Array with substitution key=&amp;gt;val&lt;br /&gt;
 *		@param	Translate	$langs			Output langs&lt;br /&gt;
 *		@param	Object		$object			Object to use to get values&lt;br /&gt;
 *              @param  Object          $line                   Current line being processed, use this object to get values&lt;br /&gt;
 * 		@return	void					The entry parameter $substitutionarray is modified&lt;br /&gt;
 */&lt;br /&gt;
function mymodule_completesubstitutionarray_lines(&amp;amp;$substitutionarray,$langs,$object,$line) {&lt;br /&gt;
{&lt;br /&gt;
   global $conf,$db;&lt;br /&gt;
&lt;br /&gt;
   $myvalue=&#039;Put here calculated value to insert&#039;;&lt;br /&gt;
   $substitutionarray[&#039;myowntag&#039;]=$myvalue;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Contrairement à la fonction précédente qui n&#039;est jamais appelée qu&#039;une seule fois, cette fonction sera appelée à chaque fois qu&#039;une ligne de produit sera traitée, en vous donnant chaque fois un objet $line différent que vous pouvez traiter. Cela vous permet de faire des substitutions de tags différentes pour chaque produit.&lt;br /&gt;
&lt;br /&gt;
== Enregistrer votre document ==&lt;br /&gt;
Pour voir apparaitre votre modèle de document dans la liste des modèles disponibles, placer le dans le sous-répertoire adéquat qui se trouve dans le répertoire &#039;&#039;&#039;documents/doctemplates&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Esprit-libre</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Template:TagsOdtObjects&amp;diff=37050</id>
		<title>Template:TagsOdtObjects</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Template:TagsOdtObjects&amp;diff=37050"/>
		<updated>2017-04-10T06:50:05Z</updated>

		<summary type="html">&lt;p&gt;Esprit-libre: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
{object_id}&lt;br /&gt;
{object_ref}&lt;br /&gt;
{object_ref_customer}&lt;br /&gt;
{object_ref_supplier}&lt;br /&gt;
{object_date}&lt;br /&gt;
{object_date_creation}&lt;br /&gt;
{object_date_modification}&lt;br /&gt;
{object_date_validation}&lt;br /&gt;
{object_note_private}&lt;br /&gt;
{object_note_public}&lt;br /&gt;
or&lt;br /&gt;
{object_note}&lt;br /&gt;
&lt;br /&gt;
Amounts (numeric data):&lt;br /&gt;
{object_total_ht}&lt;br /&gt;
{object_total_vat}&lt;br /&gt;
{object_total_localtax1} (Dolibarr &amp;gt;= 3.5.0)&lt;br /&gt;
{object_total_localtax2} (Dolibarr &amp;gt;= 3.5.0)&lt;br /&gt;
{object_total_ttc}&lt;br /&gt;
{object_total_discount_ht}&lt;br /&gt;
{object_total_vat_x} (Dolibarr &amp;gt;= 3.5.0, is vat total for rate x. x can be for example 20, 8.5, 5.99 ...}&lt;br /&gt;
&lt;br /&gt;
Amounts (in output language format):&lt;br /&gt;
{object_total_ht_locale} (Dolibarr &amp;gt;= 3.5.0)&lt;br /&gt;
{object_total_vat_locale} (Dolibarr &amp;gt;= 3.5.0)&lt;br /&gt;
{object_total_localtax1_locale} (Dolibarr &amp;gt;= 3.5.0)&lt;br /&gt;
{object_total_localtax2_locale} (Dolibarr &amp;gt;= 3.5.0)&lt;br /&gt;
{object_total_ttc_locale} (Dolibarr &amp;gt;= 3.5.0)&lt;br /&gt;
{object_total_discount_ht_locale} (Dolibarr &amp;gt;= 3.5.0)&lt;br /&gt;
{object_total_vat_locale_x.x} (Dolibarr &amp;gt;= 3.6.0, is vat total for rate x. x can be for example 20.000, 8.500, 5.990 ...}&lt;br /&gt;
&lt;br /&gt;
Specific to proposals:&lt;br /&gt;
{object_date_end} : End date of validity of proposal&lt;br /&gt;
&lt;br /&gt;
Specific to order:&lt;br /&gt;
{object_date_delivery_planed}  (Dolibarr &amp;gt;= 3.4.0)&lt;br /&gt;
&lt;br /&gt;
Specific to invoices:&lt;br /&gt;
{object_date_limit}&lt;br /&gt;
{object_payment_mode}&lt;br /&gt;
{object_payment_term}&lt;br /&gt;
{object_source_invoice_ref}&lt;br /&gt;
{object_already_payed} : Amount already payed (numeric)&lt;br /&gt;
{object_remain_to_pay} : Remaining to pay amount (numeric)&lt;br /&gt;
{object_already_payed_locale} : Amount already payed (output language format)&lt;br /&gt;
{object_remain_to_pay_locale} : Remaining to pay amount (output language format)&lt;br /&gt;
&lt;br /&gt;
Extra fields:&lt;br /&gt;
{object_options_xxx} : Value of extra field (where xxx is code of extra field)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Esprit-libre</name></author>
	</entry>
</feed>