<?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=Egils</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=Egils"/>
	<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php/Special:Contributions/Egils"/>
	<updated>2026-10-22T02:57:25Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Web_Services_API_REST_(developer)&amp;diff=51532</id>
		<title>Module Web Services API REST (developer)</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Web_Services_API_REST_(developer)&amp;diff=51532"/>
		<updated>2021-06-30T19:28:24Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* Use */ sqlfilters example&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:Module_Web_Services_API_REST_(développeur)]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
{{TemplateModEN}}&lt;br /&gt;
[[Category:List of Modules]]&lt;br /&gt;
{{BasculeDevUserEn|&lt;br /&gt;
name=Web services|&lt;br /&gt;
num=2610|&lt;br /&gt;
devdoc=This page|&lt;br /&gt;
userdoc=Not applicable|}}&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;
= Function =&lt;br /&gt;
When enabling this module, you enable usage of web services provided by Dolibarr server. You can then make REST call of different web services provided by Dolibarr.&lt;br /&gt;
&lt;br /&gt;
= Dolibarr REST web services server =&lt;br /&gt;
Once module webservices REST is activated, Dolibarr become also a server of REST web services. So you can send your own REST request to relative URL&lt;br /&gt;
&#039;&#039;&#039;/api/index.php/xxx&#039;&#039;&#039; where xxx is name of the API to call.&lt;br /&gt;
&lt;br /&gt;
A list of APIs on your installation can be found via the explorer.&lt;br /&gt;
&lt;br /&gt;
==Apache setup==&lt;br /&gt;
There is nothing to do. If your Dolibarr is working with Apache, the REST API should also work. APIs will be served by the same virtual web server than your application.&lt;br /&gt;
&lt;br /&gt;
==Nginx setup==&lt;br /&gt;
Like Apache, if your Dolibarr is working inside a NGinx virtual host, you should have nothing to do to have your API working. APIs will be served by the same virtual web server than your application.&lt;br /&gt;
&lt;br /&gt;
However, NGinx default setup on a lot of distribution is often a gaz engine and you may experience troubles. If you experience suche troubles, you can try to edit your NGinx config file to match the following example. This is a simple localhost setup with a working REST API handling (tested with 9.0.1 on parabola gnu/linux).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxHighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
worker_processes  1;&lt;br /&gt;
error_log  /var/log/nginx/error.log;&lt;br /&gt;
&lt;br /&gt;
events {&lt;br /&gt;
    worker_connections  1024;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http {&lt;br /&gt;
    include       mime.types;&lt;br /&gt;
    default_type  application/octet-stream;&lt;br /&gt;
&lt;br /&gt;
    #log_format  main  &#039;$remote_addr - $remote_user [$time_local] &amp;quot;$request&amp;quot; &#039;&lt;br /&gt;
    #                  &#039;$status $body_bytes_sent &amp;quot;$http_referer&amp;quot; &#039;&lt;br /&gt;
    #                  &#039;&amp;quot;$http_user_agent&amp;quot; &amp;quot;$http_x_forwarded_for&amp;quot;&#039;;&lt;br /&gt;
&lt;br /&gt;
    #access_log  logs/access.log  main;&lt;br /&gt;
&lt;br /&gt;
    sendfile        on;&lt;br /&gt;
    #tcp_nopush     on;&lt;br /&gt;
&lt;br /&gt;
    #keepalive_timeout  0;&lt;br /&gt;
    keepalive_timeout  65;&lt;br /&gt;
&lt;br /&gt;
    #gzip  on;&lt;br /&gt;
&lt;br /&gt;
    server {&lt;br /&gt;
    	listen		80;&lt;br /&gt;
        server_name     dolibarr.localhost; # adjust to your domain&lt;br /&gt;
&lt;br /&gt;
        root    /usr/share/webapps/dolibarr/htdocs; # adjust to your path &lt;br /&gt;
        index   index.php;&lt;br /&gt;
&lt;br /&gt;
        # from https://github.com/Dolibarr/dolibarr/issues/6163#issuecomment-391265538&lt;br /&gt;
        location ~ [^/]\.php(/|$) {&lt;br /&gt;
            fastcgi_split_path_info ^(.+?\.php)(/.*)$;&lt;br /&gt;
            if (!-f $document_root$fastcgi_script_name) {&lt;br /&gt;
                return 404;&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            # Mitigate https://httpoxy.org/ vulnerabilities&lt;br /&gt;
            fastcgi_param HTTP_PROXY &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
            root           /usr/share/webapps/dolibarr/htdocs;&lt;br /&gt;
            fastcgi_pass   unix:/run/php-fpm/php-fpm.sock;&lt;br /&gt;
            fastcgi_index  index.php;&lt;br /&gt;
            include        fastcgi_params;&lt;br /&gt;
            fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;&lt;br /&gt;
            # Dolibarr Rest API path support&lt;br /&gt;
            fastcgi_param  PATH_INFO       $fastcgi_path_info;&lt;br /&gt;
            fastcgi_param  PATH_TRANSLATED $document_root$fastcgi_script_name;&lt;br /&gt;
        }&lt;br /&gt;
     }		&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxHighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= List of provided services =&lt;br /&gt;
Only few services are available. Starting to Dolibarr 5.0 version, you can see full list of Dolibarr Web services provided, by calling the explorer here at address:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;http://yourdolibarrurl/api/index.php/explorer&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You must first make the first call to the &#039;&#039;&#039;login&#039;&#039;&#039; api to get the API key.&lt;br /&gt;
Then enter api key to get list of all other available API services.&lt;br /&gt;
&lt;br /&gt;
For example, you can try the explorer on the demo instance at:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;https://demo.dolibarr.org/api/index.php/explorer&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You must first make the first call to the &#039;&#039;&#039;login&#039;&#039;&#039; api to get the API key.&lt;br /&gt;
Then enter api key to get list of all other available API services.&lt;br /&gt;
&lt;br /&gt;
You can then test directly from this explorer any API. This is the recommended solution to test any Dolibarr API since any API and parameters is documented here. As a result of any test, you will get the answer but also example on how to call the API from command line using &#039;&#039;&#039;curl&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
To install, open the modules page and activate de API REST module. On the configuration page of the module, there&#039;s a link to an explorer. Click on it to open the API explorer.&lt;br /&gt;
&lt;br /&gt;
On the top right corner, paste the &amp;lt;token&amp;gt; of the user you want to use to call the API and click the &amp;quot;explore&amp;quot; button. Note: The token of each user can be defined on the user record page. &lt;br /&gt;
&lt;br /&gt;
After clicking on &amp;quot;Explore&amp;quot;, you should see all the actions available with this token. If you don&#039;t have a lot of actions, it&#039;s probably because the according modules are not activated. If you want to see the invoices, you have to activate the invoice module in the configuration of Dolibarr. Same for products, third parties and so on.&lt;br /&gt;
&lt;br /&gt;
On this exploration page of the API, you can do quite a lot of tests. Reading datas from Dolibarr and writing, modifying and deleting as well. Warning: Data are really modified in your database.&lt;br /&gt;
&lt;br /&gt;
= Use =&lt;br /&gt;
&lt;br /&gt;
To use the REST API,  you have to call an url such as this one : &amp;lt;nowiki&amp;gt;http://&amp;lt;my_server&amp;gt;/api/index.php/&amp;lt;action&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
with one of the 4 following methods : GET, POST, PUT, DELETE, replacing &amp;lt;action&amp;gt; by the action you want to use. Ex : &amp;lt;nowiki&amp;gt;http://&amp;lt;my_server&amp;gt;/api/index.php/invoices&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There&#039;s different ways to do so. Here&#039;s a piece of code but you can also use libraries such as phphttpclient.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxHighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Example of function to call a REST API&lt;br /&gt;
function callAPI($method, $apikey, $url, $data = false)&lt;br /&gt;
{&lt;br /&gt;
    $curl = curl_init();&lt;br /&gt;
    $httpheader = [&#039;DOLAPIKEY: &#039;.$apikey];&lt;br /&gt;
&lt;br /&gt;
    switch ($method)&lt;br /&gt;
    {&lt;br /&gt;
        case &amp;quot;POST&amp;quot;:&lt;br /&gt;
            curl_setopt($curl, CURLOPT_POST, 1);&lt;br /&gt;
            $httpheader[] = &amp;quot;Content-Type:application/json&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
            if ($data)&lt;br /&gt;
                curl_setopt($curl, CURLOPT_POSTFIELDS, $data);&lt;br /&gt;
&lt;br /&gt;
            break;&lt;br /&gt;
        case &amp;quot;PUT&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
	    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, &#039;PUT&#039;);&lt;br /&gt;
            $httpheader[] = &amp;quot;Content-Type:application/json&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
            if ($data)&lt;br /&gt;
                curl_setopt($curl, CURLOPT_POSTFIELDS, $data);&lt;br /&gt;
&lt;br /&gt;
            break;&lt;br /&gt;
        default:&lt;br /&gt;
            if ($data)&lt;br /&gt;
                $url = sprintf(&amp;quot;%s?%s&amp;quot;, $url, http_build_query($data));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Optional Authentication:&lt;br /&gt;
    //    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);&lt;br /&gt;
    //    curl_setopt($curl, CURLOPT_USERPWD, &amp;quot;username:password&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    curl_setopt($curl, CURLOPT_URL, $url);&lt;br /&gt;
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    curl_setopt($curl, CURLOPT_HTTPHEADER, $httpheader);&lt;br /&gt;
&lt;br /&gt;
    $result = curl_exec($curl);&lt;br /&gt;
&lt;br /&gt;
    curl_close($curl);&lt;br /&gt;
&lt;br /&gt;
    return $result;&lt;br /&gt;
}&amp;lt;/syntaxHighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is just a working example. There&#039;s no error control and security was not in mind but you can use this code, modify it to suit your needs&amp;lt;br/&amp;gt;&lt;br /&gt;
The fonction has 4 parameters :&lt;br /&gt;
* $method : string, &amp;quot;GET&amp;quot;, &amp;quot;POST&amp;quot;, &amp;quot;PUT&amp;quot;, &amp;quot;DELETE&amp;quot;&lt;br /&gt;
* $apikey : string, &amp;quot;your &amp;lt;token&amp;gt; generated earlier&amp;quot;&lt;br /&gt;
* $url : string, url to call. Ex : &amp;quot;&amp;lt;nowiki&amp;gt;http://&amp;lt;my_server&amp;gt;/api/index.php/invoices&amp;lt;/nowiki&amp;gt;&amp;quot;&lt;br /&gt;
* $data : string, datas in json format. This parameter is not mandatory.&lt;br /&gt;
&lt;br /&gt;
==Accepted parameters==&lt;br /&gt;
This is documented somewhat in the REST Explorer. Check that first. Second try and see what response you get. Third look at the source code for the given API.&lt;br /&gt;
&lt;br /&gt;
=== sqlfilters ===&lt;br /&gt;
They are passed on to the database after a check.&lt;br /&gt;
These work on the product endpoint:&lt;br /&gt;
* (t.fk_product_type: = :&#039;0&#039;) and (t.tosell: = :&#039;1&#039;) and (t.label: ilike :&#039;%string&#039;)&lt;br /&gt;
&lt;br /&gt;
==Date==&lt;br /&gt;
The ISO date format is accepted: %Y-%m-%d e.g. 2020-07-14. yymmdd is not accepted.&lt;br /&gt;
&lt;br /&gt;
= Examples with PHP =&lt;br /&gt;
&lt;br /&gt;
This is more examples, for different uses cases:&lt;br /&gt;
&lt;br /&gt;
In every examples, we have:&lt;br /&gt;
* $apiKey = &amp;quot;&amp;lt;my token&amp;gt;&amp;quot;;&lt;br /&gt;
* $apiUrl = &amp;quot;&amp;lt;nowiki&amp;gt;http://&amp;lt;my_server&amp;gt;/api/index.php/&amp;lt;/nowiki&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxHighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Retrieve products list&lt;br /&gt;
	$listProduits = [];&lt;br /&gt;
	$produitParam = [&amp;quot;limit&amp;quot; =&amp;gt; 10000, &amp;quot;sortfield&amp;quot; =&amp;gt; &amp;quot;rowid&amp;quot;];&lt;br /&gt;
	$listProduitsResult = CallAPI(&amp;quot;GET&amp;quot;, $apiKey, $apiUrl.&amp;quot;products&amp;quot;, $produitParam);&lt;br /&gt;
	$listProduitsResult = json_decode($listProduitsResult, true);&lt;br /&gt;
&lt;br /&gt;
	if (isset($listProduitsResult[&amp;quot;error&amp;quot;]) &amp;amp;&amp;amp; $listProduitsResult[&amp;quot;error&amp;quot;][&amp;quot;code&amp;quot;] &amp;gt;= &amp;quot;300&amp;quot;) {&lt;br /&gt;
	} else {&lt;br /&gt;
		foreach ($listProduitsResult as $produit) {&lt;br /&gt;
			$listProduits[intval($produit[&amp;quot;id&amp;quot;])] = html_entity_decode($produit[&amp;quot;ref&amp;quot;], ENT_QUOTES);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/syntaxHighlight&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* I retrieve the 10&#039;000 first products sorted on their ID in the base&lt;br /&gt;
* html_entity_decode is necessary as single quotes are encoded&lt;br /&gt;
* It&#039;s easy to use the same method (replacing products with dictionnarycountries) to retrieve the list of countries and their ID&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxHighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Create a product&lt;br /&gt;
	$ref = &amp;quot;my_product_ref_X203ZZ&amp;quot;;&lt;br /&gt;
	$newProduct = [&lt;br /&gt;
		&amp;quot;ref&amp;quot;	=&amp;gt; $ref,&lt;br /&gt;
		&amp;quot;label&amp;quot;	=&amp;gt; $ref&lt;br /&gt;
	];&lt;br /&gt;
	$newProductResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;products&amp;quot;, json_encode($newProduct));&lt;br /&gt;
	$newProductResult = json_decode($newProductResult, true);&lt;br /&gt;
&amp;lt;/syntaxHighlight&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* before creating a product, it could be wise to check if it exists. Using my first example, you&#039;ll have  :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxHighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// my ref&lt;br /&gt;
	$ref = &amp;quot;my_product_ref_X203ZZ&amp;quot;;&lt;br /&gt;
// does it exist in my array&lt;br /&gt;
	$produitKey = array_search($ref, $listProduits);&lt;br /&gt;
	if ($produitKey) {&lt;br /&gt;
// yes&lt;br /&gt;
		$fk_product = $produitKey;&lt;br /&gt;
	} else {&lt;br /&gt;
// no&lt;br /&gt;
// Create the product&lt;br /&gt;
		$newProduct = [&lt;br /&gt;
			&amp;quot;ref&amp;quot;	=&amp;gt; $ref,&lt;br /&gt;
			&amp;quot;label&amp;quot;	=&amp;gt; $ref&lt;br /&gt;
		];&lt;br /&gt;
		$newProductResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;products&amp;quot;, json_encode($newProduct));&lt;br /&gt;
		$newProductResult = json_decode($newProductResult, true);&lt;br /&gt;
		if (isset($newProductResult[&amp;quot;error&amp;quot;]) &amp;amp;&amp;amp; $newProductResult[&amp;quot;error&amp;quot;][&amp;quot;code&amp;quot;] &amp;gt;= &amp;quot;300&amp;quot;) {&lt;br /&gt;
// there&#039;s been an error&lt;br /&gt;
			echo &amp;quot;&amp;lt;pre&amp;gt;ERROR&amp;quot;, var_dump($newProductResult), &amp;quot;&amp;lt;/pre&amp;gt;&amp;quot;;&lt;br /&gt;
			exit;&lt;br /&gt;
		} else {&lt;br /&gt;
// everything good&lt;br /&gt;
			$fk_product = $newProductResult;&lt;br /&gt;
			$listProduits[$fk_product] = $ref;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/syntaxHighlight&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* I check if the ref of my product exist in the array created in the first example.&lt;br /&gt;
* If it exists, I use it&#039;s key in the array as ID&lt;br /&gt;
* If it doesn&#039;t exist, I create the product, then I add it to my array for next time then I use the ID created&lt;br /&gt;
* I choose this method to do less API calls when I have to import 500 orders. I just need to retrieve the products list once at the beginning instead of searching Dolibarr each time.&lt;br /&gt;
&lt;br /&gt;
Warning: The example below is not working properly. Creating an order and lines in one go is not supported. Instead you have to create an order first and with the returned order id add the lines using the /orders/{id}/lines endpoint. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxHighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// create an order with 2 products&lt;br /&gt;
&lt;br /&gt;
// The array where there will be all the products lines of my order.&lt;br /&gt;
	$newCommandeLine = [];&lt;br /&gt;
&lt;br /&gt;
// product 1&lt;br /&gt;
	$ref1 = &amp;quot;my_product_ref_X203ZZ&amp;quot;;&lt;br /&gt;
	$prix1 = 10;&lt;br /&gt;
	$qtt1  = 100;&lt;br /&gt;
	$tva1 = 20;&lt;br /&gt;
	$fk_product1&lt;br /&gt;
// product 2&lt;br /&gt;
	$ref2 = &amp;quot;my_product_ref_B707FD&amp;quot;;&lt;br /&gt;
	$prix2 = 13;&lt;br /&gt;
	$qtt2  = 37;&lt;br /&gt;
	$tva2 = 20;&lt;br /&gt;
&lt;br /&gt;
	$newCommandeLine[] = [&lt;br /&gt;
		&amp;quot;desc&amp;quot;		=&amp;gt; $ref1,&lt;br /&gt;
		&amp;quot;subprice&amp;quot;	=&amp;gt; $prix1,&lt;br /&gt;
		&amp;quot;qty&amp;quot;		=&amp;gt; $qtt1,&lt;br /&gt;
		&amp;quot;tva_tx&amp;quot;	=&amp;gt; floatval($tva1),&lt;br /&gt;
		&amp;quot;fk_product&amp;quot;=&amp;gt; $fk_product1&lt;br /&gt;
	];&lt;br /&gt;
&lt;br /&gt;
	$newCommandeLine[] = [&lt;br /&gt;
		&amp;quot;desc&amp;quot;		=&amp;gt; $ref2,&lt;br /&gt;
		&amp;quot;subprice&amp;quot;	=&amp;gt; $prix2,&lt;br /&gt;
		&amp;quot;qty&amp;quot;		=&amp;gt; $qtt2,&lt;br /&gt;
		&amp;quot;tva_tx&amp;quot;	=&amp;gt; floatval($tva2),&lt;br /&gt;
		&amp;quot;fk_product&amp;quot;=&amp;gt; $fk_product2&lt;br /&gt;
	];&lt;br /&gt;
&lt;br /&gt;
	if (count($newCommandeLine) &amp;gt; 0) {&lt;br /&gt;
		$newCommande = [&lt;br /&gt;
			&amp;quot;socid&amp;quot;			=&amp;gt; $clientDoliId,&lt;br /&gt;
			&amp;quot;type&amp;quot; 			=&amp;gt; &amp;quot;0&amp;quot;,&lt;br /&gt;
			&amp;quot;lines&amp;quot;			=&amp;gt; $newCommandeLine,&lt;br /&gt;
			&amp;quot;note_private&amp;quot;	=&amp;gt; &amp;quot;order created automatically with API&amp;quot;,&lt;br /&gt;
		];&lt;br /&gt;
		$newCommandeResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;orders&amp;quot;, json_encode($newCommande));&lt;br /&gt;
		$newCommandeResult = json_decode($newCommandeResult, true);&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/syntaxHighlight&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* $clientDoliId is the ID of the customer in the Dolibarr database. Either you know it or you can search for it before&lt;br /&gt;
* type =&amp;gt; 0, This is a customer order (while 1 = supplier order)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxHighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Validate an order &lt;br /&gt;
	$newCommandeValider = [&lt;br /&gt;
		&amp;quot;idwarehouse&amp;quot;	=&amp;gt; &amp;quot;0&amp;quot;,&lt;br /&gt;
		&amp;quot;notrigger&amp;quot;		=&amp;gt; &amp;quot;0&amp;quot;&lt;br /&gt;
	];&lt;br /&gt;
	$newCommandeValiderResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;orders/&amp;quot;.$newCommandeResult.&amp;quot;/validate&amp;quot;, json_encode($newCommandeValider));&lt;br /&gt;
	$newCommandeValiderResult = json_decode($newCommandeValiderResult, true);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxHighlight&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* in this example, on the penultimate line, we can see : $apiUrl.&amp;quot;orders/&amp;quot;.$newCommandeResult.&amp;quot;/validate&amp;quot;.&amp;lt;br/&amp;gt;&lt;br /&gt;
$newCommandeResult is the ID of the order created in the previous example&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxHighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// search in the database if a customer exist&lt;br /&gt;
	$customer_name = &amp;quot;Acme Inc&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	$clientSearch = json_decode(CallAPI(&amp;quot;GET&amp;quot;, $apiKey, $apiUrl.&amp;quot;thirdparties&amp;quot;, array(&lt;br /&gt;
		&amp;quot;sortfield&amp;quot; =&amp;gt; &amp;quot;t.rowid&amp;quot;, &lt;br /&gt;
		&amp;quot;sortorder&amp;quot; =&amp;gt; &amp;quot;ASC&amp;quot;, &lt;br /&gt;
		&amp;quot;limit&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &lt;br /&gt;
		&amp;quot;mode&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;,&lt;br /&gt;
		&amp;quot;sqlfilters&amp;quot; =&amp;gt; &amp;quot;(t.nom:=:&#039;&amp;quot;.$customer_name.&amp;quot;&#039;)&amp;quot;&lt;br /&gt;
		)&lt;br /&gt;
	), true);&lt;br /&gt;
&amp;lt;/syntaxHighlight&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* limit =&amp;gt; 1 only 1 customer&lt;br /&gt;
* mode =&amp;gt; 1 we are looking for a customer, not a supplier (they are thirdparties too but with a different status)&lt;br /&gt;
* sqlfilters a bit special but there are more examples on the explorer page&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxHighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// customer doesn&#039;t exist. Let&#039;s create it and get it&#039;s ID&lt;br /&gt;
	$newClient = [&lt;br /&gt;
		&amp;quot;name&amp;quot; 			=&amp;gt; &amp;quot;customer company name&amp;quot;,&lt;br /&gt;
		&amp;quot;email&amp;quot;			=&amp;gt; &amp;quot;customer company email&amp;quot;,&lt;br /&gt;
		&amp;quot;client&amp;quot; 		=&amp;gt; &amp;quot;1&amp;quot;,&lt;br /&gt;
		&amp;quot;code_client&amp;quot;	=&amp;gt; &amp;quot;-1&amp;quot;&lt;br /&gt;
	];&lt;br /&gt;
	$newClientResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;thirdparties&amp;quot;, json_encode($newClient));&lt;br /&gt;
	$newClientResult = json_decode($newClientResult, true);&lt;br /&gt;
	$clientDoliId = $newClientResult;&lt;br /&gt;
&amp;lt;/syntaxHighlight&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* client =&amp;gt; 1 He is a customer (not a supplier)&lt;br /&gt;
* code_client =&amp;gt; -1 so the customer code will be generated automatically.&lt;br /&gt;
* we get the customer ID in $clientDoliId&lt;br /&gt;
&lt;br /&gt;
= Examples with Python =&lt;br /&gt;
See https://pypi.org/project/dolipy/ and https://pypi.org/project/dolibarr/&lt;br /&gt;
&lt;br /&gt;
= Develop your own service / API =&lt;br /&gt;
Adding a new REST service is as easy than adding a file called &#039;&#039;&#039;api_mymoduleobject.class.php&#039;&#039;&#039; into the directory &#039;&#039;&#039;htdocs/mymodule/class&#039;&#039;&#039;.&lt;br /&gt;
You take the example into &#039;&#039;&#039;htdocs/commande/class/api_orders.class.php&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that if you use the &#039;&#039;&#039;modulebuilder&#039;&#039;&#039; tool, the file may be generated for you.&lt;br /&gt;
&lt;br /&gt;
The framework detects automatically the API and it should be visible into the explorer.&lt;br /&gt;
&lt;br /&gt;
Method and parameters are detected according to introspection done into PHP class of the object (&#039;&#039;&#039;htdocs/mymodule/class/object.class.php&#039;&#039;&#039;) using the &#039;&#039;&#039;annotations&#039;&#039;&#039; found into the class.&lt;br /&gt;
For a documentation about annotation: https://github.com/Luracast/Restler/blob/master/ANNOTATIONS.md&lt;br /&gt;
&lt;br /&gt;
These are just the basics.&lt;br /&gt;
&lt;br /&gt;
Some more informations in the Dolibarr code. You can look here : htdocs/&amp;lt;directory&amp;gt;/class/api_xxx_class.php&amp;lt;br/&amp;gt;&lt;br /&gt;
Ex : htdocs/societe/class/api_thirdparties.class.php for thirdparties.&amp;lt;br/&amp;gt;&lt;br /&gt;
Ex : Invoices are in htdocs/compta/facture/class&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Web_Services_API_REST_(developer)&amp;diff=51524</id>
		<title>Module Web Services API REST (developer)</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Web_Services_API_REST_(developer)&amp;diff=51524"/>
		<updated>2021-06-30T11:04:49Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* Examples with Python */ new section&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:Module_Web_Services_API_REST_(développeur)]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
{{TemplateModEN}}&lt;br /&gt;
[[Category:List of Modules]]&lt;br /&gt;
{{BasculeDevUserEn|&lt;br /&gt;
name=Web services|&lt;br /&gt;
num=2610|&lt;br /&gt;
devdoc=This page|&lt;br /&gt;
userdoc=Not applicable|}}&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;
= Function =&lt;br /&gt;
When enabling this module, you enable usage of web services provided by Dolibarr server. You can then make REST call of different web services provided by Dolibarr.&lt;br /&gt;
&lt;br /&gt;
= Dolibarr REST web services server =&lt;br /&gt;
Once module webservices REST is activated, Dolibarr become also a server of REST web services. So you can send your own REST request to relative URL&lt;br /&gt;
&#039;&#039;&#039;/api/index.php/xxx&#039;&#039;&#039; where xxx is name of the API to call.&lt;br /&gt;
&lt;br /&gt;
A list of APIs on your installation can be found via the explorer.&lt;br /&gt;
&lt;br /&gt;
==Apache setup==&lt;br /&gt;
There is nothing to do. If your Dolibarr is working with Apache, the REST API should also work. APIs will be served by the same virtual web server than your application.&lt;br /&gt;
&lt;br /&gt;
==Nginx setup==&lt;br /&gt;
Like Apache, if your Dolibarr is working inside a NGinx virtual host, you should have nothing to do to have your API working. APIs will be served by the same virtual web server than your application.&lt;br /&gt;
&lt;br /&gt;
However, NGinx default setup on a lot of distribution is often a gaz engine and you may experience troubles. If you experience suche troubles, you can try to edit your NGinx config file to match the following example. This is a simple localhost setup with a working REST API handling (tested with 9.0.1 on parabola gnu/linux).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxHighlight lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
worker_processes  1;&lt;br /&gt;
error_log  /var/log/nginx/error.log;&lt;br /&gt;
&lt;br /&gt;
events {&lt;br /&gt;
    worker_connections  1024;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http {&lt;br /&gt;
    include       mime.types;&lt;br /&gt;
    default_type  application/octet-stream;&lt;br /&gt;
&lt;br /&gt;
    #log_format  main  &#039;$remote_addr - $remote_user [$time_local] &amp;quot;$request&amp;quot; &#039;&lt;br /&gt;
    #                  &#039;$status $body_bytes_sent &amp;quot;$http_referer&amp;quot; &#039;&lt;br /&gt;
    #                  &#039;&amp;quot;$http_user_agent&amp;quot; &amp;quot;$http_x_forwarded_for&amp;quot;&#039;;&lt;br /&gt;
&lt;br /&gt;
    #access_log  logs/access.log  main;&lt;br /&gt;
&lt;br /&gt;
    sendfile        on;&lt;br /&gt;
    #tcp_nopush     on;&lt;br /&gt;
&lt;br /&gt;
    #keepalive_timeout  0;&lt;br /&gt;
    keepalive_timeout  65;&lt;br /&gt;
&lt;br /&gt;
    #gzip  on;&lt;br /&gt;
&lt;br /&gt;
    server {&lt;br /&gt;
    	listen		80;&lt;br /&gt;
        server_name     dolibarr.localhost; # adjust to your domain&lt;br /&gt;
&lt;br /&gt;
        root    /usr/share/webapps/dolibarr/htdocs; # adjust to your path &lt;br /&gt;
        index   index.php;&lt;br /&gt;
&lt;br /&gt;
        # from https://github.com/Dolibarr/dolibarr/issues/6163#issuecomment-391265538&lt;br /&gt;
        location ~ [^/]\.php(/|$) {&lt;br /&gt;
            fastcgi_split_path_info ^(.+?\.php)(/.*)$;&lt;br /&gt;
            if (!-f $document_root$fastcgi_script_name) {&lt;br /&gt;
                return 404;&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            # Mitigate https://httpoxy.org/ vulnerabilities&lt;br /&gt;
            fastcgi_param HTTP_PROXY &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
            root           /usr/share/webapps/dolibarr/htdocs;&lt;br /&gt;
            fastcgi_pass   unix:/run/php-fpm/php-fpm.sock;&lt;br /&gt;
            fastcgi_index  index.php;&lt;br /&gt;
            include        fastcgi_params;&lt;br /&gt;
            fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;&lt;br /&gt;
            # Dolibarr Rest API path support&lt;br /&gt;
            fastcgi_param  PATH_INFO       $fastcgi_path_info;&lt;br /&gt;
            fastcgi_param  PATH_TRANSLATED $document_root$fastcgi_script_name;&lt;br /&gt;
        }&lt;br /&gt;
     }		&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxHighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= List of provided services =&lt;br /&gt;
Only few services are available. Starting to Dolibarr 5.0 version, you can see full list of Dolibarr Web services provided, by calling the explorer here at address:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;http://yourdolibarrurl/api/index.php/explorer&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You must first make the first call to the &#039;&#039;&#039;login&#039;&#039;&#039; api to get the API key.&lt;br /&gt;
Then enter api key to get list of all other available API services.&lt;br /&gt;
&lt;br /&gt;
For example, you can try the explorer on the demo instance at:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;https://demo.dolibarr.org/api/index.php/explorer&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You must first make the first call to the &#039;&#039;&#039;login&#039;&#039;&#039; api to get the API key.&lt;br /&gt;
Then enter api key to get list of all other available API services.&lt;br /&gt;
&lt;br /&gt;
You can then test directly from this explorer any API. This is the recommended solution to test any Dolibarr API since any API and parameters is documented here. As a result of any test, you will get the answer but also example on how to call the API from command line using &#039;&#039;&#039;curl&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
To install, open the modules page and activate de API REST module. On the configuration page of the module, there&#039;s a link to an explorer. Click on it to open the API explorer.&lt;br /&gt;
&lt;br /&gt;
On the top right corner, paste the &amp;lt;token&amp;gt; of the user you want to use to call the API and click the &amp;quot;explore&amp;quot; button. Note: The token of each user can be defined on the user record page. &lt;br /&gt;
&lt;br /&gt;
After clicking on &amp;quot;Explore&amp;quot;, you should see all the actions available with this token. If you don&#039;t have a lot of actions, it&#039;s probably because the according modules are not activated. If you want to see the invoices, you have to activate the invoice module in the configuration of Dolibarr. Same for products, third parties and so on.&lt;br /&gt;
&lt;br /&gt;
On this exploration page of the API, you can do quite a lot of tests. Reading datas from Dolibarr and writing, modifying and deleting as well. Warning: Data are really modified in your database.&lt;br /&gt;
&lt;br /&gt;
= Use =&lt;br /&gt;
&lt;br /&gt;
To use the REST API,  you have to call an url such as this one : &amp;lt;nowiki&amp;gt;http://&amp;lt;my_server&amp;gt;/api/index.php/&amp;lt;action&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
with one of the 4 following methods : GET, POST, PUT, DELETE, replacing &amp;lt;action&amp;gt; by the action you want to use. Ex : &amp;lt;nowiki&amp;gt;http://&amp;lt;my_server&amp;gt;/api/index.php/invoices&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There&#039;s different ways to do so. Here&#039;s a piece of code but you can also use libraries such as phphttpclient.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxHighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Example of function to call a REST API&lt;br /&gt;
function callAPI($method, $apikey, $url, $data = false)&lt;br /&gt;
{&lt;br /&gt;
    $curl = curl_init();&lt;br /&gt;
    $httpheader = [&#039;DOLAPIKEY: &#039;.$apikey];&lt;br /&gt;
&lt;br /&gt;
    switch ($method)&lt;br /&gt;
    {&lt;br /&gt;
        case &amp;quot;POST&amp;quot;:&lt;br /&gt;
            curl_setopt($curl, CURLOPT_POST, 1);&lt;br /&gt;
            $httpheader[] = &amp;quot;Content-Type:application/json&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
            if ($data)&lt;br /&gt;
                curl_setopt($curl, CURLOPT_POSTFIELDS, $data);&lt;br /&gt;
&lt;br /&gt;
            break;&lt;br /&gt;
        case &amp;quot;PUT&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
	    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, &#039;PUT&#039;);&lt;br /&gt;
            $httpheader[] = &amp;quot;Content-Type:application/json&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
            if ($data)&lt;br /&gt;
                curl_setopt($curl, CURLOPT_POSTFIELDS, $data);&lt;br /&gt;
&lt;br /&gt;
            break;&lt;br /&gt;
        default:&lt;br /&gt;
            if ($data)&lt;br /&gt;
                $url = sprintf(&amp;quot;%s?%s&amp;quot;, $url, http_build_query($data));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Optional Authentication:&lt;br /&gt;
    //    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);&lt;br /&gt;
    //    curl_setopt($curl, CURLOPT_USERPWD, &amp;quot;username:password&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    curl_setopt($curl, CURLOPT_URL, $url);&lt;br /&gt;
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    curl_setopt($curl, CURLOPT_HTTPHEADER, $httpheader);&lt;br /&gt;
&lt;br /&gt;
    $result = curl_exec($curl);&lt;br /&gt;
&lt;br /&gt;
    curl_close($curl);&lt;br /&gt;
&lt;br /&gt;
    return $result;&lt;br /&gt;
}&amp;lt;/syntaxHighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is just a working example. There&#039;s no error control and security was not in mind but you can use this code, modify it to suit your needs&amp;lt;br/&amp;gt;&lt;br /&gt;
The fonction has 4 parameters :&lt;br /&gt;
* $method : string, &amp;quot;GET&amp;quot;, &amp;quot;POST&amp;quot;, &amp;quot;PUT&amp;quot;, &amp;quot;DELETE&amp;quot;&lt;br /&gt;
* $apikey : string, &amp;quot;your &amp;lt;token&amp;gt; generated earlier&amp;quot;&lt;br /&gt;
* $url : string, url to call. Ex : &amp;quot;&amp;lt;nowiki&amp;gt;http://&amp;lt;my_server&amp;gt;/api/index.php/invoices&amp;lt;/nowiki&amp;gt;&amp;quot;&lt;br /&gt;
* $data : string, datas in json format. This parameter is not mandatory.&lt;br /&gt;
&lt;br /&gt;
==Accepted parameters==&lt;br /&gt;
This is documented somewhat in the REST Explorer. Check that first. Second try and see what response you get. Third look at the source code for the given API.&lt;br /&gt;
&lt;br /&gt;
==Date==&lt;br /&gt;
The ISO date format is accepted: %Y-%m-%d e.g. 2020-07-14. yymmdd is not accepted.&lt;br /&gt;
&lt;br /&gt;
= Examples with PHP =&lt;br /&gt;
&lt;br /&gt;
This is more examples, for different uses cases:&lt;br /&gt;
&lt;br /&gt;
In every examples, we have:&lt;br /&gt;
* $apiKey = &amp;quot;&amp;lt;my token&amp;gt;&amp;quot;;&lt;br /&gt;
* $apiUrl = &amp;quot;&amp;lt;nowiki&amp;gt;http://&amp;lt;my_server&amp;gt;/api/index.php/&amp;lt;/nowiki&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxHighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Retrieve products list&lt;br /&gt;
	$listProduits = [];&lt;br /&gt;
	$produitParam = [&amp;quot;limit&amp;quot; =&amp;gt; 10000, &amp;quot;sortfield&amp;quot; =&amp;gt; &amp;quot;rowid&amp;quot;];&lt;br /&gt;
	$listProduitsResult = CallAPI(&amp;quot;GET&amp;quot;, $apiKey, $apiUrl.&amp;quot;products&amp;quot;, $produitParam);&lt;br /&gt;
	$listProduitsResult = json_decode($listProduitsResult, true);&lt;br /&gt;
&lt;br /&gt;
	if (isset($listProduitsResult[&amp;quot;error&amp;quot;]) &amp;amp;&amp;amp; $listProduitsResult[&amp;quot;error&amp;quot;][&amp;quot;code&amp;quot;] &amp;gt;= &amp;quot;300&amp;quot;) {&lt;br /&gt;
	} else {&lt;br /&gt;
		foreach ($listProduitsResult as $produit) {&lt;br /&gt;
			$listProduits[intval($produit[&amp;quot;id&amp;quot;])] = html_entity_decode($produit[&amp;quot;ref&amp;quot;], ENT_QUOTES);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/syntaxHighlight&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* I retrieve the 10&#039;000 first products sorted on their ID in the base&lt;br /&gt;
* html_entity_decode is necessary as single quotes are encoded&lt;br /&gt;
* It&#039;s easy to use the same method (replacing products with dictionnarycountries) to retrieve the list of countries and their ID&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxHighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Create a product&lt;br /&gt;
	$ref = &amp;quot;my_product_ref_X203ZZ&amp;quot;;&lt;br /&gt;
	$newProduct = [&lt;br /&gt;
		&amp;quot;ref&amp;quot;	=&amp;gt; $ref,&lt;br /&gt;
		&amp;quot;label&amp;quot;	=&amp;gt; $ref&lt;br /&gt;
	];&lt;br /&gt;
	$newProductResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;products&amp;quot;, json_encode($newProduct));&lt;br /&gt;
	$newProductResult = json_decode($newProductResult, true);&lt;br /&gt;
&amp;lt;/syntaxHighlight&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* before creating a product, it could be wise to check if it exists. Using my first example, you&#039;ll have  :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxHighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// my ref&lt;br /&gt;
	$ref = &amp;quot;my_product_ref_X203ZZ&amp;quot;;&lt;br /&gt;
// does it exist in my array&lt;br /&gt;
	$produitKey = array_search($ref, $listProduits);&lt;br /&gt;
	if ($produitKey) {&lt;br /&gt;
// yes&lt;br /&gt;
		$fk_product = $produitKey;&lt;br /&gt;
	} else {&lt;br /&gt;
// no&lt;br /&gt;
// Create the product&lt;br /&gt;
		$newProduct = [&lt;br /&gt;
			&amp;quot;ref&amp;quot;	=&amp;gt; $ref,&lt;br /&gt;
			&amp;quot;label&amp;quot;	=&amp;gt; $ref&lt;br /&gt;
		];&lt;br /&gt;
		$newProductResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;products&amp;quot;, json_encode($newProduct));&lt;br /&gt;
		$newProductResult = json_decode($newProductResult, true);&lt;br /&gt;
		if (isset($newProductResult[&amp;quot;error&amp;quot;]) &amp;amp;&amp;amp; $newProductResult[&amp;quot;error&amp;quot;][&amp;quot;code&amp;quot;] &amp;gt;= &amp;quot;300&amp;quot;) {&lt;br /&gt;
// there&#039;s been an error&lt;br /&gt;
			echo &amp;quot;&amp;lt;pre&amp;gt;ERROR&amp;quot;, var_dump($newProductResult), &amp;quot;&amp;lt;/pre&amp;gt;&amp;quot;;&lt;br /&gt;
			exit;&lt;br /&gt;
		} else {&lt;br /&gt;
// everything good&lt;br /&gt;
			$fk_product = $newProductResult;&lt;br /&gt;
			$listProduits[$fk_product] = $ref;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/syntaxHighlight&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* I check if the ref of my product exist in the array created in the first example.&lt;br /&gt;
* If it exists, I use it&#039;s key in the array as ID&lt;br /&gt;
* If it doesn&#039;t exist, I create the product, then I add it to my array for next time then I use the ID created&lt;br /&gt;
* I choose this method to do less API calls when I have to import 500 orders. I just need to retrieve the products list once at the beginning instead of searching Dolibarr each time.&lt;br /&gt;
&lt;br /&gt;
Warning: The example below is not working properly. Creating an order and lines in one go is not supported. Instead you have to create an order first and with the returned order id add the lines using the /orders/{id}/lines endpoint. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxHighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// create an order with 2 products&lt;br /&gt;
&lt;br /&gt;
// The array where there will be all the products lines of my order.&lt;br /&gt;
	$newCommandeLine = [];&lt;br /&gt;
&lt;br /&gt;
// product 1&lt;br /&gt;
	$ref1 = &amp;quot;my_product_ref_X203ZZ&amp;quot;;&lt;br /&gt;
	$prix1 = 10;&lt;br /&gt;
	$qtt1  = 100;&lt;br /&gt;
	$tva1 = 20;&lt;br /&gt;
	$fk_product1&lt;br /&gt;
// product 2&lt;br /&gt;
	$ref2 = &amp;quot;my_product_ref_B707FD&amp;quot;;&lt;br /&gt;
	$prix2 = 13;&lt;br /&gt;
	$qtt2  = 37;&lt;br /&gt;
	$tva2 = 20;&lt;br /&gt;
&lt;br /&gt;
	$newCommandeLine[] = [&lt;br /&gt;
		&amp;quot;desc&amp;quot;		=&amp;gt; $ref1,&lt;br /&gt;
		&amp;quot;subprice&amp;quot;	=&amp;gt; $prix1,&lt;br /&gt;
		&amp;quot;qty&amp;quot;		=&amp;gt; $qtt1,&lt;br /&gt;
		&amp;quot;tva_tx&amp;quot;	=&amp;gt; floatval($tva1),&lt;br /&gt;
		&amp;quot;fk_product&amp;quot;=&amp;gt; $fk_product1&lt;br /&gt;
	];&lt;br /&gt;
&lt;br /&gt;
	$newCommandeLine[] = [&lt;br /&gt;
		&amp;quot;desc&amp;quot;		=&amp;gt; $ref2,&lt;br /&gt;
		&amp;quot;subprice&amp;quot;	=&amp;gt; $prix2,&lt;br /&gt;
		&amp;quot;qty&amp;quot;		=&amp;gt; $qtt2,&lt;br /&gt;
		&amp;quot;tva_tx&amp;quot;	=&amp;gt; floatval($tva2),&lt;br /&gt;
		&amp;quot;fk_product&amp;quot;=&amp;gt; $fk_product2&lt;br /&gt;
	];&lt;br /&gt;
&lt;br /&gt;
	if (count($newCommandeLine) &amp;gt; 0) {&lt;br /&gt;
		$newCommande = [&lt;br /&gt;
			&amp;quot;socid&amp;quot;			=&amp;gt; $clientDoliId,&lt;br /&gt;
			&amp;quot;type&amp;quot; 			=&amp;gt; &amp;quot;0&amp;quot;,&lt;br /&gt;
			&amp;quot;lines&amp;quot;			=&amp;gt; $newCommandeLine,&lt;br /&gt;
			&amp;quot;note_private&amp;quot;	=&amp;gt; &amp;quot;order created automatically with API&amp;quot;,&lt;br /&gt;
		];&lt;br /&gt;
		$newCommandeResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;orders&amp;quot;, json_encode($newCommande));&lt;br /&gt;
		$newCommandeResult = json_decode($newCommandeResult, true);&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/syntaxHighlight&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* $clientDoliId is the ID of the customer in the Dolibarr database. Either you know it or you can search for it before&lt;br /&gt;
* type =&amp;gt; 0, This is a customer order (while 1 = supplier order)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxHighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Validate an order &lt;br /&gt;
	$newCommandeValider = [&lt;br /&gt;
		&amp;quot;idwarehouse&amp;quot;	=&amp;gt; &amp;quot;0&amp;quot;,&lt;br /&gt;
		&amp;quot;notrigger&amp;quot;		=&amp;gt; &amp;quot;0&amp;quot;&lt;br /&gt;
	];&lt;br /&gt;
	$newCommandeValiderResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;orders/&amp;quot;.$newCommandeResult.&amp;quot;/validate&amp;quot;, json_encode($newCommandeValider));&lt;br /&gt;
	$newCommandeValiderResult = json_decode($newCommandeValiderResult, true);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxHighlight&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* in this example, on the penultimate line, we can see : $apiUrl.&amp;quot;orders/&amp;quot;.$newCommandeResult.&amp;quot;/validate&amp;quot;.&amp;lt;br/&amp;gt;&lt;br /&gt;
$newCommandeResult is the ID of the order created in the previous example&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxHighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// search in the database if a customer exist&lt;br /&gt;
	$customer_name = &amp;quot;Acme Inc&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	$clientSearch = json_decode(CallAPI(&amp;quot;GET&amp;quot;, $apiKey, $apiUrl.&amp;quot;thirdparties&amp;quot;, array(&lt;br /&gt;
		&amp;quot;sortfield&amp;quot; =&amp;gt; &amp;quot;t.rowid&amp;quot;, &lt;br /&gt;
		&amp;quot;sortorder&amp;quot; =&amp;gt; &amp;quot;ASC&amp;quot;, &lt;br /&gt;
		&amp;quot;limit&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &lt;br /&gt;
		&amp;quot;mode&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;,&lt;br /&gt;
		&amp;quot;sqlfilters&amp;quot; =&amp;gt; &amp;quot;(t.nom:=:&#039;&amp;quot;.$customer_name.&amp;quot;&#039;)&amp;quot;&lt;br /&gt;
		)&lt;br /&gt;
	), true);&lt;br /&gt;
&amp;lt;/syntaxHighlight&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* limit =&amp;gt; 1 only 1 customer&lt;br /&gt;
* mode =&amp;gt; 1 we are looking for a customer, not a supplier (they are thirdparties too but with a different status)&lt;br /&gt;
* sqlfilters a bit special but there are more examples on the explorer page&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxHighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// customer doesn&#039;t exist. Let&#039;s create it and get it&#039;s ID&lt;br /&gt;
	$newClient = [&lt;br /&gt;
		&amp;quot;name&amp;quot; 			=&amp;gt; &amp;quot;customer company name&amp;quot;,&lt;br /&gt;
		&amp;quot;email&amp;quot;			=&amp;gt; &amp;quot;customer company email&amp;quot;,&lt;br /&gt;
		&amp;quot;client&amp;quot; 		=&amp;gt; &amp;quot;1&amp;quot;,&lt;br /&gt;
		&amp;quot;code_client&amp;quot;	=&amp;gt; &amp;quot;-1&amp;quot;&lt;br /&gt;
	];&lt;br /&gt;
	$newClientResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;thirdparties&amp;quot;, json_encode($newClient));&lt;br /&gt;
	$newClientResult = json_decode($newClientResult, true);&lt;br /&gt;
	$clientDoliId = $newClientResult;&lt;br /&gt;
&amp;lt;/syntaxHighlight&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* client =&amp;gt; 1 He is a customer (not a supplier)&lt;br /&gt;
* code_client =&amp;gt; -1 so the customer code will be generated automatically.&lt;br /&gt;
* we get the customer ID in $clientDoliId&lt;br /&gt;
&lt;br /&gt;
= Examples with Python =&lt;br /&gt;
See https://pypi.org/project/dolipy/ and https://pypi.org/project/dolibarr/&lt;br /&gt;
&lt;br /&gt;
= Develop your own service / API =&lt;br /&gt;
Adding a new REST service is as easy than adding a file called &#039;&#039;&#039;api_mymoduleobject.class.php&#039;&#039;&#039; into the directory &#039;&#039;&#039;htdocs/mymodule/class&#039;&#039;&#039;.&lt;br /&gt;
You take the example into &#039;&#039;&#039;htdocs/commande/class/api_orders.class.php&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that if you use the &#039;&#039;&#039;modulebuilder&#039;&#039;&#039; tool, the file may be generated for you.&lt;br /&gt;
&lt;br /&gt;
The framework detects automatically the API and it should be visible into the explorer.&lt;br /&gt;
&lt;br /&gt;
Method and parameters are detected according to introspection done into PHP class of the object (&#039;&#039;&#039;htdocs/mymodule/class/object.class.php&#039;&#039;&#039;) using the &#039;&#039;&#039;annotations&#039;&#039;&#039; found into the class.&lt;br /&gt;
For a documentation about annotation: https://github.com/Luracast/Restler/blob/master/ANNOTATIONS.md&lt;br /&gt;
&lt;br /&gt;
These are just the basics.&lt;br /&gt;
&lt;br /&gt;
Some more informations in the Dolibarr code. You can look here : htdocs/&amp;lt;directory&amp;gt;/class/api_xxx_class.php&amp;lt;br/&amp;gt;&lt;br /&gt;
Ex : htdocs/societe/class/api_thirdparties.class.php for thirdparties.&amp;lt;br/&amp;gt;&lt;br /&gt;
Ex : Invoices are in htdocs/compta/facture/class&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Prerequisites&amp;diff=51063</id>
		<title>Prerequisites</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Prerequisites&amp;diff=51063"/>
		<updated>2021-06-18T20:40:59Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* PHP */ refer to Releases for older versions to only have it in one place&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:Prérequis]]&lt;br /&gt;
[[es:Prerrequisitos]]&lt;br /&gt;
[[zh:安装前提条件]]&lt;br /&gt;
[[de:Voraussetzungen]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Admin_en]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
Dolibarr was built to work on following components:&lt;br /&gt;
&lt;br /&gt;
= OS (Operating Systems) =&lt;br /&gt;
Nearly every modern OS is supported.&lt;br /&gt;
* Clients: every OS, that can run a webbrowser&lt;br /&gt;
* Server: every os, that supports a webserver with PHP and a SQL Database (see below)&lt;br /&gt;
&lt;br /&gt;
for example: GNU/Linux, BSD, Windows, MacOS, AIX, ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note for Windows 7 users:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 When using Windows 7 the Visual C++ Redistributable for Visual Studio 2012 Update 4 must be already installed.  &lt;br /&gt;
 An error message during installation will indicate if this is missing.&lt;br /&gt;
 &#039;&#039;&#039;Make sure you choose the 32-bit version (vcredist_x86.exe).&#039;&#039;&#039;&lt;br /&gt;
 It can be obtained here:&lt;br /&gt;
 * https://www.microsoft.com/en-us/download/details.aspx?id=30679&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Database =&lt;br /&gt;
* MySQL {{MySqlMinVersion}} (any MySQL options/parameters supported). &lt;br /&gt;
 !! Do not use MySQL version 5.5.40 nor 5.5.41, this version has critical bugs with data loss.&lt;br /&gt;
If using option mode=STRICT returns some warnings or error, please report them to us.&lt;br /&gt;
* MariaDB {{MySqlMinVersion}}&lt;br /&gt;
* PostgreSQL {{PostgresMinVersion}}&lt;br /&gt;
&lt;br /&gt;
* MS SQL (experimental support not working yet)&lt;br /&gt;
&lt;br /&gt;
* Database size need is lower than &#039;&#039;&#039;1Mb per 100&#039;&#039;&#039; customers/suppliers registered into database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= PHP = &lt;br /&gt;
* Min. required version: {{PHPMinVersion}}, Max {{PHPMaxVersion}}&lt;br /&gt;
* Support for user sessions must be enabled (it is the default value for PHP)&lt;br /&gt;
* PHP configuration must allow use of {{PHPMinMemory}}Mb of memory (parameter PHP memory_limit).&lt;br /&gt;
* Works however safe_mode parameter is set&lt;br /&gt;
&lt;br /&gt;
[[Releases|Details for older versions]].&lt;br /&gt;
&lt;br /&gt;
= Disk storage = &lt;br /&gt;
&lt;br /&gt;
* Dolibarr program files use about &#039;&#039;&#039;150 MByte&#039;&#039;&#039; on disk. &lt;br /&gt;
* Extra Modules or Templates need some additional disk space. &lt;br /&gt;
* Dolibarr Database Files use about &#039;&#039;&#039;35 MByte&#039;&#039;&#039; on disk. &lt;br /&gt;
* Database-System itself need also some disk-space and more space for temporary files.&lt;br /&gt;
&lt;br /&gt;
However, it will need more disk space if you upload joined files or to store generated PDF or ODT documents. Storage will depend on number and size of attached files.&lt;br /&gt;
&lt;br /&gt;
= CPU =&lt;br /&gt;
You can start even with an old Intel Pentium processor or equal.&lt;br /&gt;
If you have more than 30 users, a 1GHz CPU or more is recommended.&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Prerequisite&amp;diff=51062</id>
		<title>Prerequisite</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Prerequisite&amp;diff=51062"/>
		<updated>2021-06-18T20:37:24Z</updated>

		<summary type="html">&lt;p&gt;Egils: Egils moved page Prerequisite to Prerequisites: better english&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Prerequisites]]&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Prerequisites&amp;diff=51061</id>
		<title>Prerequisites</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Prerequisites&amp;diff=51061"/>
		<updated>2021-06-18T20:37:24Z</updated>

		<summary type="html">&lt;p&gt;Egils: Egils moved page Prerequisite to Prerequisites: better english&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:Prérequis]]&lt;br /&gt;
[[es:Prerrequisitos]]&lt;br /&gt;
[[zh:安装前提条件]]&lt;br /&gt;
[[de:Voraussetzungen]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Admin_en]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
Dolibarr was built to work on following components:&lt;br /&gt;
&lt;br /&gt;
= OS (Operating Systems) =&lt;br /&gt;
Nearly every modern OS is supported.&lt;br /&gt;
* Clients: every OS, that can run a webbrowser&lt;br /&gt;
* Server: every os, that supports a webserver with PHP and a SQL Database (see below)&lt;br /&gt;
&lt;br /&gt;
for example: GNU/Linux, BSD, Windows, MacOS, AIX, ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note for Windows 7 users:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 When using Windows 7 the Visual C++ Redistributable for Visual Studio 2012 Update 4 must be already installed.  &lt;br /&gt;
 An error message during installation will indicate if this is missing.&lt;br /&gt;
 &#039;&#039;&#039;Make sure you choose the 32-bit version (vcredist_x86.exe).&#039;&#039;&#039;&lt;br /&gt;
 It can be obtained here:&lt;br /&gt;
 * https://www.microsoft.com/en-us/download/details.aspx?id=30679&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Database =&lt;br /&gt;
* MySQL {{MySqlMinVersion}} (any MySQL options/parameters supported). &lt;br /&gt;
 !! Do not use MySQL version 5.5.40 nor 5.5.41, this version has critical bugs with data loss.&lt;br /&gt;
If using option mode=STRICT returns some warnings or error, please report them to us.&lt;br /&gt;
* MariaDB {{MySqlMinVersion}}&lt;br /&gt;
* PostgreSQL {{PostgresMinVersion}}&lt;br /&gt;
&lt;br /&gt;
* MS SQL (experimental support not working yet)&lt;br /&gt;
&lt;br /&gt;
* Database size need is lower than &#039;&#039;&#039;1Mb per 100&#039;&#039;&#039; customers/suppliers registered into database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= PHP = &lt;br /&gt;
* Min. required version: {{PHPMinVersion}}, Max {{PHPMaxVersion}}&lt;br /&gt;
* Support for user sessions must be enabled (it is the default value for PHP)&lt;br /&gt;
* PHP configuration must allow use of {{PHPMinMemory}}Mb of memory (parameter PHP memory_limit).&lt;br /&gt;
* Works however safe_mode parameter is set&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Oldest versions&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dolibarr 9.0.x&#039;&#039;&#039;&lt;br /&gt;
* min. required version: PHP 5.4+&lt;br /&gt;
* max version: PHP 7.3&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dolibarr 8.0.x&#039;&#039;&#039;&lt;br /&gt;
* min. required version: PHP 5.4+&lt;br /&gt;
* max version: PHP 7.2&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Dolibarr 7.0.x&#039;&#039;&#039;&lt;br /&gt;
* min. required version: PHP 5.3+&lt;br /&gt;
* max version: PHP 7.2&lt;br /&gt;
&lt;br /&gt;
= Disk storage = &lt;br /&gt;
&lt;br /&gt;
* Dolibarr program files use about &#039;&#039;&#039;150 MByte&#039;&#039;&#039; on disk. &lt;br /&gt;
* Extra Modules or Templates need some additional disk space. &lt;br /&gt;
* Dolibarr Database Files use about &#039;&#039;&#039;35 MByte&#039;&#039;&#039; on disk. &lt;br /&gt;
* Database-System itself need also some disk-space and more space for temporary files.&lt;br /&gt;
&lt;br /&gt;
However, it will need more disk space if you upload joined files or to store generated PDF or ODT documents. Storage will depend on number and size of attached files.&lt;br /&gt;
&lt;br /&gt;
= CPU =&lt;br /&gt;
You can start even with an old Intel Pentium processor or equal.&lt;br /&gt;
If you have more than 30 users, a 1GHz CPU or more is recommended.&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=User_talk:Eldy&amp;diff=50640</id>
		<title>User talk:Eldy</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=User_talk:Eldy&amp;diff=50640"/>
		<updated>2021-05-18T08:15:30Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* Typo on main page */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Discourse migration ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hello, I tried the subfolder thing : https://wiki.dolibarr.org/index.php/User_talk:Jtraulle/DiscourseMigration#Domain_requirement&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== FEC is not an XML format ==&lt;br /&gt;
&lt;br /&gt;
Hi Eldy&lt;br /&gt;
&lt;br /&gt;
I think FEC is not an XML format.&lt;br /&gt;
Therefore I have changed your edit of 25 July 2020:  &amp;lt;br&amp;gt;&lt;br /&gt;
https://wiki.dolibarr.org/index.php?title=Template:AccountingExpertExportExamples&amp;amp;diff=next&amp;amp;oldid=47998&amp;amp;diffmode=source&lt;br /&gt;
&lt;br /&gt;
Please review my changes:  &amp;lt;br&amp;gt;&lt;br /&gt;
https://wiki.dolibarr.org/index.php/Module_Comptabilit%C3%A9_en_Partie_Double#Export_FEC&lt;br /&gt;
&lt;br /&gt;
[[User:Oliver|Oliver]] ([[User talk:Oliver|talk]]) 03:21, 15 August 2020 (CEST)&lt;br /&gt;
&lt;br /&gt;
=&amp;gt; True. FEC is a txt format.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Révocation modification User:Jtraulle/DiscourseMigration/Implementation ==&lt;br /&gt;
&lt;br /&gt;
J&#039;ai révoqué ta modification concernant la section permettant de reconstruire le container data du Discourse.&lt;br /&gt;
&lt;br /&gt;
Contrairement à ce que l&#039;on pourrait penser, il ne s&#039;agit pas d&#039;une coquille mais la commande est bien à exécuter deux fois comme indiqué dans la page mise en référence (il me semble que la première exécution permet la migration des des données d&#039;une version majeure de PostgreSQL à l&#039;autre et la seconde permet d&#039;effectivement effectuer la mise à jour du container ou l&#039;inverse mais il est bien nécessaire de l&#039;exécuter deux fois ;) )&lt;br /&gt;
&lt;br /&gt;
[[User:Jtraulle|Jtraulle]] ([[User talk:Jtraulle|talk]]) 10:39, 18 October 2020 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Typo on main page ==&lt;br /&gt;
&lt;br /&gt;
Screenshots galery -&amp;gt; Screenshots gallery--[[User:Egils|Egils]] ([[User talk:Egils|talk]]) 08:15, 18 May 2021 (UTC)&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Installation_-_Upgrade&amp;diff=50639</id>
		<title>Installation - Upgrade</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Installation_-_Upgrade&amp;diff=50639"/>
		<updated>2021-05-18T07:24:07Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* For installation that used GIT */ 12 -&amp;gt; 13&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:Installation_-_Mise_à_jour]]&lt;br /&gt;
[[es:Instalación_-_Actualización]]&lt;br /&gt;
[[zh:安装_-_升级]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Admin_en]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
The following documentation describes processes to install or upgrade Dolibarr on a Windows, MAC OS or Unix like platform.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Install Dolibarr=&lt;br /&gt;
This chapter describe different available methods to install Dolibarr for the first time (from the most simple to the manual one). See next chapter for upgrades.&lt;br /&gt;
&lt;br /&gt;
==On your dedicated computer/server (installation &amp;quot;On Premise&amp;quot;)==&lt;br /&gt;
===[[File:Logo_windows.png]] Manually or with DoliWamp===&lt;br /&gt;
- &#039;&#039;&#039;Prerequisite&#039;&#039;&#039;: Windows&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Level&#039;&#039;&#039;: Non experienced users&lt;br /&gt;
&lt;br /&gt;
This process works only for Windows users and is recommended for user with no computer knowledge. If you have experience with Apache, PHP and Mysql installation, next chapter is better for you. &lt;br /&gt;
&lt;br /&gt;
If you have time and want to learn how to install an Apache, PHP and MariaDB web server, see the [[Manual installation on Windows]] page for step-by-step instructions.&lt;br /&gt;
&lt;br /&gt;
However, if you are a newbie user and running Windows, you can use DoliWamp. DoliWamp is a specialized Dolibarr distribution for Windows. This distribution allows you to make an installation under Windows with all prerequisites (Apache, Mysql, PHP) and with no computer knowledge. This is steps to install DoliWamp:&lt;br /&gt;
&lt;br /&gt;
*Download last Dolibarr version for Windows DoliWamp.&lt;br /&gt;
&lt;br /&gt;
For this, see at {{TemplateURLToDownloadDoliWamp}}&lt;br /&gt;
&lt;br /&gt;
*Run the downloaded .exe and follow instructions.&lt;br /&gt;
&lt;br /&gt;
===[[File:Logo_ubuntu.png]] With DoliDeb (Debian or Ubuntu .deb package)===&lt;br /&gt;
- &#039;&#039;&#039;Prerequisite&#039;&#039;&#039;: Linux Ubuntu&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Level&#039;&#039;&#039;: Non experienced users&lt;br /&gt;
&lt;br /&gt;
This process works only for Ubuntu or Debian Linux users and is recommended for user with little computer knowledge. If you are experienced with Apache, PHP and Mysql installation, the chapter &#039;with standard package&#039; is better for you. However, if you are a newbie user and running Ubuntu, you can use DoliDeb. DoliDeb is a specialized Dolibarr distribution for Debian or Ubuntu. This distribution allows you to make an installation under Ubuntu with all prerequisites (Apache, Mysql, PHP) and with no computer knowledge.&lt;br /&gt;
&lt;br /&gt;
*Steps to install DoliDeb are described into page [[Dolibarr for Ubuntu or Debian]].&lt;br /&gt;
&lt;br /&gt;
===[[File:Logo_rpm.png|42px]] With DoliRpm (Fedora, Redhat, Mandriva, Mageia or OpenSuse .rpm package)===&lt;br /&gt;
- &#039;&#039;&#039;Prerequisite&#039;&#039;&#039;: Linux Fedora, Redhat, Mandriva, Mageia or OpenSuse&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Level&#039;&#039;&#039;: Non experienced users&lt;br /&gt;
&lt;br /&gt;
This process works only for Fedora, Redhat, Mandriva, Mageia or OpenSuse Linux users and is recommended for user with no computer knowledge. If you have experience with Apache, PHP and Mysql installation, next chapter &#039;with standard package&#039; is better for you. However, if you are a newbie user and running Fedora or Redhat, you can use DoliRpm. DoliRpm is a specialized Dolibarr distribution for Fedora, Redhat or Mandriva. This distribution allows you to make an installation under such OS with all prerequisites (Apache, Mysql, PHP) and with no computer knowledge.&lt;br /&gt;
&lt;br /&gt;
*Steps to install DoliRpm are described into page [[Dolibarr for Redhat or Fedora (rpm package)]] or [[Dolibarr for Mandriva or Mageia (rpm package)]] or [[Dolibarr for OpenSuse (rpm package)]].&lt;br /&gt;
&lt;br /&gt;
===[[File:Gnu.png]] With Dolibarr (standard .zip package or from git)===&lt;br /&gt;
- &#039;&#039;&#039;Prerequisite&#039;&#039;&#039;: Apache, PHP and a database server (MySQL or PostgreSQL) are already running correctly and user/pass (of a new database or root server) is known.&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Level&#039;&#039;&#039;: Users with few Web and Database administration knowledge.&lt;br /&gt;
&lt;br /&gt;
This procedure describe manual (and recommended) installation on a GNU/Linux system (Debian, Mandriva, ...), it can be used for other OS with minor changes.&lt;br /&gt;
You can follow this tutorial for any Dolibarr version &amp;gt;= 2.0.0&lt;br /&gt;
&lt;br /&gt;
*Check that you have installed Apache, PHP {{PHPMinVersion}} and a database server (MySQL {{MySqlMinVersion}} or PostGreSQL) correctly (check list of installed packaged on your server by using the package manager of your distribution). If not, install them (use last recent version).&lt;br /&gt;
&lt;br /&gt;
*Check that main root or admin user/password couple for the server is known and works correctly. If this root or admin user/password is not known because not yet defined, read following chapter. Otherwise go on next step:&lt;br /&gt;
&lt;br /&gt;
For Linux users, if you have just installed a MySQL server, the admin user is&#039;&#039;&#039; root&#039;&#039;&#039;. If the root password has never been set yet, you must run the following command to initialize the password:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mysql    &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Once in Mysql interface, run the SQL command to modify the root password:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
grant all privileges on *.* to root@&#039;localhost&#039; identified by &#039;newrootpass&#039; with grant option;      &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Then enter and \q to quit.&lt;br /&gt;
&lt;br /&gt;
To check that the connection with the new couple user/password works, launch the command&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mysql -u root -p&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
And type your password &#039;&#039;newrootpass&#039;&#039; then \q to quit if the connection has been successful.&lt;br /&gt;
&lt;br /&gt;
For Linux users, if you have just installed a PostgreSQL server, you must run the following command to initialize an admin user and password. For this, add the following line in file &#039;&#039;&#039;/etc/postgresql/x.x/main/pg_hba.conf&#039;&#039;&#039; (replace x.x with your postgres version)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
local   all         dolibarrowner    md5        &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Also, comment the line&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
#local   all         all                               ident&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This line ensure that system login used to connect to database (it will be login the web server run with), is same than database account (this is never the case).&lt;br /&gt;
&lt;br /&gt;
Then launch commands from a root shell&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo -s -u postgres&lt;br /&gt;
createuser dolibarrowner&lt;br /&gt;
psql -h localhost -d template1 -c &amp;quot;alter user dolibarrowner with password &#039;dolibarrownerpass&#039;&amp;quot;&lt;br /&gt;
exit&lt;br /&gt;
sudo /etc/init.d/postgresql restart&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
You can test a connection with this user with command&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
psql -d postgres -U dolibarrowner -W&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
And type your &#039;&#039;dolibarrownerpass&#039;&#039; as password and \q to quit if connection is ok.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Go into the directory where to install Dolibarr (the web root directory defined for your web server)&lt;br /&gt;
&lt;br /&gt;
#For Debian and Ubuntu families, it is generally: /var/www (newer versions: /var/www/html)&lt;br /&gt;
#For Mandriva, RedHat, Fedora: /var/www/html&lt;br /&gt;
#For Suse: /srv/www/htdocs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cd /var/www&lt;br /&gt;
or&lt;br /&gt;
$ cd /var/www/html&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Get the application archive of last stable version&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;from zip file&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ wget http://www.dolibarr.org/files/dolibarr.zip&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Uncompress archive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ unzip dolibarr.zip&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;or from git repository&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone -b X.Y http://github.com/Dolibarr/dolibarr.git dolibarr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Replace X.Y with the version you want to get.&lt;br /&gt;
&lt;br /&gt;
*Rename directory dolibarr-x.y.z into dolibarr to have a directory name that does not depends on version (replace x.y.z with source version)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ mv dolibarr-x.y.z dolibarr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Change permission and owner of the &#039;dolibarr&#039; directory to that of the group under which the web server runs (assumed to be &#039;www-data&#039; for debian, &#039;apache&#039; for redhat, mandriva, fedora)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ chmod -R 755 /var/www/dolibarr&lt;br /&gt;
$ chown -R www-data.www-data /var/www/dolibarr&lt;br /&gt;
or&lt;br /&gt;
$ chmod -R 755 /var/www/html/dolibarr&lt;br /&gt;
$ chown -R apache.apache /var/www/html/dolibarr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For Fedora, since SELinux is usually enabled, it is also advisable to run the following commands to make the &#039;dolibarr&#039; directory compliant with the SELinux requirement (else you are likely to get quite a few alerts) :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ semanage fcontext -a -t httpd_sys_rw_content_t &#039;/var/www/html/dolibarr(/.*)?&#039;&lt;br /&gt;
$ restorecon -R -v &#039;/var/www/html/dolibarr&#039;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*As a root user, create, into directory dolibarr/htdocs/conf, an empty configuration file called conf.php and set, as owner, the web server user (example www-data on Debian, apache on Mandriva, RedHat, Fedora or other distributions ...). This is required because the web server will have to write into this file during install process.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cd dolibarr ; touch htdocs/conf/conf.php ; chown www-data htdocs/conf/conf.php&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Note: For Ubuntu no need of htdocs, you just have to make dolibarr root by placing all files and folders of htdocs in /var/www/dolibarr then from browser do &amp;lt;MyIP&amp;gt;/dolibarr/index.php (see this discussion as reference to this addendum [http://askubuntu.com/questions/874456/php-code-displays-in-browser?noredirect=1#comment1357943_874456])&lt;br /&gt;
&lt;br /&gt;
*As a root user, create a directory that will be used to save all files generated and stocked by Dolibarr (PDf invoices, uploaded images, ...), and attribute to this directory a owner that must be the web server (example www-data on Debian, apache on Mandriva, RedHat, Fedora...). The web server must have write permission into this directory. It is recommanded to use a directory outside of your directory of web pages, for example - &amp;quot;/var/lib/dolibarr/documents&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir -p /var/lib/dolibarr/documents ; chown www-data /var/lib/dolibarr/documents&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Now call your browser to point to the main page&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
http://127.0.0.1/dolibarr/htdocs/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or if you didn&#039;t create the htdocs directory&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
http://127.0.0.1/dolibarr/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Follow instructions of setup steps until end of install process.&lt;br /&gt;
&lt;br /&gt;
*For security reason, we recommend, once setup is finished, to create a file install.lock into Dolibarr document directory that only root user can delete. This will lock the call of the install process again (you will have to remove this file for upgrades).&lt;br /&gt;
&lt;br /&gt;
If this is not done, Dolibarr will show you a warning once logged by an administrator user.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ touch /var/lib/dolibarr/documents/install.lock; chmod go-w /var/lib/dolibarr/documents;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==On a mutualized Web Hosting Provider (without terminal/SSH access)==&lt;br /&gt;
It is not possible to provide a generic documentation to install Dolibarr on a particular Web hosting provider as this depends on provider.&lt;br /&gt;
In most cases, using the following process should works for most providers:&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Prerequisite&#039;&#039;&#039;: Apache web server, PHP and a database server (MySQL or PostgreSQL) are already running correctly and user/pass (of a new database or root server) is known.&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Level&#039;&#039;&#039;: Users with few Web and Database administration knowledge. Knowledge to use a tool (FTP, SFTP) to upload files on the server.&lt;br /&gt;
&lt;br /&gt;
*Check that you have an Apache web server, PHP and a database server (MySQL or PostGreSQL) that works correctly.&lt;br /&gt;
&lt;br /&gt;
[[File:warning.png]] Warning, check that code page of PHP server and database server are same (utf8 recommended).&lt;br /&gt;
&lt;br /&gt;
*Check that main root or admin user/password couple for the server is known and works correctly. Ask them to your Web Hosting Provider if unknown.&lt;br /&gt;
&lt;br /&gt;
*Get the application archive of last stable version and uncompress it locally.&lt;br /&gt;
&lt;br /&gt;
*Upload all content of htdocs directory to your web root directory, for example using FTP in binary mode.&lt;br /&gt;
&lt;br /&gt;
*Create a directory called &amp;quot;documents&amp;quot; into Dolibarr directory that will serve to save all documents generated and stocked by Dolibarr (PDF invoices, uploaded images, ...). The web server must have write permission into this directory. You can set permissions with your FTP client.&lt;br /&gt;
&lt;br /&gt;
*Now call your browser to point to the main page index.php&lt;br /&gt;
&lt;br /&gt;
*Follow instructions of setup steps until end of install process.&lt;br /&gt;
&lt;br /&gt;
*For security reason, we recommend, once setup is finished, to create a file install.lock into Dolibarr installed directory. This will lock the call of the install process again (you will have to remove it for upgrades). If this is not done, Dolibarr will show you a warning once logged as an administrator user.&lt;br /&gt;
&lt;br /&gt;
==On a SaaS or Cloud web hosting provider==&lt;br /&gt;
Dolibarr is also available on a lot of &amp;quot;ready to use&amp;quot; SaaS or Cloud platforms/services that provides preinstalled versions.&lt;br /&gt;
&lt;br /&gt;
See page [[Cloud Solutions]].&lt;br /&gt;
&lt;br /&gt;
Dolibarr can also be installed manually on all Cloud platforms that support PHP and Mysql.&lt;br /&gt;
&lt;br /&gt;
See page [[Cloud Solutions]].&lt;br /&gt;
&lt;br /&gt;
==Using Docker==&lt;br /&gt;
For admins with Docker experience, it is possible to use the docker build files located in the source repo here: https://github.com/Dolibarr/dolibarr/tree/develop/build&lt;br /&gt;
 git clone https://github.com/Dolibarr/dolibarr/&lt;br /&gt;
 cd ./dolibarr&lt;br /&gt;
 git checkout tags/&amp;lt;desiredrelease&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Read the README carefully. As of version 12+ it recommends to use the built in docker files for development only, while an outside repo: https://hub.docker.com/r/tuxgasy/dolibarr  is recommended for production environments.&lt;br /&gt;
&lt;br /&gt;
=Setup=&lt;br /&gt;
&lt;br /&gt;
==First setup==&lt;br /&gt;
See page [[First setup|Setup]].&lt;br /&gt;
&lt;br /&gt;
==Setup a LDAP connection==&lt;br /&gt;
If you want to use a LDAP: See [[Install and configure OpenLDAP]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Import external data=&lt;br /&gt;
For this operation, read page [[Mass imports]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Upgrade Dolibarr=&lt;br /&gt;
This chapter describe processes to upgrade an existing installation of Dolibarr from an old version to a new one. The process is the same, whatever version you are coming from and version you are going to, but it will differ according to the distribution/operating system you used for your first installation. You should use the same for upgrade.&lt;br /&gt;
 &lt;br /&gt;
==[[File:Logo_windows.png]] With DoliWamp (Windows .exe package)==&lt;br /&gt;
&lt;br /&gt;
*First make a backup of your current installation&lt;br /&gt;
*Download new .exe package of DoliWamp.&lt;br /&gt;
*Run downloaded .exe file and follow steps without changing any default values. This will upgrades all your files.&lt;br /&gt;
*At the end of the execution, your browser is launched with a page to ask you to run upgrade of your database. Choose the upgrade according to your case.&lt;br /&gt;
&lt;br /&gt;
If there is more than one version late, the page in your browser will loop to start again the upgrade wizard as often as required to run upgrade process, version by version, until your reach the new installed version.&lt;br /&gt;
&lt;br /&gt;
==[[File:Logo_ubuntu.png]] With DoliDeb (Debian or Ubuntu .deb package)==&lt;br /&gt;
&lt;br /&gt;
*First make a backup of your current installation&lt;br /&gt;
*Process to upgrade using Debian/Ubuntu package is the same as the install process (see previous chapters), so it is as easy as installing a package.&lt;br /&gt;
&lt;br /&gt;
You can also read page [[Dolibarr for Ubuntu or Debian]].&lt;br /&gt;
&lt;br /&gt;
==[[File:Logo_rpm.png|40px]] With DoliRpm (Fedora, Redhat, Mandriva, Mageia or OpenSuse .rpm package)==&lt;br /&gt;
&lt;br /&gt;
*First make a backup of your current installation&lt;br /&gt;
*Process to upgrade using rpm package is the same as the install process, so it is as easy as installing a package (see previous chapters).&lt;br /&gt;
&lt;br /&gt;
==[[File:Gnu.png]] With Dolibarr (standard .zip package or from Git)==&lt;br /&gt;
This is tutorial to use when using standard distribution for a manual upgrade.&lt;br /&gt;
&lt;br /&gt;
*First make a backup of your current installation&lt;br /&gt;
&lt;br /&gt;
*Go into the directory where you installed Dolibarr (it might be the root directory of your web, for example /var/www under Debian)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cd /var/www&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== For installation that used the zip file ===&lt;br /&gt;
*Get archive of last version&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ wget https://www.dolibarr.org/files/dolibarr.zip&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Uncompress the archive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ unzip dolibarr.zip&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy all new extracted files (the one uncompressed into directory dolibarr-x.y.z) to the directory where you put your old Dolibarr version. This will overwrite old files with new ones without removing files specifics to your installation (like conf.php file or complementary non official installed modules).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cp -r dolibarr-x.y.z/* dolibarr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If no error, you can now remove the directory of source files&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ rm -fr dolibarr-x.y.z&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Now open your Dolibarr in your browser. It should open automatically the install/&lt;br /&gt;
&lt;br /&gt;
and choose &#039;&#039;Update&#039;&#039; in suggested menu.&lt;br /&gt;
&lt;br /&gt;
=== For installation that used GIT ===&lt;br /&gt;
If you already cloned the repo simply upgrade by checking out a version tag like so:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout -b 13.0 --depth 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Now open your Dolibarr in your browser. It should open automatically the install/&lt;br /&gt;
&lt;br /&gt;
and choose &#039;&#039;Update&#039;&#039; in suggested menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: &lt;br /&gt;
&lt;br /&gt;
If you want to script the database upgrade process (to avoid the upgrade process from web browser), you can run the 3 upgrade processes from command line:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cd htdocs/install&lt;br /&gt;
$ php upgrade.php oldx.oldy.oldz x.y.z &amp;gt; output.html&lt;br /&gt;
$ php upgrade2.php oldx.oldy.oldz x.y.z &amp;gt; output2.html&lt;br /&gt;
$ php step5.php oldx.oldy.oldz x.y.z &amp;gt; output3.html&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Note: z must be &amp;quot;0&amp;quot; because only major versions have a migration script to run.&lt;br /&gt;
&lt;br /&gt;
Return code will be 0 if success, 1 if error (if this happens, see file output.html, output2.html or output3.html).&lt;br /&gt;
&lt;br /&gt;
Note: If you have a message that tell the install process is locked by a file, remove the file install.lock stored in Dolibarr root directory.&lt;br /&gt;
&lt;br /&gt;
*For security reason, once setup is finished, you should create a file install.lock into Dolibarr documents directory. This will lock the call of the install process again (you will have to remove this file for future upgrades). If this is not done, Dolibarr will show you a warning once logged with an administrator user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ echo &amp;gt; documents/install.lock&lt;br /&gt;
$ chmod 444 documents/install.lock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Error_reporting&amp;diff=50638</id>
		<title>Error reporting</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Error_reporting&amp;diff=50638"/>
		<updated>2021-05-18T07:22:01Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* Other rare system logs */ rename section and add nginx log&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:Gestion_d&#039;erreur]]&lt;br /&gt;
[[es:Gestión_de_errores]]&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;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Functions =&lt;br /&gt;
Following function allows to log informations in Dolibarr log file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;dol_syslog($message, LOG_DEBUG|LOG_INFO|LOG_WARNING|LOG_ERR);&amp;lt;/source&amp;gt;&lt;br /&gt;
The log level is related to setup defined in module Syslog (see lower).&lt;br /&gt;
&lt;br /&gt;
Following function can be used to add error information on screen. Usage must be reserved in never reached code.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;dol_print_error($db,texte);&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Module Syslog = &lt;br /&gt;
The error reporting module is integrated with other Dolibarr modules. It allows you to configure what level of errors you would like to be reported and where.&lt;br /&gt;
&lt;br /&gt;
To get to the error reporting module configuration page, go to Home, Configuration, Modules and use the configuration icon of the last module on the screen: &#039;&#039;Syslog&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Of course, this module (&#039;&#039;&#039;Syslog&#039;&#039;&#039;) must be activated for the following to work.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;facility&#039;&#039;&#039; option allows you to use pre-set facilities to log your errors. Facilities are a system-level feature to tell your syslog operator where this error comes from, to judge priority and all that. You can find more about this inside the PHP documentation for the &#039;&#039;openlog()&#039;&#039; function which is used inside the &#039;&#039;dol_syslog()&#039;&#039; function: http://www.php.ne/openlog&lt;br /&gt;
Really, you should leave it to &#039;&#039;&#039;LOG_USER&#039;&#039;&#039; unless you know exactly what you&#039;re doing.&lt;br /&gt;
&lt;br /&gt;
The next option, &#039;&#039;&#039;file&#039;&#039;&#039;, allows you to choose a file in which you will store the logs. The path you will indicate there should be relative to the system root (/). If you live it as it is (default option DOL_DOCUMENT_ROOT/dolibarr.log), it will likely be opened in document directory. Of course, to do that, your web server must have write permissions on the directory you are using.&lt;br /&gt;
&lt;br /&gt;
Generally, the &#039;&#039;&#039;file&#039;&#039;&#039; facility will work more easily because it doesn&#039;t depend on your server configuration (or only for the directory that needs to be writeable).&lt;br /&gt;
&lt;br /&gt;
Finally, the level of reporting is how many types of errors you want to report. LOG_DEBUG(7) is the strongest option, reporting pretty much everything that calls a dol_syslog() function. LOG_EMERG(0) is the opposite, letting you see only the errors that would really block your system.&lt;br /&gt;
&lt;br /&gt;
More information on page [[Module Syslog (developer)]].&lt;br /&gt;
&lt;br /&gt;
= Webserver logs =&lt;br /&gt;
== Apache ==&lt;br /&gt;
Note that you can have also find some technical PHP/Apache errors in apache log file (whatever is status/setup of this module). But this occurs only if there is a technical problem in your installation: On a typical Linux install, such logs will be available somewhere in &#039;&#039;&#039;/var/log/apache[2]/[dolibarr]-error.log&#039;&#039;&#039;. You can watch it &#039;&#039;live&#039;&#039; from the terminal by using:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;tail -f /var/log/apache2/dolibarr-error.log&amp;lt;/source&amp;gt;&lt;br /&gt;
== Nginx ==&lt;br /&gt;
If you are using nginx to serve Dolibarr some useful debugging information is often to be found there.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;tail -f /var/log/nginx/error.log&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Report_board_meeting_20210511_teleconf&amp;diff=50618</id>
		<title>Report board meeting 20210511 teleconf</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Report_board_meeting_20210511_teleconf&amp;diff=50618"/>
		<updated>2021-05-13T09:31:17Z</updated>

		<summary type="html">&lt;p&gt;Egils: spelling fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateAssoEn}}&lt;br /&gt;
{{TemplateAssoFr}}&lt;br /&gt;
&lt;br /&gt;
=Title/Date/Location=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Title: Foundation board meeting&lt;br /&gt;
&lt;br /&gt;
*Date: 11/05/2021&lt;br /&gt;
&lt;br /&gt;
*Location: Online with Jitsi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Presents=&lt;br /&gt;
Valid members of the board (subscription up to date), present:&lt;br /&gt;
&lt;br /&gt;
*Nicolas Zabouri&lt;br /&gt;
&lt;br /&gt;
*Florian Henry&lt;br /&gt;
&lt;br /&gt;
*Laurent Destailleur&lt;br /&gt;
&lt;br /&gt;
*Jean Heimburger&lt;br /&gt;
&lt;br /&gt;
*Maxime Kohlhaas (sorry for being (very) late !)&lt;br /&gt;
&lt;br /&gt;
=Topics=&lt;br /&gt;
&lt;br /&gt;
*Send AG convocation and vote for Year 2020&lt;br /&gt;
&lt;br /&gt;
=&amp;gt; Done&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Proofreading of Dolibarr for some modules&lt;br /&gt;
&lt;br /&gt;
Google sheet with first fixes to do has been delivered.&lt;br /&gt;
&lt;br /&gt;
=&amp;gt; Update: Tasks for 200€ was finished (Proofreading on 8 modules done and merged into develop). We agree on maximum of 2K€ budget, Laurent will decide how spend it on translation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Talking about fiscal report about developer refund&lt;br /&gt;
&lt;br /&gt;
=&amp;gt; Find a way to retrieve email of developers that have &amp;quot;long term deposit&amp;quot; on Dolistore to invite them to reclaim their &amp;quot;reward&amp;quot;. We will add a notice to incite developers to ask at least one time per year their  &amp;quot;reward&amp;quot;. Send a mailing to module developers to inform change of CGV of Dolistore&lt;br /&gt;
=&amp;gt; Task for Laurent to enhance to current tool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*VAT from Dolistore&lt;br /&gt;
&lt;br /&gt;
Next step will be to have a button to generate all invoices monthly ?&lt;br /&gt;
&lt;br /&gt;
=&amp;gt; We continue manually for the moment as now. We wait next point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*RGPD&lt;br /&gt;
&lt;br /&gt;
=&amp;gt; Jean will write an article to inform/remind on the RPGD compliance of the Dolibarr foundation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Accounting:&lt;br /&gt;
&lt;br /&gt;
=&amp;gt; Now we have a distinction in the Dolibarr of the foundation between different services bought by the foundation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Module Banking4Dolibarr from Open-Dsi.&lt;br /&gt;
&lt;br /&gt;
Alexandre will install the module. Alexandre must setup the module and present it to Philippe (to help to conciliate supplier invoices)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Task done by Laurent during past month (access not public):&lt;br /&gt;
&lt;br /&gt;
https://admin.dolibarr.org/projet/tasks/time.php?projectid=1&amp;amp;withproject=1&amp;amp;search_month=4&amp;amp;search_year=2021&amp;amp;search_user=2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=&amp;gt; Page of partners on dolibarr.org into Dolibarr CMS has been started:&lt;br /&gt;
https://www.dolibarr.org/partners.php&lt;br /&gt;
TODO: Service will be tag on thirdparty into the foundation dolibarr and logo management&lt;br /&gt;
&lt;br /&gt;
=&amp;gt; Yogocha: Campaign is still opened. Founds are available.&lt;br /&gt;
&lt;br /&gt;
=&amp;gt; Change feature is needed:&lt;br /&gt;
    &amp;quot;Mots clefs&amp;quot; have to be reword &amp;quot;Version&amp;quot;&lt;br /&gt;
     The search by tags block must be on top of category&lt;br /&gt;
     On display modules with tag search, displayed them randomly&lt;br /&gt;
     When go into category the tag filters must only apply into the category&lt;br /&gt;
     &lt;br /&gt;
     Nicolas will check if modules exists or if we let Laurent deal with it, or subcontract&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Trend validation (Building a module to organize events + module to manage preferred partner)&lt;br /&gt;
&lt;br /&gt;
** Module organize events!&lt;br /&gt;
=&amp;gt; Project Meeting planned with Laurent&lt;br /&gt;
=&amp;gt; PR ongoing&lt;br /&gt;
&lt;br /&gt;
** Module parntership management&lt;br /&gt;
&lt;br /&gt;
=&amp;gt; NextConcept 80% on going by PR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Dolibarr Promotional Video&lt;br /&gt;
&lt;br /&gt;
More than 50 videos are online&lt;br /&gt;
&lt;br /&gt;
Ask for quotation for promotional video (Ecosystem + Promotional)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Doliday 2021 + Virtual congress.&lt;br /&gt;
&lt;br /&gt;
Laurent will install a server to test the tool workadventure. After tests, it appears that solution is not yet ready to be hosted by ourself. Problems with HTTPS that need manual validation on warning page of browser.&lt;br /&gt;
&lt;br /&gt;
=&amp;gt; Waiting for COVID news, Florian will check with , workaventure if we can use their platform&lt;br /&gt;
&lt;br /&gt;
You have a setting cost of 150€ + 4€/user for an event on WorkAdventure. &lt;br /&gt;
If you need us to customize a map, it&#039;s 1 to 3 working days of our designer to add (750€/day).&lt;br /&gt;
&lt;br /&gt;
=&amp;gt; Florian will make a call on the forum (configuration https, root access, participation granted)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Preferred partners page on the website&lt;br /&gt;
&lt;br /&gt;
L. Destailleur will create basic pages for each preferred partners on the website, by copying the wiki pages. Partners will send a specific text if they want. Update will be done manually in the foundation&#039;s Dolibarr.&lt;br /&gt;
A list of preferred partners will be added to the website&lt;br /&gt;
Communication will be done later&lt;br /&gt;
&lt;br /&gt;
=&amp;gt; Pages started&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*New templates of website with 4Runner&lt;br /&gt;
&lt;br /&gt;
They are into Dolibarr foundation. What do we do with this template. Alexandre send invoice to Phillip to pay it.&lt;br /&gt;
Nicolas try to integrate this template into Dolibarr&#039;s CMS &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*MOOC&lt;br /&gt;
&lt;br /&gt;
https://courses.dolibarr.org/&lt;br /&gt;
&lt;br /&gt;
Quotation request send to  https://admin.dolibarr.org/comm/action/card.php?id=9651&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A tool has been done to translate any course into another language&#039;&#039;. Will ask juanjo to check the spanish course that is now online on https://courses.dolibarr.org&lt;br /&gt;
&lt;br /&gt;
The tools is available into https://github.com/Dolibarr/dolibarr-foundation/tree/develop/courses. We can enhance it to push strings to translation into transifex...&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Table_llx_societe&amp;diff=48216</id>
		<title>Table llx societe</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Table_llx_societe&amp;diff=48216"/>
		<updated>2020-08-24T10:01:45Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* Table */ details for client&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Table SQL]]&lt;br /&gt;
[[Category:Third parties]]&lt;br /&gt;
[[Category:Société]]&lt;br /&gt;
[[Category:Empresas]]&lt;br /&gt;
{{ListOfTables}}&lt;br /&gt;
&lt;br /&gt;
= Content/Contenu/Contenido =&lt;br /&gt;
{{flag en}} Contains the list of third parties stored in Dolibarr (thirdparties are customers, suppliers, prospects).&lt;br /&gt;
&lt;br /&gt;
{{flag fr}} Contient les tiers enregistrés dans Dolibarr (les tiers sont les clients, fournisseurs ou prospects). &lt;br /&gt;
&lt;br /&gt;
{{flag sp}} Contiene los terceros registrados en Dolibarr.&lt;br /&gt;
&lt;br /&gt;
= Structure =&lt;br /&gt;
== Table ==&lt;br /&gt;
{|  align=&amp;quot;left&amp;quot; width=&amp;quot;100%&amp;quot; border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; class=&amp;quot;dolbox&amp;quot;&lt;br /&gt;
 |style=&amp;quot;background-color: #e9e9ef&amp;quot;| &amp;lt;b&amp;gt;Field&amp;lt;/b&amp;gt;&lt;br /&gt;
 |style=&amp;quot;background-color: #e9e9ef&amp;quot;| &amp;lt;b&amp;gt;Type&amp;lt;/b&amp;gt;&lt;br /&gt;
 |style=&amp;quot;background-color: #e9e9ef&amp;quot;| &amp;lt;b&amp;gt;Null&amp;lt;/b&amp;gt;&lt;br /&gt;
 |style=&amp;quot;background-color: #e9e9ef&amp;quot;| &amp;lt;b&amp;gt;Key&amp;lt;/b&amp;gt;&lt;br /&gt;
 |style=&amp;quot;background-color: #e9e9ef&amp;quot;| &amp;lt;b&amp;gt;Default&amp;lt;/b&amp;gt;&lt;br /&gt;
 |style=&amp;quot;background-color: #e9e9ef&amp;quot;| &amp;lt;b&amp;gt;Extra&amp;lt;/b&amp;gt;&lt;br /&gt;
 |style=&amp;quot;background-color: #e9e9ef&amp;quot;| &amp;lt;b&amp;gt;Description&amp;lt;/b&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rowid&lt;br /&gt;
| int(11)&lt;br /&gt;
| NO&lt;br /&gt;
| PRI&lt;br /&gt;
| &lt;br /&gt;
| auto_increment&lt;br /&gt;
| technical index&lt;br /&gt;
|-&lt;br /&gt;
| nom&lt;br /&gt;
| varchar(60)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| name&lt;br /&gt;
|-&lt;br /&gt;
| entity&lt;br /&gt;
| int(11)&lt;br /&gt;
| NO&lt;br /&gt;
| &lt;br /&gt;
| 1&lt;br /&gt;
| &lt;br /&gt;
| multi company id&lt;br /&gt;
|-&lt;br /&gt;
| ref_ext&lt;br /&gt;
| varchar(60)&lt;br /&gt;
| YES&lt;br /&gt;
| UNI&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| A field only stored and read by Dolibarr but not used. You can use it to store your id of thirdparty into another external system. This will help synchronisation tools.&lt;br /&gt;
|-&lt;br /&gt;
| ref_int&lt;br /&gt;
| varchar(60)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| statut&lt;br /&gt;
| tinyint(4)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| state&lt;br /&gt;
|-&lt;br /&gt;
| parent&lt;br /&gt;
| int(11)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| parent&lt;br /&gt;
{{FieldTms}}&lt;br /&gt;
|-&lt;br /&gt;
| datec&lt;br /&gt;
| datetime&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| creation date&lt;br /&gt;
|-&lt;br /&gt;
| status&lt;br /&gt;
| tinyint(4)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| 1&lt;br /&gt;
| &lt;br /&gt;
| Thirdparty status : 0=activity ceased, 1= in activity&lt;br /&gt;
|-&lt;br /&gt;
| code_client&lt;br /&gt;
| varchar(24)&lt;br /&gt;
| YES&lt;br /&gt;
| MUL&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| client&#039;s code&lt;br /&gt;
|-&lt;br /&gt;
| code_fournisseur&lt;br /&gt;
| varchar(24)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| Supplier code&lt;br /&gt;
|-&lt;br /&gt;
| code_compta&lt;br /&gt;
| varchar(24)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| Customer account code&lt;br /&gt;
|-&lt;br /&gt;
| code_compta_fournisseur&lt;br /&gt;
| varchar(24)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| Supplier account code&lt;br /&gt;
|-&lt;br /&gt;
| address&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| company address&lt;br /&gt;
|-&lt;br /&gt;
| zip&lt;br /&gt;
| varchar(10)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| postal code&lt;br /&gt;
|-&lt;br /&gt;
| town&lt;br /&gt;
| varchar(50)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| town&lt;br /&gt;
|-&lt;br /&gt;
| fk_departement&lt;br /&gt;
| int(11)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| ID of province/state ([[Table llx_c_departements|llx_c_departements]]-&amp;gt;rowid)&lt;br /&gt;
|-&lt;br /&gt;
| fk_pays&lt;br /&gt;
| int(11)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| ID of country ([[Table llx_c_pays|llx_c_pays]]-&amp;gt;rowid)&lt;br /&gt;
|-&lt;br /&gt;
| phone&lt;br /&gt;
| varchar(20)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| phone number&lt;br /&gt;
|-&lt;br /&gt;
| fax&lt;br /&gt;
| varchar(20)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| fax number&lt;br /&gt;
|-&lt;br /&gt;
| url&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| web url&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| varchar(128)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| email&lt;br /&gt;
|-&lt;br /&gt;
| fk_secteur&lt;br /&gt;
| int(11)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| This column/field does not exist anymore in 3.3.0+&lt;br /&gt;
|-&lt;br /&gt;
| fk_effectif&lt;br /&gt;
| int(11)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| ID of range of number of employees ([[Table llx_c_effectif|llx_c_effectif]]-&amp;gt;id)&lt;br /&gt;
|-&lt;br /&gt;
| fk_typent&lt;br /&gt;
| int(11)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| ID of type of entity ([[Table llx_c_typent|llx_c_typent]]-&amp;gt;id)&lt;br /&gt;
|-&lt;br /&gt;
| fk_forme_juridique&lt;br /&gt;
| int(11)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| ID of legal status ([[Table llx_c_forme_juridique|llx_c_forme_juridique]]-&amp;gt;rowid)&lt;br /&gt;
|-&lt;br /&gt;
| fk_currency&lt;br /&gt;
| int(11)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| siren&lt;br /&gt;
| varchar(128)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| IDProf1&lt;br /&gt;
|-&lt;br /&gt;
| siret&lt;br /&gt;
| varchar(128)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| IDProf2&lt;br /&gt;
|-&lt;br /&gt;
| ape&lt;br /&gt;
| varchar(128)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| IDProf3&lt;br /&gt;
|-&lt;br /&gt;
| idprof4&lt;br /&gt;
| varchar(128)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| IDProf4&lt;br /&gt;
|-&lt;br /&gt;
| idprof5&lt;br /&gt;
| varchar(128)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| IDProf5&lt;br /&gt;
|-&lt;br /&gt;
| idprof6&lt;br /&gt;
| varchar(128)&lt;br /&gt;
| YES&lt;br /&gt;
|&lt;br /&gt;
| NULL&lt;br /&gt;
|&lt;br /&gt;
| idprof6 (this column/field has been newly added)&lt;br /&gt;
|-&lt;br /&gt;
| tva_intra&lt;br /&gt;
| varchar(20)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| VAT ID&lt;br /&gt;
|-&lt;br /&gt;
| capital&lt;br /&gt;
| double&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| capital of society&lt;br /&gt;
|-&lt;br /&gt;
| description&lt;br /&gt;
| text&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| fk_stcomm&lt;br /&gt;
| int(11)&lt;br /&gt;
| NO&lt;br /&gt;
| &lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| ID of commercial status ([[Table llx_c_stcomm|llx_c_stcomm]]-&amp;gt;id)&lt;br /&gt;
|-&lt;br /&gt;
| note_private&lt;br /&gt;
| text&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| private note&lt;br /&gt;
|-&lt;br /&gt;
| note_public&lt;br /&gt;
| text&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| public_note&lt;br /&gt;
|-&lt;br /&gt;
| prefix_comm&lt;br /&gt;
| varchar(5)&lt;br /&gt;
| YES&lt;br /&gt;
| MUL&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| prefix commercial&lt;br /&gt;
|-&lt;br /&gt;
| client&lt;br /&gt;
| tinyint(4)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| type of client (0/1/2/3) 1=customer 3=customer/prospect&lt;br /&gt;
|-&lt;br /&gt;
| fournisseur&lt;br /&gt;
| tinyint(4)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| is it a third party supplier (0/1)?&lt;br /&gt;
|-&lt;br /&gt;
| supplier_account&lt;br /&gt;
| varchar(32)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| account of a supplier&lt;br /&gt;
|-&lt;br /&gt;
| fk_prospectlevel&lt;br /&gt;
| varchar(12)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| ID of prospect level ([[Table llx_c_prospectlevel|llx_c_prospectlevel]]-&amp;gt;code)&lt;br /&gt;
|-&lt;br /&gt;
| customer_bad&lt;br /&gt;
| tinyint(4)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| is the customer deadbeat (0/1)?&lt;br /&gt;
|-&lt;br /&gt;
| customer_rate&lt;br /&gt;
| double&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| reliability rate of customer (0 to 1)?&lt;br /&gt;
|-&lt;br /&gt;
| supplier_rate&lt;br /&gt;
| double&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| reliability rate of supplier (0 to 1)?&lt;br /&gt;
|-&lt;br /&gt;
| fk_user_creat&lt;br /&gt;
| int(11)&lt;br /&gt;
| YES&lt;br /&gt;
| MUL&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| ID of user who created the entry ([[Table llx_user|llx_user]]-&amp;gt;rowid)&lt;br /&gt;
|-&lt;br /&gt;
| fk_user_modif&lt;br /&gt;
| int(11)&lt;br /&gt;
| YES&lt;br /&gt;
| MUL&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| ID of user who last modified the entry ([[Table llx_user|llx_user]]-&amp;gt;rowid)&lt;br /&gt;
|-&lt;br /&gt;
| remise_client&lt;br /&gt;
| double&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| systematic discount for the customer&lt;br /&gt;
|-&lt;br /&gt;
| mode_reglement&lt;br /&gt;
| tinyint(4)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| default payment mode&lt;br /&gt;
|-&lt;br /&gt;
| cond_reglement&lt;br /&gt;
| tinyint(4)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| default payment conditions&lt;br /&gt;
|-&lt;br /&gt;
| tva_assuj&lt;br /&gt;
| tinyint(4)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| 1&lt;br /&gt;
| &lt;br /&gt;
| Supplier: issues invoices with VAT? / Customer: is subject to VAT?&lt;br /&gt;
|-&lt;br /&gt;
| localtax1_assuj&lt;br /&gt;
| tinyint(4)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| is subject to localtax1?&lt;br /&gt;
|-&lt;br /&gt;
| localtax2_assuj&lt;br /&gt;
| tinyint(4)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| is subject to localtax2?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| barcode&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| This field is used to store barcode value of thirdparty when module barcode is enabled&lt;br /&gt;
|-&lt;br /&gt;
| fk_barcode_type&lt;br /&gt;
| int(11)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| This field is used to store barcode type (EAN, ISBN, ...) of thirdparty when module barcode is enabled &lt;br /&gt;
|-&lt;br /&gt;
| price_level&lt;br /&gt;
| int(11)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| level of price for multiprices&lt;br /&gt;
|-&lt;br /&gt;
| outstanding_limit&lt;br /&gt;
| double(24,8)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| Amount of allowed outstanding invoices before warning&lt;br /&gt;
|-&lt;br /&gt;
| default_lang&lt;br /&gt;
| varchar(6)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| default language for this thirdparty&lt;br /&gt;
|-&lt;br /&gt;
| logo&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| canvas&lt;br /&gt;
| varchar(32)&lt;br /&gt;
| YES&lt;br /&gt;
| &lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
{{FieldImportKey}}&lt;br /&gt;
|}&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== Keys ==&lt;br /&gt;
{| align=&amp;quot;left&amp;quot; width=&amp;quot;100%&amp;quot; border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; class=&amp;quot;dolbox&amp;quot;&lt;br /&gt;
 |style=&amp;quot;background-color: #e9e9ef&amp;quot;| &amp;lt;b&amp;gt;Key&amp;lt;/b&amp;gt;&lt;br /&gt;
 |style=&amp;quot;background-color: #e9e9ef&amp;quot;| &amp;lt;b&amp;gt;Type&amp;lt;/b&amp;gt;&lt;br /&gt;
 |style=&amp;quot;background-color: #e9e9ef&amp;quot;| &amp;lt;b&amp;gt;Fields&amp;lt;/b&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| PRIMARY&lt;br /&gt;
| PRIMARY&lt;br /&gt;
| rowid&lt;br /&gt;
|- &lt;br /&gt;
| uk_societe_prefix_comm&lt;br /&gt;
| UNIQUE&lt;br /&gt;
| prefix_comm,entity &lt;br /&gt;
|- &lt;br /&gt;
| uk_societe_code_client &lt;br /&gt;
| UNIQUE&lt;br /&gt;
| code_client,entity&lt;br /&gt;
|- &lt;br /&gt;
| idx_societe_user_creat &lt;br /&gt;
| MULTIPLE&lt;br /&gt;
| fk_user_creat&lt;br /&gt;
|- &lt;br /&gt;
| idx_societe_user_modif &lt;br /&gt;
| MULTIPLE&lt;br /&gt;
| fk_user_modif&lt;br /&gt;
|}&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
= Note =&lt;br /&gt;
{{flag en}} Third parties can be:&lt;br /&gt;
* suppliers or customers companies (depending on the sub-elements defined) or both.&lt;br /&gt;
* A normal person.&lt;br /&gt;
* A foundation.&lt;br /&gt;
&lt;br /&gt;
{{flag fr}} Un tiers peut être:&lt;br /&gt;
* une entreprises cliente ou fournisseur (ou les deux)&lt;br /&gt;
* une personne physique&lt;br /&gt;
* une association/fondation&lt;br /&gt;
&lt;br /&gt;
{{flag sp}} Un tercero puede ser:&lt;br /&gt;
* una empresa cliente o proveedor (o los dos)&lt;br /&gt;
* una persona física&lt;br /&gt;
* una asociación/fundación&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Transaction_type&amp;diff=48063</id>
		<title>Transaction type</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Transaction_type&amp;diff=48063"/>
		<updated>2020-08-04T18:53:22Z</updated>

		<summary type="html">&lt;p&gt;Egils: defaults found explained in a sql file&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Dolibarr uses the following transaction types in the [[Module_Banks_and_Cash_(developer)]]:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! fk_type !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| TYP || does not exist among the defaults. Probably a typo in the source file comment here: https://github.com/Dolibarr/dolibarr/blob/68fa8fdcaa84f1987ec6d9a05a3c32584db61ed4/htdocs/compta/bank/class/account.class.php#L472&lt;br /&gt;
|-&lt;br /&gt;
| VIR || Transfer, Used for virtual transfers to/from a bank account&lt;br /&gt;
|-&lt;br /&gt;
| PRE || Debit order&lt;br /&gt;
|-&lt;br /&gt;
| LIQ || Cash&lt;br /&gt;
|-&lt;br /&gt;
| VAD || Online payment&lt;br /&gt;
|-&lt;br /&gt;
| CB || Credit card&lt;br /&gt;
|-&lt;br /&gt;
| CHQ || Cheque&lt;br /&gt;
|-&lt;br /&gt;
| OW || Owners insert&lt;br /&gt;
|}&lt;br /&gt;
The defaults are listed here: https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/install/mysql/data/llx_c_paiement.sql&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Transaction_type&amp;diff=48062</id>
		<title>Transaction type</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Transaction_type&amp;diff=48062"/>
		<updated>2020-08-04T18:28:39Z</updated>

		<summary type="html">&lt;p&gt;Egils: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Dolibarr uses the following transaction types in the [[Module_Banks_and_Cash_(developer)]]:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! fk_type !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| TYP || ?&lt;br /&gt;
|-&lt;br /&gt;
| VIR || Used for virtual transfers to/from a bank account e.g. owners inserts&lt;br /&gt;
|-&lt;br /&gt;
| PRE || ?&lt;br /&gt;
|-&lt;br /&gt;
| LIQ || ?&lt;br /&gt;
|-&lt;br /&gt;
| VAD || ?&lt;br /&gt;
|-&lt;br /&gt;
| CB || ?&lt;br /&gt;
|-&lt;br /&gt;
| CHQ || Used for check&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Table_llx_bank&amp;diff=48061</id>
		<title>Table llx bank</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Table_llx_bank&amp;diff=48061"/>
		<updated>2020-08-04T18:28:20Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* Table */ insert link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Table SQL]]&lt;br /&gt;
[[Category:Bank]]&lt;br /&gt;
[[Category:Banque]]&lt;br /&gt;
[[Category:Banco]]&lt;br /&gt;
&lt;br /&gt;
{{ListOfTables}}&lt;br /&gt;
&lt;br /&gt;
= Content/Contenu/Contenido =&lt;br /&gt;
&lt;br /&gt;
{{flag en}} Contains the transactions operated on bank accounts.&lt;br /&gt;
&lt;br /&gt;
{{flag fr}} Contient les opérations effectuées sur les comptes bancaires.&lt;br /&gt;
&lt;br /&gt;
{{flag sp}} Contiene las transaccions efectuadas en las cuentas bancarias.&lt;br /&gt;
&lt;br /&gt;
= Structure =&lt;br /&gt;
== Table ==&lt;br /&gt;
{|  align=&amp;quot;left&amp;quot; width=&amp;quot;100%&amp;quot; border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; class=&amp;quot;dolbox&amp;quot;&lt;br /&gt;
 |style=&amp;quot;background-color: #e9e9ef&amp;quot;| &amp;lt;b&amp;gt;Field&amp;lt;/b&amp;gt;&lt;br /&gt;
 |style=&amp;quot;background-color: #e9e9ef&amp;quot;| &amp;lt;b&amp;gt;Type&amp;lt;/b&amp;gt;&lt;br /&gt;
 |style=&amp;quot;background-color: #e9e9ef&amp;quot;| &amp;lt;b&amp;gt;Null&amp;lt;/b&amp;gt;&lt;br /&gt;
 |style=&amp;quot;background-color: #e9e9ef&amp;quot;| &amp;lt;b&amp;gt;Key&amp;lt;/b&amp;gt;&lt;br /&gt;
 |style=&amp;quot;background-color: #e9e9ef&amp;quot;| &amp;lt;b&amp;gt;Default&amp;lt;/b&amp;gt;&lt;br /&gt;
 |style=&amp;quot;background-color: #e9e9ef&amp;quot;| &amp;lt;b&amp;gt;Extra&amp;lt;/b&amp;gt;&lt;br /&gt;
 |style=&amp;quot;background-color: #e9e9ef&amp;quot;| &amp;lt;b&amp;gt;Description&amp;lt;/b&amp;gt;&lt;br /&gt;
{{FieldRowid}}&lt;br /&gt;
|- &lt;br /&gt;
|datec &lt;br /&gt;
|datetime&lt;br /&gt;
|YES&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|NULL&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|date of creation technical&lt;br /&gt;
{{FieldTms}}&lt;br /&gt;
|- &lt;br /&gt;
|datev &lt;br /&gt;
|date&lt;br /&gt;
|YES&lt;br /&gt;
|MUL&lt;br /&gt;
|NULL&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|value date of the transaction&lt;br /&gt;
|- &lt;br /&gt;
|dateo &lt;br /&gt;
|date&lt;br /&gt;
|YES&lt;br /&gt;
|MUL&lt;br /&gt;
|NULL&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|date of the transaction&lt;br /&gt;
|- &lt;br /&gt;
|amount &lt;br /&gt;
|double(24,8)&lt;br /&gt;
|NO&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|0.00000000&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|amount of the transaction&lt;br /&gt;
|- &lt;br /&gt;
|label &lt;br /&gt;
|varchar(255)&lt;br /&gt;
|YES&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|NULL&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|label&lt;br /&gt;
|- &lt;br /&gt;
|fk_account &lt;br /&gt;
|int(11)&lt;br /&gt;
|YES&lt;br /&gt;
|MUL&lt;br /&gt;
|NULL&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|account number on which the transaction took place&lt;br /&gt;
|- &lt;br /&gt;
|fk_user_author &lt;br /&gt;
|int(11)&lt;br /&gt;
|YES&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|NULL&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
| ID of user author of the information ([[Table llx_user|llx_user]]-&amp;gt;rowid)&lt;br /&gt;
|- &lt;br /&gt;
|fk_user_rappro &lt;br /&gt;
|int(11)&lt;br /&gt;
|YES&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|NULL&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
| ID of user author of the rapprochement ([[Table llx_user|llx_user]]-&amp;gt;rowid)&lt;br /&gt;
|- &lt;br /&gt;
|fk_type &lt;br /&gt;
|varchar(4) &lt;br /&gt;
|YES&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|NULL&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|[[Transaction_type|transaction type]]&lt;br /&gt;
|- &lt;br /&gt;
|num_releve &lt;br /&gt;
|varchar(50)&lt;br /&gt;
|YES&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|NULL&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|number of summary of the bank on which the transaction&lt;br /&gt;
|- &lt;br /&gt;
|num_chq &lt;br /&gt;
|int(11)&lt;br /&gt;
|YES&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|NULL&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|number of check if significant&lt;br /&gt;
|- &lt;br /&gt;
|rappro &lt;br /&gt;
|tinyint(4)&lt;br /&gt;
|YES&lt;br /&gt;
|MUL&lt;br /&gt;
|0&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|indicates whether the line was rapproched or not&lt;br /&gt;
|- &lt;br /&gt;
|note &lt;br /&gt;
|text &lt;br /&gt;
|YES&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|NULL&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|note &lt;br /&gt;
|- &lt;br /&gt;
|fk_bordereau &lt;br /&gt;
|int(11)&lt;br /&gt;
|YES&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|0&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|Id du bordereau de remise de cheque&lt;br /&gt;
|- &lt;br /&gt;
|banque &lt;br /&gt;
|varchar(255) &lt;br /&gt;
|YES&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|NULL&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|name of the bank received the check&lt;br /&gt;
|- &lt;br /&gt;
|emetteur &lt;br /&gt;
|varchar(255) &lt;br /&gt;
|YES&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|NULL&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|name of the issuer of the check&lt;br /&gt;
|- &lt;br /&gt;
|author&lt;br /&gt;
|varchar(40) &lt;br /&gt;
|YES&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|NULL&lt;br /&gt;
|&amp;amp;nbsp;&lt;br /&gt;
|to delete after migration&lt;br /&gt;
|}&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
== Keys ==&lt;br /&gt;
{|  align=&amp;quot;left&amp;quot; width=&amp;quot;100%&amp;quot; border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; class=&amp;quot;dolbox&amp;quot;&lt;br /&gt;
 |style=&amp;quot;background-color: #e9e9ef&amp;quot;| &amp;lt;b&amp;gt;Key&amp;lt;/b&amp;gt;&lt;br /&gt;
 |style=&amp;quot;background-color: #e9e9ef&amp;quot;| &amp;lt;b&amp;gt;Type&amp;lt;/b&amp;gt;&lt;br /&gt;
 |style=&amp;quot;background-color: #e9e9ef&amp;quot;| &amp;lt;b&amp;gt;Fields&amp;lt;/b&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| PRIMARY&lt;br /&gt;
| PRIMARY &lt;br /&gt;
| rowid&lt;br /&gt;
|- &lt;br /&gt;
| idx_bank_datev &lt;br /&gt;
| MULTIPLE&lt;br /&gt;
| datev&lt;br /&gt;
|- &lt;br /&gt;
| idx_bank_dateo &lt;br /&gt;
| MULTIPLE&lt;br /&gt;
| dateo&lt;br /&gt;
|- &lt;br /&gt;
| idx_bank_fk_account&lt;br /&gt;
| MULTIPLE&lt;br /&gt;
| fk_account&lt;br /&gt;
|- &lt;br /&gt;
| idx_bank_rappro&lt;br /&gt;
| MULTIPLE&lt;br /&gt;
| rappro&lt;br /&gt;
|}&amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Transaction_type&amp;diff=48060</id>
		<title>Transaction type</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Transaction_type&amp;diff=48060"/>
		<updated>2020-08-04T18:27:24Z</updated>

		<summary type="html">&lt;p&gt;Egils: Created page with &amp;quot;Dolibarr uses the following transaction types in the Module_Banks_and_Cash_(developer): TYP,VIR,PRE,LIQ,VAD,CB,CHQ {| class=&amp;quot;wikitable&amp;quot; |- ! fk_type !! Meaning |- | TYP ||...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Dolibarr uses the following transaction types in the [[Module_Banks_and_Cash_(developer)]]:&lt;br /&gt;
TYP,VIR,PRE,LIQ,VAD,CB,CHQ&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! fk_type !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| TYP || ?&lt;br /&gt;
|-&lt;br /&gt;
| VIR || Used for virtual transfers to/from a bank account e.g. owners inserts&lt;br /&gt;
|-&lt;br /&gt;
| PRE || ?&lt;br /&gt;
|-&lt;br /&gt;
| LIQ || ?&lt;br /&gt;
|-&lt;br /&gt;
| VAD || ?&lt;br /&gt;
|-&lt;br /&gt;
| CB || ?&lt;br /&gt;
|-&lt;br /&gt;
| CHQ || Used for check&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Subscribe&amp;diff=48051</id>
		<title>Subscribe</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Subscribe&amp;diff=48051"/>
		<updated>2020-08-01T22:22:11Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* File:Lug.png Subscribe for first time to the foundation */ language improvements&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:Adhérer]]&lt;br /&gt;
[[es:Subscribirse]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Foundation]]&lt;br /&gt;
{{TemplateAssoEn}}&lt;br /&gt;
&lt;br /&gt;
You can help and support Dolibarr project by subscribing to the [[Dolibarr foundation]]. For this, go to chapter [[#Subscribe for first time to the foundation|Subscribe for first time to the foundation]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= [[File:Lug.png]] Subscribe for the first time to the foundation =&lt;br /&gt;
&lt;br /&gt;
Amount to subscribe depends on your status (&#039;&#039;&#039;personal&#039;&#039;&#039;, &#039;&#039;&#039;company&#039;&#039;&#039;, &#039;&#039;&#039;foundation&#039;&#039;&#039;, &#039;&#039;&#039;organization&#039;&#039;&#039;...). The page &amp;quot;[[Subscription amount Dolibarr Foundation]]&amp;quot; show you the minimum amount of a subscription.&lt;br /&gt;
&lt;br /&gt;
Have you decided to become a member? Choose the method you prefer... &lt;br /&gt;
&lt;br /&gt;
=== To subscribe using a credit card ===&lt;br /&gt;
* Fill the form available on page {{FoundationSubscribeUrl}}&lt;br /&gt;
* Once the form is submitted, click on &amp;quot;Pay with credit card&amp;quot;, you will reach a page to type your Credit or Debit card information.&lt;br /&gt;
Once this page is validated, your subscription will be automatically recorded and you should receive an email with the invoice of your subscription/membership.&lt;br /&gt;
&lt;br /&gt;
=== To subscribe using Paypal ===&lt;br /&gt;
* Fill the form available on page {{FoundationSubscribeUrl}}&lt;br /&gt;
* Once the form is submitted, click on &amp;quot;Pay with credit card or Paypal&amp;quot;, you will arraive on a page to type your credit card information.&lt;br /&gt;
Once this page is validated, your subscription will be automatically recorded and you should receive an email with the invoice of your subscription/membership.&lt;br /&gt;
&lt;br /&gt;
=== To subscribe making a bank transfer ===&lt;br /&gt;
* Fill the form available on page {{FoundationSubscribeUrl}}&lt;br /&gt;
* Once this is done, make a bank transfer with amount defined in page [[Subscription amount Dolibarr Foundation]], on the bank account of foundation. This is BAN informations:&lt;br /&gt;
 Name of bank: CAISSE D&#039;EPARGNE&lt;br /&gt;
 Bank code: 14505&lt;br /&gt;
 Desk code: 00001&lt;br /&gt;
 Account number: 08000207968&lt;br /&gt;
 Key RIB:	70&lt;br /&gt;
 IBAN: FR7614505000010800020796870&lt;br /&gt;
 BIC/SWIFT: CEPAFRPP450&lt;br /&gt;
* Once bank transfert is done, send a mail to &#039;&#039;&#039;contact@dolibarr.org&#039;&#039;&#039; with this content:&lt;br /&gt;
 Hi, i&#039;ve just made the bank transfer for my subscription to the Dolibarr foundation.&lt;br /&gt;
 This is description of movement:&lt;br /&gt;
 My name: _______&lt;br /&gt;
 Date of bank transfer: _______&lt;br /&gt;
 Amount: _______&lt;br /&gt;
 Thanks to send me a mail once my subscription has been validated.&lt;br /&gt;
If you need an invoice, please ask it by email to &#039;&#039;&#039;contact@dolibarr.org&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= [[File:Event.png]] Renew your subscription to foundation =&lt;br /&gt;
If you are already a member, to renew your membership, just wait to receive the mail that will invite you to renew your subscription. Instructions to make your renewal will be described.&lt;br /&gt;
If you don&#039;t receive the mail, please contact foundation at &#039;&#039;&#039;tresorier@dolibarr.org&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Dolibarr_Preferred_Partner&amp;diff=48050</id>
		<title>Dolibarr Preferred Partner</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Dolibarr_Preferred_Partner&amp;diff=48050"/>
		<updated>2020-08-01T22:18:03Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* For all countries */ clarified by adding a word&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:Dolibarr_Preferred_Partner_fr]]&lt;br /&gt;
[[es:Dolibarr_Preferred_Partner_es]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TemplateAssoEn}}&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:Business people large.png|120px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This page describe the &#039;&#039;&#039;Dolibarr Preferred Partner&#039;&#039;&#039; program of &#039;&#039;&#039;Dolibarr ERP &amp;amp; CRM&#039;&#039;&#039; software. You will find here terms and condition to be certified, and constraints and benefits.&lt;br /&gt;
For a list of partners in the world, see page [[List of Dolibarr partners and providers]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= What is a Dolibarr Preferred Partner (Provided services) =&lt;br /&gt;
A &amp;quot;&#039;&#039;&#039;Dolibarr Preferred Partner&#039;&#039;&#039;&amp;quot; is a supplier that provides services around Dolibarr ERP-CRM while offering guarantees to be reliable and competent around product and offered services.&lt;br /&gt;
&lt;br /&gt;
The following is list of all services a company can provide as a certified [[File:Dolibarr_preferred_partner_int.png|100px]]&lt;br /&gt;
# Installation/Setup&lt;br /&gt;
# User training / Development training&lt;br /&gt;
# Help and support&lt;br /&gt;
# Custom development&lt;br /&gt;
# Dolibarr web hosting (SaaS or cloud hosting)&lt;br /&gt;
&lt;br /&gt;
Partners can offer one or more of these services but not necessarily all of them. Also, a company can offer all of these services without being certified. The label is above all a guarantee of quality for customers but it can also be a way to benefit from some advantages (see below).&lt;br /&gt;
&lt;br /&gt;
Do not confuse &amp;quot;Dolibarr Preferred Partner&amp;quot; with &amp;quot;Dolibarr Communities&amp;quot;. Communities are groups of enthusiasts who work (without necessarily having references) promoting Dolibarr. If you want to also create a Dolibarr community in your region or country, see [[Create a Dolibarr local community]].&lt;br /&gt;
&lt;br /&gt;
The list of Preferred Partners is available on the [[List of Dolibarr partners and providers]] page.&lt;br /&gt;
&lt;br /&gt;
= Eligibility Rules =&lt;br /&gt;
Eligibility rules for the label are:&lt;br /&gt;
&lt;br /&gt;
* Being a company registered in your country.&lt;br /&gt;
&lt;br /&gt;
Then you have to enter the criteria for your country:&lt;br /&gt;
&lt;br /&gt;
== For France, Belgium, Switzerland, Luxembourg (cumulative points) ==&lt;br /&gt;
* A) The company must have a website and at least 1 link to the web site https://www.dolibarr.org or https://www.dolibarr.xx (where xx is fr, es, it, de, pt...) must be included on a page (home page is better).&lt;br /&gt;
* B) The company must be a member of the Dolibarr foundation (either as a moral member or as an individual member) for more than 1 year. To be a member of the Dolibarr foundation, just follow instructions on page [[Subscribe#Subscribe_for_first_time_to_the_foundation|Subscribe]].&lt;br /&gt;
* C) The company should have&lt;br /&gt;
** submitted/published at least 500 approved lines of code or translations (in the source code, into a module on dolistore.com or onto the wiki.dolibarr.org) &lt;br /&gt;
** OR have represented Dolibarr in at least one computer room or congress during past year &lt;br /&gt;
** OR have published two press releases about Dolibarr into past year.&lt;br /&gt;
This point C is to guarantee that company is active in the project community.&lt;br /&gt;
* D) The company must agree to have in its ranks at least one active contributor (&amp;quot;active&amp;quot; will be define by analyzing github, wiki or forums contributions).&lt;br /&gt;
&lt;br /&gt;
== For Spain and Latino America ==&lt;br /&gt;
* All rules are defined into page https://www.dolibarr.es/index.php/dolibarr-partners/quiero-ser-partner&lt;br /&gt;
* The company must have a website and at least 1 link to the web site https://www.dolibarr.org or https://www.dolibarr.xx (where xx is fr, es, it, de, pt...) must be included on a page (home page is better).&lt;br /&gt;
&lt;br /&gt;
== For other countries (cumulative points) ==&lt;br /&gt;
* A) The company must have a website and at least 1 link to the web site https://www.dolibarr.org or https://www.dolibarr.xx (where xx is fr, es, it, de, pt...) must be included on a page (home page is better).&lt;br /&gt;
* B) The company must be a member of the Dolibarr foundation (either as a moral member or as an individual member) for more than 1 year. To be a member of the Dolibarr Foundation, just follow instructions on page [[Subscribe#Subscribe_for_first_time_to_the_foundation|Subscribe]].&lt;br /&gt;
* C) The company should&lt;br /&gt;
** have submitted at least 500 approved lines of code or translations during past year (in the source code, into a module on dolistore.com or onto the wiki.dolibarr.org)&lt;br /&gt;
** OR have represented Dolibarr in at least one computer room or congress during past year &lt;br /&gt;
** OR have published two press releases about Dolibarr during past year. &lt;br /&gt;
This point C is to guarantee that company is active in the project community.&lt;br /&gt;
* D) The company must agree to have in its ranks at least one active contributor (&amp;quot;active&amp;quot; will be define by analyzing github, wiki and/or forums contributions).&lt;br /&gt;
&lt;br /&gt;
These rules are subject to change by strengthening over time. The board members of the Dolibarr foundation may decide to grant the label even if one criteria is not completely filled, checking that the partner has otherwise proved his involvement and contribution in the project. This case, however, requires an unanimous vote (no votes against) from the board members after request by a member of the Dolibarr foundation.&lt;br /&gt;
&lt;br /&gt;
= Constraints =&lt;br /&gt;
== For all countries ==&lt;br /&gt;
The following constraints must be met:&lt;br /&gt;
&lt;br /&gt;
A1) The company must redirect clients with tasks that it can&#039;t provide to another Dolibarr Preferred Partner (list available here: [[List of Dolibarr partners and providers]]). Information can be posted on mailing list &#039;&#039;&#039;dolibarr-preferred-partners@nongnu.org&#039;&#039;&#039; where all Dolibarr Preferred Partners are subscribers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the company provides hosting service Dolibarr (SaaS), it must agree to the following:&lt;br /&gt;
&lt;br /&gt;
B1) Time display of a page &amp;lt;2 seconds (measurement made at the Firebug plugin for Firefox)&lt;br /&gt;
&lt;br /&gt;
B2) The host must provide updates of Dolibarr to all of its customers (except if customer request this opposite) of a stable version that is not older than 12 months.&lt;br /&gt;
&lt;br /&gt;
B3) All features included with the standard version of Dolibarr must be enabled. The company is free to add additional modules.&lt;br /&gt;
&lt;br /&gt;
B4) If there are limitations of time or amount that have been added in some offers compared to standard Dolibarr version, the list must appear in the general sales conditions / accommodation.&lt;br /&gt;
&lt;br /&gt;
== Specific to Spain and Latin America ==&lt;br /&gt;
* Other constraints are defined in page: https://www.dolibarr.es/index.php/dolibarr-partners/quiero-ser-partner&lt;br /&gt;
&lt;br /&gt;
= Process to get certification =&lt;br /&gt;
== For France, Belgium, Switzerland, Luxembourg ==&lt;br /&gt;
* Create a GitHub account (go on https://github.com/). At least one login will be required to fill the request form.&lt;br /&gt;
* Subscribe to be a member of the [[Subscribe|Dolibarr foundation]].&lt;br /&gt;
* Once subscription and payment recevied, fill the following request document: [[Media:Dolibarr preferred partner contract.odt]] and send it by email to &#039;&#039;&#039;contact@dolibarr.org&#039;&#039;&#039;&lt;br /&gt;
Once document will be received, we will examine your file (delay between 1 and {{TemplateDelayPreferredPartner}} month).&lt;br /&gt;
&lt;br /&gt;
If approved, the foundation add you as a Dolibarr partner into the [[List of Dolibarr partners and providers]] and a contract signed by the office of the foundation will be sent, which will serve as a certificate.&lt;br /&gt;
&lt;br /&gt;
== For Spain and Latino America ==&lt;br /&gt;
Complete the [http://www.dolibarr.es/index.php/contacto-dolibarr following form] and provide the following to the company &#039;&#039;&#039;2Byte.es&#039;&#039;&#039;:&lt;br /&gt;
* CIF Fotocopias del de la empresa.&lt;br /&gt;
* Fotocopias certificado de alta de la empresa.&lt;br /&gt;
* Fotocopias del IAE.&lt;br /&gt;
At the end of this, the application is assessed. If approved, a contract will be signed between 2Byte and the company. 2byte will add the company on the [[List of Dolibarr partners and providers]].&lt;br /&gt;
&lt;br /&gt;
== For all other countries ==&lt;br /&gt;
* Create a GitHub account (go on https://github.com/). At least one login will be required to fill the request form.&lt;br /&gt;
* Subscribe to be a member of the [[Subscribe|Dolibarr foundation]].&lt;br /&gt;
* Fill the following request document: [[Media:Dolibarr preferred partner contract.odt]] and send it by email to &#039;&#039;&#039;contact@dolibarr.org&#039;&#039;&#039;&lt;br /&gt;
Once document will be received, we will examine your file (delay between 1 and {{TemplateDelayPreferredPartner}} month).&lt;br /&gt;
&lt;br /&gt;
If approved, the foundation add you as a Dolibarr partner into the [[List of Dolibarr partners and providers]] and a contract signed by the office of the foundation will be sent, which will serve as a certificate.&lt;br /&gt;
&lt;br /&gt;
= Rules of validity =&lt;br /&gt;
* The certification is valid for a period of one year. It is reviewed annually and renewed automatically as long as the conditions are met (Note: The criteria, however, may have hardened in the meantime).&lt;br /&gt;
* The certification is valid for the countries whose language used is a language in which the partner serves.&lt;br /&gt;
&lt;br /&gt;
= Benefits =&lt;br /&gt;
== For all countries ==&lt;br /&gt;
* The company is promoted by the Dolibarr foundation. For example, the company is highlighted on the [[List of Dolibarr partners and providers]] (Send an email to contact@dolibarr.org if it is not), but also on other information channels controlled by the Dolibarr foundation.&lt;br /&gt;
* The Company may use the logo &amp;quot;DOLIBARR Preferred Partner&amp;quot; on its website (in such a case, the logo must point to https://partners.dolibarr.org/ web site) and all documents:&lt;br /&gt;
&amp;lt;center&amp;gt; [[File: Dolibarr_preferred_partner_int.png | 160px]] &amp;lt;/center&amp;gt;&lt;br /&gt;
or Spanish-speaking countries:&lt;br /&gt;
&amp;lt;center&amp;gt; [[File: Dolibarr_preferred_partner_es.png | 160px]] &amp;lt;/center&amp;gt;&lt;br /&gt;
* The company can highlight the term &amp;quot;Dolibarr Preferred Partner&amp;quot; on its website and all its documents.&lt;br /&gt;
* The company may receive and use all marketing materials provided by the foundation or company 2byte (Spanish speaking countries). For example, business cards, flyers, slide templates or roll-ups available at Git URL: git://github.com/Dolibarr/foundation.git. All of content into this repository is licensed under licence CC-BY-SA. You are free to modify, translate and use them.&lt;br /&gt;
* The company is listed on the mailing-list &#039;&#039;&#039;dolibarr-preferred-partners@nongnu.org&#039;&#039;&#039; ({{TemplateURLMLDev}}) for receiving the following information:&lt;br /&gt;
** Miscellaneous information&lt;br /&gt;
** Eventually, list of tenders sent by other &amp;quot;Dolibarr Preferred Partners&amp;quot; who can not meet the need of their client (in such case, language of forwarded message may be in any language, not necessarily yours).&lt;br /&gt;
* The company can then provide any kind of services on Dolibarr among the one described into first chapter, with price and condition of its choice (note that everybody can do this, even without beeing a Preferred Partner).&lt;br /&gt;
&lt;br /&gt;
== Specific to Spain and Latino America ==&lt;br /&gt;
* Partners benefits also services defined in page: https://www.dolibarr.es/index.php/dolibarr-partners/quiero-ser-partner&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Web_Services_API_REST_(developer)&amp;diff=48046</id>
		<title>Module Web Services API REST (developer)</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Web_Services_API_REST_(developer)&amp;diff=48046"/>
		<updated>2020-08-01T10:12:56Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* Use */ accepted date format&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:Module_Web_Services_API_REST_(développeur)]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
{{TemplateModEN}}&lt;br /&gt;
[[Category:List of Modules]]&lt;br /&gt;
{{BasculeDevUserEn|&lt;br /&gt;
name=Web services|&lt;br /&gt;
num=2610|&lt;br /&gt;
devdoc=This page|&lt;br /&gt;
userdoc=Not applicable|}}&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;
= Function =&lt;br /&gt;
When enabling this module, you enable usage of web services provided by Dolibarr server. You can then make REST call of different web services provided by Dolibarr.&lt;br /&gt;
&lt;br /&gt;
= Dolibarr REST web services server =&lt;br /&gt;
Once module webservices REST is activated, Dolibarr become also a server of REST web services. So you can send your own REST request to relative URL&lt;br /&gt;
&#039;&#039;&#039;/api/index.php/xxx&#039;&#039;&#039; where xxx is name of the API to call.&lt;br /&gt;
&lt;br /&gt;
A list of APIs on your installation can be found via the explorer.&lt;br /&gt;
&lt;br /&gt;
==Apache setup==&lt;br /&gt;
There is nothing to do. If your Dolibarr is working with Apache, the REST API should also work. APIs will be served by the same virtual web server than your application.&lt;br /&gt;
&lt;br /&gt;
==Nginx setup==&lt;br /&gt;
Like Apache, if your Dolibarr is working inside a NGinx virtual host, you should have nothing to do to have your API working. APIs will be served by the same virtual web server than your application.&lt;br /&gt;
&lt;br /&gt;
If you experience troubles, you can try to edit your NGinx config file to match the following example. This is a simple localhost setup with a working REST API handling (tested with 9.0.1 on parabola gnu/linux).&lt;br /&gt;
&amp;lt;source language=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
worker_processes  1;&lt;br /&gt;
error_log  /var/log/nginx/error.log;&lt;br /&gt;
&lt;br /&gt;
events {&lt;br /&gt;
    worker_connections  1024;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http {&lt;br /&gt;
    include       mime.types;&lt;br /&gt;
    default_type  application/octet-stream;&lt;br /&gt;
&lt;br /&gt;
    #log_format  main  &#039;$remote_addr - $remote_user [$time_local] &amp;quot;$request&amp;quot; &#039;&lt;br /&gt;
    #                  &#039;$status $body_bytes_sent &amp;quot;$http_referer&amp;quot; &#039;&lt;br /&gt;
    #                  &#039;&amp;quot;$http_user_agent&amp;quot; &amp;quot;$http_x_forwarded_for&amp;quot;&#039;;&lt;br /&gt;
&lt;br /&gt;
    #access_log  logs/access.log  main;&lt;br /&gt;
&lt;br /&gt;
    sendfile        on;&lt;br /&gt;
    #tcp_nopush     on;&lt;br /&gt;
&lt;br /&gt;
    #keepalive_timeout  0;&lt;br /&gt;
    keepalive_timeout  65;&lt;br /&gt;
&lt;br /&gt;
    #gzip  on;&lt;br /&gt;
&lt;br /&gt;
    server {&lt;br /&gt;
    	listen		80;&lt;br /&gt;
        server_name     dolibarr.localhost; # adjust to your domain&lt;br /&gt;
&lt;br /&gt;
        root    /usr/share/webapps/dolibarr/htdocs; # adjust to your path &lt;br /&gt;
        index   index.php;&lt;br /&gt;
&lt;br /&gt;
        # from https://github.com/Dolibarr/dolibarr/issues/6163#issuecomment-391265538&lt;br /&gt;
        location ~ [^/]\.php(/|$) {&lt;br /&gt;
            fastcgi_split_path_info ^(.+?\.php)(/.*)$;&lt;br /&gt;
            if (!-f $document_root$fastcgi_script_name) {&lt;br /&gt;
                return 404;&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            # Mitigate https://httpoxy.org/ vulnerabilities&lt;br /&gt;
            fastcgi_param HTTP_PROXY &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
            root           /usr/share/webapps/dolibarr/htdocs;&lt;br /&gt;
            fastcgi_pass   unix:/run/php-fpm/php-fpm.sock;&lt;br /&gt;
            fastcgi_index  index.php;&lt;br /&gt;
            include        fastcgi_params;&lt;br /&gt;
            fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;&lt;br /&gt;
            # Dolibarr Rest API path support&lt;br /&gt;
            fastcgi_param  PATH_INFO       $fastcgi_path_info;&lt;br /&gt;
            fastcgi_param  PATH_TRANSLATED $document_root$fastcgi_script_name;&lt;br /&gt;
        }&lt;br /&gt;
     }		&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= List of provided services =&lt;br /&gt;
Only few services are available. Starting to Dolibarr 5.0 version, you can see full list of Dolibarr Web services provided, by calling the explorer here at address:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;http://yourdolibarrurl/api/index.php/explorer&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You must first make the first call to the &#039;&#039;&#039;login&#039;&#039;&#039; api to get the API key.&lt;br /&gt;
Then enter api key to get list of all other available API services.&lt;br /&gt;
&lt;br /&gt;
For example, you can try the explorer on the demo instance at:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;https://demo.dolibarr.org/api/index.php/explorer&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You must first make the first call to the &#039;&#039;&#039;login&#039;&#039;&#039; api to get the API key.&lt;br /&gt;
Then enter api key to get list of all other available API services.&lt;br /&gt;
&lt;br /&gt;
You can then test directly from this explorer any API. This is the recommended solution to test any Dolibarr API since any API and parameters is documented here. As a result of any test, you will get the answer but also example on how to call the API from command line using &#039;&#039;&#039;curl&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
To install, open the modules page and activate de API REST module. On the configuration page of the module, there&#039;s a link to an explorer. Click on it to open the API explorer.&lt;br /&gt;
&lt;br /&gt;
On the top right corner, paste the &amp;lt;token&amp;gt; of the user you want to use to call the API and click the &amp;quot;explore&amp;quot; button. Note: The token of each user can be defined on the user record page. &lt;br /&gt;
&lt;br /&gt;
After clicking on &amp;quot;Explore&amp;quot;, you should see all the actions available with this token. If you don&#039;t have a lot of actions, it&#039;s probably because the according modules are not activated. If you want to see the invoices, you have to activate the invoice module in the configuration of Dolibarr. Same for products, third parties and so on.&lt;br /&gt;
&lt;br /&gt;
On this exploration page of the API, you can do quite a lot of tests. Reading datas from Dolibarr and writing, modifying and deleting as well. Warning: Data are really modified in your database.&lt;br /&gt;
&lt;br /&gt;
= Use =&lt;br /&gt;
&lt;br /&gt;
To use the REST API,  you have to call an url such as this one : &amp;lt;nowiki&amp;gt;http://&amp;lt;my_server&amp;gt;/api/index.php/&amp;lt;action&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
with one of the 4 following methods : GET, POST, PUT, DELETE, replacing &amp;lt;action&amp;gt; by the action you want to use. Ex : &amp;lt;nowiki&amp;gt;http://&amp;lt;my_server&amp;gt;/api/index.php/invoices&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There&#039;s different ways to do so. Here&#039;s a piece of code but you can also use libraries such as phphttpclient.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Example of function to call a REST API&lt;br /&gt;
function callAPI($method, $apikey, $url, $data = false)&lt;br /&gt;
{&lt;br /&gt;
    $curl = curl_init();&lt;br /&gt;
    $httpheader = [&#039;DOLAPIKEY: &#039;.$apikey];&lt;br /&gt;
&lt;br /&gt;
    switch ($method)&lt;br /&gt;
    {&lt;br /&gt;
        case &amp;quot;POST&amp;quot;:&lt;br /&gt;
            curl_setopt($curl, CURLOPT_POST, 1);&lt;br /&gt;
            $httpheader[] = &amp;quot;Content-Type:application/json&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
            if ($data)&lt;br /&gt;
                curl_setopt($curl, CURLOPT_POSTFIELDS, $data);&lt;br /&gt;
&lt;br /&gt;
            break;&lt;br /&gt;
        case &amp;quot;PUT&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
	    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, &#039;PUT&#039;);&lt;br /&gt;
            $httpheader[] = &amp;quot;Content-Type:application/json&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
            if ($data)&lt;br /&gt;
                curl_setopt($curl, CURLOPT_POSTFIELDS, $data);&lt;br /&gt;
&lt;br /&gt;
            break;&lt;br /&gt;
        default:&lt;br /&gt;
            if ($data)&lt;br /&gt;
                $url = sprintf(&amp;quot;%s?%s&amp;quot;, $url, http_build_query($data));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Optional Authentication:&lt;br /&gt;
    //    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);&lt;br /&gt;
    //    curl_setopt($curl, CURLOPT_USERPWD, &amp;quot;username:password&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    curl_setopt($curl, CURLOPT_URL, $url);&lt;br /&gt;
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    curl_setopt($curl, CURLOPT_HTTPHEADER, $httpheader);&lt;br /&gt;
&lt;br /&gt;
    $result = curl_exec($curl);&lt;br /&gt;
&lt;br /&gt;
    curl_close($curl);&lt;br /&gt;
&lt;br /&gt;
    return $result;&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is just a working example. There&#039;s no error control and security was not in mind but you can use this code, modify it to suit your needs&amp;lt;br/&amp;gt;&lt;br /&gt;
The fonction has 4 parameters :&lt;br /&gt;
* $method : string, &amp;quot;GET&amp;quot;, &amp;quot;POST&amp;quot;, &amp;quot;PUT&amp;quot;, &amp;quot;DELETE&amp;quot;&lt;br /&gt;
* $apikey : string, &amp;quot;your &amp;lt;token&amp;gt; generated earlier&amp;quot;&lt;br /&gt;
* $url : string, url to call. Ex : &amp;quot;&amp;lt;nowiki&amp;gt;http://&amp;lt;my_server&amp;gt;/api/index.php/invoices&amp;lt;/nowiki&amp;gt;&amp;quot;&lt;br /&gt;
* $data : string, datas in json format. This parameter is not mandatory.&lt;br /&gt;
&lt;br /&gt;
==Accepted parameters==&lt;br /&gt;
This is documented somewhat in the REST Explorer. Check that first. Second try and see what response you get. Third look at the source code for the given API.&lt;br /&gt;
&lt;br /&gt;
===Date==&lt;br /&gt;
The ISO date format is accepted: %Y-%m-%d e.g. 2020-07-14. yymmdd is not accepted.&lt;br /&gt;
&lt;br /&gt;
= Examples with PHP =&lt;br /&gt;
&lt;br /&gt;
This is more examples, for different uses cases:&lt;br /&gt;
&lt;br /&gt;
In every examples, we have:&lt;br /&gt;
* $apiKey = &amp;quot;&amp;lt;my token&amp;gt;&amp;quot;;&lt;br /&gt;
* $apiUrl = &amp;quot;&amp;lt;nowiki&amp;gt;http://&amp;lt;my_server&amp;gt;/api/index.php/&amp;lt;/nowiki&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Retrieve products list&lt;br /&gt;
	$listProduits = [];&lt;br /&gt;
	$produitParam = [&amp;quot;limit&amp;quot; =&amp;gt; 10000, &amp;quot;sortfield&amp;quot; =&amp;gt; &amp;quot;rowid&amp;quot;];&lt;br /&gt;
	$listProduitsResult = CallAPI(&amp;quot;GET&amp;quot;, $apiKey, $apiUrl.&amp;quot;products&amp;quot;, $produitParam);&lt;br /&gt;
	$listProduitsResult = json_decode($listProduitsResult, true);&lt;br /&gt;
&lt;br /&gt;
	if (isset($listProduitsResult[&amp;quot;error&amp;quot;]) &amp;amp;&amp;amp; $listProduitsResult[&amp;quot;error&amp;quot;][&amp;quot;code&amp;quot;] &amp;gt;= &amp;quot;300&amp;quot;) {&lt;br /&gt;
	} else {&lt;br /&gt;
		foreach ($listProduitsResult as $produit) {&lt;br /&gt;
			$listProduits[intval($produit[&amp;quot;id&amp;quot;])] = html_entity_decode($produit[&amp;quot;ref&amp;quot;], ENT_QUOTES);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* I retrieve the 10&#039;000 first products sorted on their ID in the base&lt;br /&gt;
* html_entity_decode is necessary as single quotes are encoded&lt;br /&gt;
* It&#039;s easy to use the same method (replacing products with dictionnarycountries) to retrieve the list of countries and their ID&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Create a product&lt;br /&gt;
	$ref = &amp;quot;my_product_ref_X203ZZ&amp;quot;;&lt;br /&gt;
	$newProduct = [&lt;br /&gt;
		&amp;quot;ref&amp;quot;	=&amp;gt; $ref,&lt;br /&gt;
		&amp;quot;label&amp;quot;	=&amp;gt; $ref&lt;br /&gt;
	];&lt;br /&gt;
	$newProductResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;products&amp;quot;, json_encode($newProduct));&lt;br /&gt;
	$newProductResult = json_decode($newProductResult, true);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* before creating a product, it could be wise to check if it exists. Using my first example, you&#039;ll have  :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// my ref&lt;br /&gt;
	$ref = &amp;quot;my_product_ref_X203ZZ&amp;quot;;&lt;br /&gt;
// does it exist in my array&lt;br /&gt;
	$produitKey = array_search($ref, $listProduits);&lt;br /&gt;
	if ($produitKey) {&lt;br /&gt;
// yes&lt;br /&gt;
		$fk_product = $produitKey;&lt;br /&gt;
	} else {&lt;br /&gt;
// no&lt;br /&gt;
// Create the product&lt;br /&gt;
		$newProduct = [&lt;br /&gt;
			&amp;quot;ref&amp;quot;	=&amp;gt; $ref,&lt;br /&gt;
			&amp;quot;label&amp;quot;	=&amp;gt; $ref&lt;br /&gt;
		];&lt;br /&gt;
		$newProductResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;products&amp;quot;, json_encode($newProduct));&lt;br /&gt;
		$newProductResult = json_decode($newProductResult, true);&lt;br /&gt;
		if (isset($newProductResult[&amp;quot;error&amp;quot;]) &amp;amp;&amp;amp; $newProductResult[&amp;quot;error&amp;quot;][&amp;quot;code&amp;quot;] &amp;gt;= &amp;quot;300&amp;quot;) {&lt;br /&gt;
// there&#039;s been an error&lt;br /&gt;
			echo &amp;quot;&amp;lt;pre&amp;gt;ERROR&amp;quot;, var_dump($newProductResult), &amp;quot;&amp;lt;/pre&amp;gt;&amp;quot;;&lt;br /&gt;
			exit;&lt;br /&gt;
		} else {&lt;br /&gt;
// everything good&lt;br /&gt;
			$fk_product = $newProductResult;&lt;br /&gt;
			$listProduits[$fk_product] = $ref;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* I check if the ref of my product exist in the array created in the first example.&lt;br /&gt;
* If it exists, I use it&#039;s key in the array as ID&lt;br /&gt;
* If it doesn&#039;t exist, I create the product, then I add it to my array for next time then I use the ID created&lt;br /&gt;
* I choose this method to do less API calls when I have to import 500 orders. I just need to retrieve the products list once at the beginning instead of searching Dolibarr each time.&lt;br /&gt;
&lt;br /&gt;
Warning: The example below is not working properly. Creating an order and lines in one go is not supported. Instead you have to create an order first and with the returned order id add the lines using the /orders/{id}/lines endpoint. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// create an order with 2 products&lt;br /&gt;
&lt;br /&gt;
// The array where there will be all the products lines of my order.&lt;br /&gt;
	$newCommandeLine = [];&lt;br /&gt;
&lt;br /&gt;
// product 1&lt;br /&gt;
	$ref1 = &amp;quot;my_product_ref_X203ZZ&amp;quot;;&lt;br /&gt;
	$prix1 = 10;&lt;br /&gt;
	$qtt1  = 100;&lt;br /&gt;
	$tva1 = 20;&lt;br /&gt;
	$fk_product1&lt;br /&gt;
// product 2&lt;br /&gt;
	$ref2 = &amp;quot;my_product_ref_B707FD&amp;quot;;&lt;br /&gt;
	$prix2 = 13;&lt;br /&gt;
	$qtt2  = 37;&lt;br /&gt;
	$tva2 = 20;&lt;br /&gt;
&lt;br /&gt;
	$newCommandeLine[] = [&lt;br /&gt;
		&amp;quot;desc&amp;quot;		=&amp;gt; $ref1,&lt;br /&gt;
		&amp;quot;subprice&amp;quot;	=&amp;gt; $prix1,&lt;br /&gt;
		&amp;quot;qty&amp;quot;		=&amp;gt; $qtt1,&lt;br /&gt;
		&amp;quot;tva_tx&amp;quot;	=&amp;gt; floatval($tva1),&lt;br /&gt;
		&amp;quot;fk_product&amp;quot;=&amp;gt; $fk_product1&lt;br /&gt;
	];&lt;br /&gt;
&lt;br /&gt;
	$newCommandeLine[] = [&lt;br /&gt;
		&amp;quot;desc&amp;quot;		=&amp;gt; $ref2,&lt;br /&gt;
		&amp;quot;subprice&amp;quot;	=&amp;gt; $prix2,&lt;br /&gt;
		&amp;quot;qty&amp;quot;		=&amp;gt; $qtt2,&lt;br /&gt;
		&amp;quot;tva_tx&amp;quot;	=&amp;gt; floatval($tva2),&lt;br /&gt;
		&amp;quot;fk_product&amp;quot;=&amp;gt; $fk_product2&lt;br /&gt;
	];&lt;br /&gt;
&lt;br /&gt;
	if (count($newCommandeLine) &amp;gt; 0) {&lt;br /&gt;
		$newCommande = [&lt;br /&gt;
			&amp;quot;socid&amp;quot;			=&amp;gt; $clientDoliId,&lt;br /&gt;
			&amp;quot;type&amp;quot; 			=&amp;gt; &amp;quot;0&amp;quot;,&lt;br /&gt;
			&amp;quot;lines&amp;quot;			=&amp;gt; $newCommandeLine,&lt;br /&gt;
			&amp;quot;note_private&amp;quot;	=&amp;gt; &amp;quot;order created automatically with API&amp;quot;,&lt;br /&gt;
		];&lt;br /&gt;
		$newCommandeResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;orders&amp;quot;, json_encode($newCommande));&lt;br /&gt;
		$newCommandeResult = json_decode($newCommandeResult, true);&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* $clientDoliId is the ID of the customer in the Dolibarr database. Either you know it or you can search for it before&lt;br /&gt;
* type =&amp;gt; 0, This is a customer order (while 1 = supplier order)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Validate an order &lt;br /&gt;
	$newCommandeValider = [&lt;br /&gt;
		&amp;quot;idwarehouse&amp;quot;	=&amp;gt; &amp;quot;0&amp;quot;,&lt;br /&gt;
		&amp;quot;notrigger&amp;quot;		=&amp;gt; &amp;quot;0&amp;quot;&lt;br /&gt;
	];&lt;br /&gt;
	$newCommandeValiderResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;orders/&amp;quot;.$newCommandeResult.&amp;quot;/validate&amp;quot;, json_encode($newCommandeValider));&lt;br /&gt;
	$newCommandeValiderResult = json_decode($newCommandeValiderResult, true);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* in this example, on the penultimate line, we can see : $apiUrl.&amp;quot;orders/&amp;quot;.$newCommandeResult.&amp;quot;/validate&amp;quot;.&amp;lt;br/&amp;gt;&lt;br /&gt;
$newCommandeResult is the ID of the order created in the previous example&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// search in the database if a customer exist&lt;br /&gt;
	$customer_name = &amp;quot;Acme Inc&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	$clientSearch = json_decode(CallAPI(&amp;quot;GET&amp;quot;, $apiKey, $apiUrl.&amp;quot;thirdparties&amp;quot;, array(&lt;br /&gt;
		&amp;quot;sortfield&amp;quot; =&amp;gt; &amp;quot;t.rowid&amp;quot;, &lt;br /&gt;
		&amp;quot;sortorder&amp;quot; =&amp;gt; &amp;quot;ASC&amp;quot;, &lt;br /&gt;
		&amp;quot;limit&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &lt;br /&gt;
		&amp;quot;mode&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;,&lt;br /&gt;
		&amp;quot;sqlfilters&amp;quot; =&amp;gt; &amp;quot;(t.nom:=:&#039;&amp;quot;.$customer_name.&amp;quot;&#039;)&amp;quot;&lt;br /&gt;
		)&lt;br /&gt;
	), true);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* limit =&amp;gt; 1 only 1 customer&lt;br /&gt;
* mode =&amp;gt; 1 we are looking for a customer, not a supplier (they are thirdparties too but with a different status)&lt;br /&gt;
* sqlfilters a bit special but there are more examples on the explorer page&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// customer doesn&#039;t exist. Let&#039;s create it and get it&#039;s ID&lt;br /&gt;
	$newClient = [&lt;br /&gt;
		&amp;quot;name&amp;quot; 			=&amp;gt; &amp;quot;customer company name&amp;quot;,&lt;br /&gt;
		&amp;quot;email&amp;quot;			=&amp;gt; &amp;quot;customer company email&amp;quot;,&lt;br /&gt;
		&amp;quot;client&amp;quot; 		=&amp;gt; &amp;quot;1&amp;quot;,&lt;br /&gt;
		&amp;quot;code_client&amp;quot;	=&amp;gt; &amp;quot;-1&amp;quot;&lt;br /&gt;
	];&lt;br /&gt;
	$newClientResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;thirdparties&amp;quot;, json_encode($newClient));&lt;br /&gt;
	$newClientResult = json_decode($newClientResult, true);&lt;br /&gt;
	$clientDoliId = $newClientResult;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* client =&amp;gt; 1 He is a customer (not a supplier)&lt;br /&gt;
* code_client =&amp;gt; -1 so the customer code will be generated automatically.&lt;br /&gt;
* we get the customer ID in $clientDoliId&lt;br /&gt;
&lt;br /&gt;
= Develop your own service / API =&lt;br /&gt;
Adding a new REST service is as easy than adding a file called &#039;&#039;&#039;api_mymoduleobject.class.php&#039;&#039;&#039; into the directory &#039;&#039;&#039;htdocs/mymodule/class&#039;&#039;&#039;.&lt;br /&gt;
You take the example into &#039;&#039;&#039;htdocs/commande/class/api_orders.class.php&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that if you use the &#039;&#039;&#039;modulebuilder&#039;&#039;&#039; tool, the file may be generated for you.&lt;br /&gt;
&lt;br /&gt;
The framework detects automatically the API and it should be visible into the explorer.&lt;br /&gt;
&lt;br /&gt;
Method and parameters are detected according to introspection done into PHP class of the object (&#039;&#039;&#039;htdocs/mymodule/class/object.class.php&#039;&#039;&#039;) using the &#039;&#039;&#039;annotations&#039;&#039;&#039; found into the class.&lt;br /&gt;
For a documentation about annotation: https://github.com/Luracast/Restler/blob/master/ANNOTATIONS.md&lt;br /&gt;
&lt;br /&gt;
These are just the basics.&lt;br /&gt;
&lt;br /&gt;
Some more informations in the Dolibarr code. You can look here : htdocs/&amp;lt;directory&amp;gt;/class/api_xxx_class.php&amp;lt;br/&amp;gt;&lt;br /&gt;
Ex : htdocs/societe/class/api_thirdparties.class.php for thirdparties.&amp;lt;br/&amp;gt;&lt;br /&gt;
Ex : Invoices are in htdocs/compta/facture/class&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Products&amp;diff=47923</id>
		<title>Module Products</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Products&amp;diff=47923"/>
		<updated>2020-07-19T10:59:58Z</updated>

		<summary type="html">&lt;p&gt;Egils: variants, images&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:Module_Produits]]&lt;br /&gt;
[[es:Módulo_Productos]]&lt;br /&gt;
[[de:Modul_Produkte]]&lt;br /&gt;
[[zh:产品模块]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Product]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
{{TemplateModEN}}&lt;br /&gt;
{{BasculeDevUserEn|&lt;br /&gt;
name=Products|&lt;br /&gt;
num=50|&lt;br /&gt;
devdoc=[[Module Products (developer)]]|&lt;br /&gt;
userdoc=This page|}}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
This module manages the product catalog.&lt;br /&gt;
&lt;br /&gt;
See also [[Module Services En|Modules Services]] to manage a catalog of services, or page [[Module Stocks En|Module Stocks]] to manage warehouses and stock.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
{{NoInstallModuleEn}}&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
{{ActivationModuleEn}}&lt;br /&gt;
&lt;br /&gt;
= Definition =&lt;br /&gt;
== Products ==&lt;br /&gt;
A &#039;&#039;product&#039;&#039; is an object you sell to customers or it is an object you buy from suppliers. It is a physical object as opposed to [[ServicesEn|Services]].&lt;br /&gt;
&lt;br /&gt;
A product follows this rules:&lt;br /&gt;
* A product can be stocked into a warehouse (only products appears in module [[Module_StockEn|Stock]]. Services are not visible).&lt;br /&gt;
* A product can be delivered (only products appears in module [[Module Shipment|Shipment]]. Services are not visible. Services are realized but cannot be shipped).&lt;br /&gt;
* A product is a material good. It&#039;s value often decreases with time (the value of a used product is less than a new product).&lt;br /&gt;
&lt;br /&gt;
Some fields are dedicated to products and not available for Services like:&lt;br /&gt;
* Weight&lt;br /&gt;
* Size&lt;br /&gt;
* Customs code = Commodity code = License code = HTS (An international 6 character code to define the category of product)&lt;br /&gt;
&lt;br /&gt;
== Virtual products (kits, also called Pack products) ==&lt;br /&gt;
A product or service may be a virtual (parent) product comprising other (real) products. This function is activated from the Products module or the Service configuration page. It allows &amp;quot;packages&amp;quot; or &amp;quot;kits&amp;quot; of products that for use in orders, invoices and inventory as a single element instead of the n products as Lot.&lt;br /&gt;
&lt;br /&gt;
A virtual product complies with the following rules:&lt;br /&gt;
* When adding a product in a document (proposals, invoice, order), only the line of the virtual parent product is shown.&lt;br /&gt;
* The stock of the individual components of the virtual product is incremented / decremented when the virtual product is incremented / decremented.&lt;br /&gt;
* A virtual product may itself be composed of other virtual products that contain the physical products.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
It is not a function of &amp;quot;manufacturing / production&amp;quot; where the virtual product component products are consumed son of stock father for an additional product in stock.&lt;br /&gt;
Here, the sub-components produced a virtual product are decremented stock at the time of consumption of the virtual product and remain independent manner consumables byproducts other, unlike a manufacturing module, wherein when that a by-product is used to manufacture a father module, the products under the same stock is decremented if the father product is not yet distributed, and often this byproducts can no longer do the reverse way back in stock.&lt;br /&gt;
&lt;br /&gt;
== Multiprices ==&lt;br /&gt;
There are 3 types of multiprices in Dolibarr.&lt;br /&gt;
*price per customer&lt;br /&gt;
*price per quantity&lt;br /&gt;
*price per segment&lt;br /&gt;
&lt;br /&gt;
===Price per segment===&lt;br /&gt;
Dolibarr supports 5 segments. E.g. if you sell products both locally through a shop and on the internet it can be profitable to have 2 price segments for the same products with a lower price for online sales where the competition is fierce.&lt;br /&gt;
&lt;br /&gt;
As of v12 the REST API support getting but not setting multiprices for a product.&lt;br /&gt;
&lt;br /&gt;
== Categories ==&lt;br /&gt;
Products can be added to one or multiple categories.&lt;br /&gt;
&lt;br /&gt;
As of v12 the REST API support getting but not setting categories for a product.&lt;br /&gt;
&lt;br /&gt;
== Image == &lt;br /&gt;
A product can have one (or multiple?) images. This can be manually set from the tab &amp;quot;Linked files&amp;quot; of a product.&lt;br /&gt;
&lt;br /&gt;
As of v12 the REST API does not support getting or setting images for a product.&lt;br /&gt;
&lt;br /&gt;
== Variants == &lt;br /&gt;
A product can have multiple variants, e.g. for sizes or colors.&lt;br /&gt;
&lt;br /&gt;
As of v12 the REST API supports both getting, setting and deleting variants for a product.&lt;br /&gt;
&lt;br /&gt;
= Life cycle / Business rules =&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
&lt;br /&gt;
= Examples of use cases =&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
{{ExamplesCaseEn&lt;br /&gt;
|name=UCMP01: &lt;br /&gt;
|situation=&lt;br /&gt;
|actions=&lt;br /&gt;
}}&amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Products&amp;diff=47922</id>
		<title>Module Products</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Products&amp;diff=47922"/>
		<updated>2020-07-19T10:53:59Z</updated>

		<summary type="html">&lt;p&gt;Egils: multiprices+categories&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:Module_Produits]]&lt;br /&gt;
[[es:Módulo_Productos]]&lt;br /&gt;
[[de:Modul_Produkte]]&lt;br /&gt;
[[zh:产品模块]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Product]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
{{TemplateModEN}}&lt;br /&gt;
{{BasculeDevUserEn|&lt;br /&gt;
name=Products|&lt;br /&gt;
num=50|&lt;br /&gt;
devdoc=[[Module Products (developer)]]|&lt;br /&gt;
userdoc=This page|}}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
This module manages the product catalog.&lt;br /&gt;
&lt;br /&gt;
See also [[Module Services En|Modules Services]] to manage a catalog of services, or page [[Module Stocks En|Module Stocks]] to manage warehouses and stock.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
{{NoInstallModuleEn}}&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
{{ActivationModuleEn}}&lt;br /&gt;
&lt;br /&gt;
= Definition =&lt;br /&gt;
== Products ==&lt;br /&gt;
A &#039;&#039;product&#039;&#039; is an object you sell to customers or it is an object you buy from suppliers. It is a physical object as opposed to [[ServicesEn|Services]].&lt;br /&gt;
&lt;br /&gt;
A product follows this rules:&lt;br /&gt;
* A product can be stocked into a warehouse (only products appears in module [[Module_StockEn|Stock]]. Services are not visible).&lt;br /&gt;
* A product can be delivered (only products appears in module [[Module Shipment|Shipment]]. Services are not visible. Services are realized but cannot be shipped).&lt;br /&gt;
* A product is a material good. It&#039;s value often decreases with time (the value of a used product is less than a new product).&lt;br /&gt;
&lt;br /&gt;
Some fields are dedicated to products and not available for Services like:&lt;br /&gt;
* Weight&lt;br /&gt;
* Size&lt;br /&gt;
* Customs code = Commodity code = License code = HTS (An international 6 character code to define the category of product)&lt;br /&gt;
&lt;br /&gt;
== Virtual products (kits, also called Pack products) ==&lt;br /&gt;
A product or service may be a virtual (parent) product comprising other (real) products. This function is activated from the Products module or the Service configuration page. It allows &amp;quot;packages&amp;quot; or &amp;quot;kits&amp;quot; of products that for use in orders, invoices and inventory as a single element instead of the n products as Lot.&lt;br /&gt;
&lt;br /&gt;
A virtual product complies with the following rules:&lt;br /&gt;
* When adding a product in a document (proposals, invoice, order), only the line of the virtual parent product is shown.&lt;br /&gt;
* The stock of the individual components of the virtual product is incremented / decremented when the virtual product is incremented / decremented.&lt;br /&gt;
* A virtual product may itself be composed of other virtual products that contain the physical products.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
It is not a function of &amp;quot;manufacturing / production&amp;quot; where the virtual product component products are consumed son of stock father for an additional product in stock.&lt;br /&gt;
Here, the sub-components produced a virtual product are decremented stock at the time of consumption of the virtual product and remain independent manner consumables byproducts other, unlike a manufacturing module, wherein when that a by-product is used to manufacture a father module, the products under the same stock is decremented if the father product is not yet distributed, and often this byproducts can no longer do the reverse way back in stock.&lt;br /&gt;
&lt;br /&gt;
== Multiprices ==&lt;br /&gt;
There are 3 types of multiprices in Dolibarr.&lt;br /&gt;
*price per customer&lt;br /&gt;
*price per quantity&lt;br /&gt;
*price per segment&lt;br /&gt;
&lt;br /&gt;
===Price per segment===&lt;br /&gt;
Dolibarr supports 5 segments. E.g. if you sell products both locally through a shop and on the internet it can be profitable to have 2 price segments for the same products with a lower price for online sales where the competition is fierce.&lt;br /&gt;
&lt;br /&gt;
As of v12 the REST API support getting but not setting multiprices for a product.&lt;br /&gt;
&lt;br /&gt;
== Categories ==&lt;br /&gt;
Products can be added to one or multiple categories.&lt;br /&gt;
&lt;br /&gt;
As of v12 the REST API support getting but not setting categories for a product.&lt;br /&gt;
&lt;br /&gt;
= Life cycle / Business rules =&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
&lt;br /&gt;
= Examples of use cases =&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
{{ExamplesCaseEn&lt;br /&gt;
|name=UCMP01: &lt;br /&gt;
|situation=&lt;br /&gt;
|actions=&lt;br /&gt;
}}&amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Installation_-_Upgrade&amp;diff=47921</id>
		<title>Installation - Upgrade</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Installation_-_Upgrade&amp;diff=47921"/>
		<updated>2020-07-18T08:31:23Z</updated>

		<summary type="html">&lt;p&gt;Egils: upgrade with git&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:Installation_-_Mise_à_jour]]&lt;br /&gt;
[[es:Instalación_-_Actualización]]&lt;br /&gt;
[[zh:安装_-_升级]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Admin_en]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
&lt;br /&gt;
The following documentation describes processes to install or upgrade Dolibarr on a Windows, MAC OS or Unix like platform.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Install Dolibarr=&lt;br /&gt;
This chapter describe different available methods to install Dolibarr for the first time (from the most simple to the manual one). See next chapter for upgrades.&lt;br /&gt;
&lt;br /&gt;
==On your dedicated computer/server (installation &amp;quot;On Premise&amp;quot;)==&lt;br /&gt;
===[[File:Logo_windows.png]] Manualy or with Doliwamp===&lt;br /&gt;
- &#039;&#039;&#039;Prerequisite&#039;&#039;&#039;: Windows&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Level&#039;&#039;&#039;: Non experienced users&lt;br /&gt;
&lt;br /&gt;
This process works only for Windows users and is recommended for user with no computer knowledges. If you are experimented with Apache, PHP and Mysql installation, next chapter is better for you. &lt;br /&gt;
&lt;br /&gt;
If you have time and want to learn how to install an Apache, PHP and MariaDB web server, see the [[Manual installation on Windows]] page for step-by-step instructions.&lt;br /&gt;
&lt;br /&gt;
However, if you are a newbie user and running Windows, you can use DoliWamp. DoliWamp is a specialized Dolibarr distribution for Windows. This distribution allows you to make an installation under Windows with all prerequisites (Apache, Mysql, PHP) and with no computer knowledge. This is steps to install DoliWamp:&lt;br /&gt;
&lt;br /&gt;
*Download last Dolibarr version for Windows DoliWamp.&lt;br /&gt;
&lt;br /&gt;
For this, see at {{TemplateURLToDownloadDoliWamp}}&lt;br /&gt;
&lt;br /&gt;
*Run the downloaded .exe and follow instructions.&lt;br /&gt;
&lt;br /&gt;
===[[File:Logo_ubuntu.png]] With DoliDeb (Debian or Ubuntu .deb package)===&lt;br /&gt;
- &#039;&#039;&#039;Prerequisite&#039;&#039;&#039;: Linux Ubuntu&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Level&#039;&#039;&#039;: Non experienced users&lt;br /&gt;
&lt;br /&gt;
This process works only for Ubuntu or Debian Linux users and is recommended for user with little computer knowledge. If you are experienced with Apache, PHP and Mysql installation, the chapter &#039;with standard package&#039; is better for you. However, if you are a newbie user and running Ubuntu, you can use DoliDeb. DoliDeb is a specialized Dolibarr distribution for Debian or Ubuntu. This distribution allows you to make an installation under Ubuntu with all prerequisites (Apache, Mysql, PHP) and with no computer knowledge.&lt;br /&gt;
&lt;br /&gt;
*Steps to install DoliDeb are described into page [[Dolibarr for Ubuntu or Debian]].&lt;br /&gt;
&lt;br /&gt;
===[[File:Logo_rpm.png|42px]] With DoliRpm (Fedora, Redhat, Mandriva, Mageia or OpenSuse .rpm package)===&lt;br /&gt;
- &#039;&#039;&#039;Prerequisite&#039;&#039;&#039;: Linux Fedora, Redhat, Mandriva, Mageia or OpenSuse&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Level&#039;&#039;&#039;: Non experienced users&lt;br /&gt;
&lt;br /&gt;
This process works only for Fedora, Redhat, Mandriva, Mageia or OpenSuse Linux users and is recommended for user with no computer knowledges. If you are experimented with Apache, PHP and Mysql installation, next chapter &#039;with standard package&#039; is better for you. However, if you are a newbie user and running Fedora or Redhat, you can use DoliRpm. DoliRpm is a specialized Dolibarr distribution for Fedora, Redhat or Mandriva. This distribution allows you to make an installation under such OS with all prerequisites (Apache, Mysql, PHP) and with no computer knowledge.&lt;br /&gt;
&lt;br /&gt;
*Steps to install DoliRpm are described into page [[Dolibarr for Redhat or Fedora (rpm package)]] or [[Dolibarr for Mandriva or Mageia (rpm package)]] or [[Dolibarr for OpenSuse (rpm package)]].&lt;br /&gt;
&lt;br /&gt;
===[[File:Gnu.png]] With Dolibarr (standard .zip package or from git)===&lt;br /&gt;
- &#039;&#039;&#039;Prerequisite&#039;&#039;&#039;: Apache, PHP and a database server (MySQL or PostgreSQL) are already running correctly and user/pass (of a new database or root server) is known.&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Level&#039;&#039;&#039;: Users with few Web and Database administration knowledges.&lt;br /&gt;
&lt;br /&gt;
This procedure describe manual (and recommended) installation on a GNU/Linux system (Debian, Mandriva, ...), it can be used for other OS with minor changes.&lt;br /&gt;
You can follow this tutorial for any Dolibarr version &amp;gt;= 2.0.0&lt;br /&gt;
&lt;br /&gt;
*Check that you have installed Apache, PHP {{PHPMinVersion}} and a database server (MySQL {{MySqlMinVersion}} or PostGreSQL) correctly (check list of installed packaged on your server by using the package manager of your distribution). If not, install them (use last recent version).&lt;br /&gt;
&lt;br /&gt;
*Check that main root or admin user/password couple for the server is known and works correctly. If this root or admin user/password is not known because not yet defined, read following chapter. Otherwise go on next step:&lt;br /&gt;
&lt;br /&gt;
For Linux users, if you have just installed a MySQL server, the admin user is&#039;&#039;&#039; root&#039;&#039;&#039;. If the root password has never been set yet, you must run the following command to initialize the password:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mysql    &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Once in Mysql interface, run the SQL command to modify the root password:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
grant all privileges on *.* to root@&#039;localhost&#039; identified by &#039;newrootpass&#039; with grant option;      &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Then enter and \q to quit.&lt;br /&gt;
&lt;br /&gt;
To check that connexion with the new couple user/password works, launch the command&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mysql -u root -p&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
And type your password &#039;&#039;newrootpass&#039;&#039; then \q to quit if connexion has been successfull.&lt;br /&gt;
&lt;br /&gt;
For Linux users, if you have just installed a PostgreSQL server, you must run the following command to initialize an admin user and password. For this, add the following line in file &#039;&#039;&#039;/etc/postgresql/x.x/main/pg_hba.conf&#039;&#039;&#039; (replace x.x with your postgres version)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
local   all         dolibarrowner    md5        &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Also, comment the line&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
#local   all         all                               ident&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This line ensure that system login used to connect to database (it will be login the web server run with), is same than database account (this is never the case).&lt;br /&gt;
&lt;br /&gt;
Then launch commands from a root shell&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo -s -u postgres&lt;br /&gt;
createuser dolibarrowner&lt;br /&gt;
psql -h localhost -d template1 -c &amp;quot;alter user dolibarrowner with password &#039;dolibarrownerpass&#039;&amp;quot;&lt;br /&gt;
exit&lt;br /&gt;
sudo /etc/init.d/postgresql restart&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
You can test a connection with this user with command&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
psql -d postgres -U dolibarrowner -W&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
And type your &#039;&#039;dolibarrownerpass&#039;&#039; as password and \q to quit if connection is ok.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Go into the directory where to install Dolibarr (the web root directory defined for your web server)&lt;br /&gt;
&lt;br /&gt;
#For Debian and Ubuntu families, it is generally: /var/www (newer versions: /var/www/html)&lt;br /&gt;
#For Mandriva, RedHat, Fedora: /var/www/html&lt;br /&gt;
#For Suse: /srv/www/htdocs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cd /var/www&lt;br /&gt;
or&lt;br /&gt;
$ cd /var/www/html&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Get the application archive of last stable version&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;from zip file&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ wget http://www.dolibarr.org/files/dolibarr.zip&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Uncompress archive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ unzip dolibarr.zip&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;or from git repository&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone -b X.Y http://github.com/Dolibarr/dolibarr.git dolibarr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Replace X.Y with the version you want to get.&lt;br /&gt;
&lt;br /&gt;
*Rename directory dolibarr-x.y.z into dolibarr to have a directory name that does not depends on version (replace x.y.z with source version)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ mv dolibarr-x.y.z dolibarr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Change permission and owner of the &#039;dolibarr&#039; directory to that of the group under which the web server runs (assumed to be &#039;www-data&#039; for debian, &#039;apache&#039; for redhat, mandriva, fedora)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ chmod -R 755 /var/www/dolibarr&lt;br /&gt;
$ chown -R www-data.www-data /var/www/dolibarr&lt;br /&gt;
or&lt;br /&gt;
$ chmod -R 755 /var/www/html/dolibarr&lt;br /&gt;
$ chown -R apache.apache /var/www/html/dolibarr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*For Fedora, since SELinux is usually enabled, it is also advisable to run the following commands to make the &#039;dolibarr&#039; directory compliant with the SELinux requirement (else you are likely to get quite a few alerts) :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ semanage fcontext -a -t httpd_sys_rw_content_t &#039;/var/www/html/dolibarr(/.*)?&#039;&lt;br /&gt;
$ restorecon -R -v &#039;/var/www/html/dolibarr&#039;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*As a root user, create, into directory dolibarr/htdocs/conf, an empty configuration file called conf.php and set, as owner, the web server user (example www-data on Debian, apache on Mandriva, RedHat, Fedora or other distributions ...). This is required because the web server will have to write into this file during install process.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cd dolibarr ; touch htdocs/conf/conf.php ; chown www-data htdocs/conf/conf.php&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Note: For Ubuntu no need of htdocs, you just have to make dolibarr root by placing all files and folders of htdocs in /var/www/dolibarr then from browser do &amp;lt;MyIP&amp;gt;/dolibarr/index.php (see this discussion as reference to this addendum [http://askubuntu.com/questions/874456/php-code-displays-in-browser?noredirect=1#comment1357943_874456])&lt;br /&gt;
&lt;br /&gt;
*As a root user, create a directory that will be used to save all files generated and stocked by Dolibarr (PDf invoices, uploaded images, ...), and attribute to this directory a owner that must be the web server (example www-data on Debian, apache on Mandriva, RedHat, Fedora...). The web server must have write permission into this directory. It is recommanded to use a directory outside of your directory of web pages, for example - &amp;quot;/var/lib/dolibarr/documents&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir -p /var/lib/dolibarr/documents ; chown www-data /var/lib/dolibarr/documents&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Now call your browser to point to the main page&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
http://127.0.0.1/dolibarr/htdocs/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or if you didn&#039;t create the htdocs directory&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
http://127.0.0.1/dolibarr/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Follow instructions of setup steps until end of install process.&lt;br /&gt;
&lt;br /&gt;
*For security reason, we recommend, once setup is finished, to create a file install.lock into Dolibarr document directory that only root user can delete. This will lock the call of the install process again (you will have to remove this file for upgrades).&lt;br /&gt;
&lt;br /&gt;
If this is not done, Dolibarr will show you a warning once logged by an administrator user.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ touch /var/lib/dolibarr/documents/install.lock; chmod go-w /var/lib/dolibarr/documents;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==On a mutualized Web Hosting Provider (without terminal/SSH access)==&lt;br /&gt;
It is not possible to provide a generic documentation to install Dolibarr on a particular Web hosting provider as this depends on provider.&lt;br /&gt;
In most cases, using the following process should works for most providers:&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Prerequisite&#039;&#039;&#039;: Apache web server, PHP and a database server (MySQL or PostgreSQL) are already running correctly and user/pass (of a new database or root server) is known.&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;Level&#039;&#039;&#039;: Users with few Web and Database administration knowledges. Knowledge to use a tool (FTP, SFTP) to upload files on the server.&lt;br /&gt;
&lt;br /&gt;
*Check that you have an Apache web server, PHP and a database server (MySQL or PostGreSQL) that works correctly.&lt;br /&gt;
&lt;br /&gt;
[[File:warning.png]] Warning, check that code page of PHP server and database server are same (utf8 recommended).&lt;br /&gt;
&lt;br /&gt;
*Check that main root or admin user/password couple for the server is known and works correctly. Ask them to your Web Hosting Provider if unknown.&lt;br /&gt;
&lt;br /&gt;
*Get the application archive of last stable version and uncompress it locally.&lt;br /&gt;
&lt;br /&gt;
*Upload all content of htdocs directory to your web root directory, for example using FTP in binary mode.&lt;br /&gt;
&lt;br /&gt;
*Create a directory called &amp;quot;documents&amp;quot; into Dolibarr directory that will serve to save all documents generated and stocked by Dolibarr (PDF invoices, uploaded images, ...). The web server must have write permission into this directory. You can set permissions with your FTP client.&lt;br /&gt;
&lt;br /&gt;
*Now call your browser to point to the main page index.php&lt;br /&gt;
&lt;br /&gt;
*Follow instructions of setup steps until end of install process.&lt;br /&gt;
&lt;br /&gt;
*For security reason, we recommend, once setup is finished, to create a file install.lock into Dolibarr installed directory. This will lock the call of the install process again (you will have to remove it for upgrades). If this is not done, Dolibarr will show you a warning once logged as an administrator user.&lt;br /&gt;
&lt;br /&gt;
==On a SaaS or Cloud web hosting provider==&lt;br /&gt;
Dolibarr is also available on a lot of &amp;quot;ready to use&amp;quot; SaaS or Cloud platforms/services that provides preinstalled versions.&lt;br /&gt;
&lt;br /&gt;
See page [[Cloud Solutions]].&lt;br /&gt;
&lt;br /&gt;
Dolibarr can also be installed manually on all Cloud platforms that support PHP and Mysql.&lt;br /&gt;
&lt;br /&gt;
See page [[Cloud Solutions]].&lt;br /&gt;
&lt;br /&gt;
=Setup=&lt;br /&gt;
&lt;br /&gt;
==First setup==&lt;br /&gt;
See page [[First setup|Setup]].&lt;br /&gt;
&lt;br /&gt;
==Setup a LDAP connexion==&lt;br /&gt;
If you want to use a LDAP: See [[Install and configure OpenLDAP]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Import external data=&lt;br /&gt;
For this operation, read page [[Mass imports]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Upgrade Dolibarr=&lt;br /&gt;
This chapter describe process to upgrade an existing installation of Dolibarr from an old version to a new one. Process is same whatever is version you are coming fro and version you are going to, but will differ according to the distribution/operating system you used for your first installation. You should use the same for upgrade.&lt;br /&gt;
 &lt;br /&gt;
==[[File:Logo_windows.png]] With DoliWamp (Windows .exe package)==&lt;br /&gt;
&lt;br /&gt;
*First make a backup of your current installation&lt;br /&gt;
*Download new .exe package of DoliWamp.&lt;br /&gt;
*Run downloaded .exe file and follow steps without changing any default values. This will upgrades all your files.&lt;br /&gt;
*At the end of the execution, your browser is launched with a page to ask you to run upgrade of your database. Choose the upgrade according to your case.&lt;br /&gt;
&lt;br /&gt;
If there is more than one version late, the page in your browser will loop to start again the upgrade wizard as often as required to run upgrade process, version by version, until your reach the new installed version.&lt;br /&gt;
&lt;br /&gt;
==[[File:Logo_ubuntu.png]] With DoliDeb (Debian or Ubuntu .deb package)==&lt;br /&gt;
&lt;br /&gt;
*First make a backup of your current installation&lt;br /&gt;
*Process to upgrade using Debian/Ubuntu package is same way than install process (see previous chapters), so it is as easy as installing a package.&lt;br /&gt;
&lt;br /&gt;
You can also read page [[Dolibarr for Ubuntu or Debian]].&lt;br /&gt;
&lt;br /&gt;
==[[File:Logo_rpm.png|40px]] With DoliRpm (Fedora, Redhat, Mandriva, Mageia or OpenSuse .rpm package)==&lt;br /&gt;
&lt;br /&gt;
*First make a backup of your current installation&lt;br /&gt;
*Process to upgrade using rpm package is same way than install process, so it is as easy as installing a package (see previous chapters).&lt;br /&gt;
&lt;br /&gt;
==[[File:Gnu.png]] With Dolibarr (standard .zip package)==&lt;br /&gt;
This is tutorial to use when using standard distribution for a manual upgrade.&lt;br /&gt;
&lt;br /&gt;
*First make a backup of your current installation&lt;br /&gt;
&lt;br /&gt;
*Go into the directory where you installed Dolibarr (it might be the root directory of your web, for example /var/www under Debian)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cd /var/www&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Get archive of last version&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ wget https://www.dolibarr.org/files/dolibarr.zip&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Uncompress the archive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ unzip dolibarr.zip&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Copy all new extracted files (the one uncompressed into directory dolibarr-x.y.z) to the directory where you put your old Dolibarr version. This will overwrite old files with new ones without removing files specifics to your installation (like conf.php file or complementary non official installed modules).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cp -r dolibarr-x.y.z/* dolibarr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If no error, you can now remove the directory of source files&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ rm -fr dolibarr-x.y.z&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Now open your Dolibarr in your browser. It should open automatically the install/&lt;br /&gt;
&lt;br /&gt;
and choose &#039;&#039;Update&#039;&#039; in suggested menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: &lt;br /&gt;
&lt;br /&gt;
If you want to script the database upgrade process (to avoid the upgrade process from web browser), you can run the 3 upgrade processes from command line:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cd htdocs/install&lt;br /&gt;
$ php upgrade.php oldx.oldy.oldz x.y.z &amp;gt; output.html&lt;br /&gt;
$ php upgrade2.php oldx.oldy.oldz x.y.z &amp;gt; output2.html&lt;br /&gt;
$ php step5.php oldx.oldy.oldz x.y.z &amp;gt; output3.html&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Note: z must be &amp;quot;0&amp;quot; because only major versions have a migration script to run.&lt;br /&gt;
&lt;br /&gt;
Return code will be 0 if success, 1 if error (if this happens, see file output.html or output2.html).&lt;br /&gt;
&lt;br /&gt;
Note: If you have a message that tell the install process is locked by a file, remove the file install.lock stored in Dolibarr root directory.&lt;br /&gt;
&lt;br /&gt;
*For security reason, once setup is finished, you should create a file install.lock into Dolibarr documents directory. This will lock the call of the install process again (you will have to remove this file for future upgrades). If this is not done, Dolibarr will show you a warning once logged with an administrator user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ echo &amp;gt; documents/install.lock&lt;br /&gt;
$ chmod 444 documents/install.lock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[[File:Gnu.png]] With git==&lt;br /&gt;
If you already cloned the repo simply upgrade by checking out a version tag like so:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ git checkout -b 12.0 --depth 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Now open your Dolibarr in your browser. It should automatically open the install/ and choose &#039;&#039;Update&#039;&#039; in the suggested menu.&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Web_Services_API_REST_(developer)&amp;diff=47909</id>
		<title>Module Web Services API REST (developer)</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Web_Services_API_REST_(developer)&amp;diff=47909"/>
		<updated>2020-07-13T05:13:36Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* Nginx setup */ fix formatting&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:Module_Web_Services_API_REST_(développeur)]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
{{TemplateModEN}}&lt;br /&gt;
[[Category:List of Modules]]&lt;br /&gt;
{{BasculeDevUserEn|&lt;br /&gt;
name=Web services|&lt;br /&gt;
num=2610|&lt;br /&gt;
devdoc=This page|&lt;br /&gt;
userdoc=Not applicable|}}&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;
= Function =&lt;br /&gt;
When enabling this module, you enable usage of web services provided by Dolibarr server. You can then make REST call of different web services provided by Dolibarr.&lt;br /&gt;
&lt;br /&gt;
= Dolibarr REST web services server =&lt;br /&gt;
Once module webservices REST is activated, Dolibarr become also a server of REST web services. So you can send your own REST request to relative URL&lt;br /&gt;
&#039;&#039;&#039;/api/index.php/xxx&#039;&#039;&#039; where xxx is name of the API to call.&lt;br /&gt;
&lt;br /&gt;
A list of APIs on your installation can be found via the explorer.&lt;br /&gt;
&lt;br /&gt;
==Nginx setup==&lt;br /&gt;
This is a simple localhost setup with a working REST API handling (tested with 9.0.1 on parabola gnu/linux).&lt;br /&gt;
&amp;lt;source language=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
worker_processes  1;&lt;br /&gt;
error_log  /var/log/nginx/error.log;&lt;br /&gt;
&lt;br /&gt;
events {&lt;br /&gt;
    worker_connections  1024;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http {&lt;br /&gt;
    include       mime.types;&lt;br /&gt;
    default_type  application/octet-stream;&lt;br /&gt;
&lt;br /&gt;
    #log_format  main  &#039;$remote_addr - $remote_user [$time_local] &amp;quot;$request&amp;quot; &#039;&lt;br /&gt;
    #                  &#039;$status $body_bytes_sent &amp;quot;$http_referer&amp;quot; &#039;&lt;br /&gt;
    #                  &#039;&amp;quot;$http_user_agent&amp;quot; &amp;quot;$http_x_forwarded_for&amp;quot;&#039;;&lt;br /&gt;
&lt;br /&gt;
    #access_log  logs/access.log  main;&lt;br /&gt;
&lt;br /&gt;
    sendfile        on;&lt;br /&gt;
    #tcp_nopush     on;&lt;br /&gt;
&lt;br /&gt;
    #keepalive_timeout  0;&lt;br /&gt;
    keepalive_timeout  65;&lt;br /&gt;
&lt;br /&gt;
    #gzip  on;&lt;br /&gt;
&lt;br /&gt;
    server {&lt;br /&gt;
    	listen		80;&lt;br /&gt;
        server_name     dolibarr.localhost; # adjust to your domain&lt;br /&gt;
&lt;br /&gt;
        root    /usr/share/webapps/dolibarr/htdocs; # adjust to your path &lt;br /&gt;
        index   index.php;&lt;br /&gt;
&lt;br /&gt;
        # from https://github.com/Dolibarr/dolibarr/issues/6163#issuecomment-391265538&lt;br /&gt;
        location ~ [^/]\.php(/|$) {&lt;br /&gt;
            fastcgi_split_path_info ^(.+?\.php)(/.*)$;&lt;br /&gt;
            if (!-f $document_root$fastcgi_script_name) {&lt;br /&gt;
                return 404;&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            # Mitigate https://httpoxy.org/ vulnerabilities&lt;br /&gt;
            fastcgi_param HTTP_PROXY &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
            root           /usr/share/webapps/dolibarr/htdocs;&lt;br /&gt;
            fastcgi_pass   unix:/run/php-fpm/php-fpm.sock;&lt;br /&gt;
            fastcgi_index  index.php;&lt;br /&gt;
            include        fastcgi_params;&lt;br /&gt;
            fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;&lt;br /&gt;
            # Dolibarr Rest API path support&lt;br /&gt;
            fastcgi_param  PATH_INFO       $fastcgi_path_info;&lt;br /&gt;
            fastcgi_param  PATH_TRANSLATED $document_root$fastcgi_script_name;&lt;br /&gt;
        }&lt;br /&gt;
     }		&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= List of provided services =&lt;br /&gt;
Only few services are available. Starting to Dolibarr 5.0 version, you can see full list of Dolibarr Web services provided, by calling the explorer here at address:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;http://yourdolibarrurl/api/index.php/explorer&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You must first make the first call to the &#039;&#039;&#039;login&#039;&#039;&#039; api to get the API key.&lt;br /&gt;
Then enter api key to get list of all other available API services.&lt;br /&gt;
&lt;br /&gt;
For example, you can try the explorer on the demo instance at:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;https://demo.dolibarr.org/api/index.php/explorer&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You must first make the first call to the &#039;&#039;&#039;login&#039;&#039;&#039; api to get the API key.&lt;br /&gt;
Then enter api key to get list of all other available API services.&lt;br /&gt;
&lt;br /&gt;
You can then test directly from this explorer any API. This is the recommended solution to test any Dolibarr API since any API and parameters is documented here. As a result of any test, you will get the answer but also example on how to call the API from command line using &#039;&#039;&#039;curl&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
To install, open the modules page and activate de API REST module. On the configuration page of the module, there&#039;s a link to an explorer. Click on it to open the API explorer.&lt;br /&gt;
&lt;br /&gt;
On the top right corner, paste the &amp;lt;token&amp;gt; of the user you want to use to call the API and click the &amp;quot;explore&amp;quot; button. Note: The token of each user can be defined on the user record page. &lt;br /&gt;
&lt;br /&gt;
After clicking on &amp;quot;Explore&amp;quot;, you should see all the actions available with this token. If you don&#039;t have a lot of actions, it&#039;s probably because the according modules are not activated. If you want to see the invoices, you have to activate the invoice module in the configuration of Dolibarr. Same for products, third parties and so on.&lt;br /&gt;
&lt;br /&gt;
On this exploration page of the API, you can do quite a lot of tests. Reading datas from Dolibarr and writing, modifying and deleting as well. Warning: Data are really modified in your database.&lt;br /&gt;
&lt;br /&gt;
= Use =&lt;br /&gt;
&lt;br /&gt;
To use the REST API,  you have to call an url such as this one : &amp;lt;nowiki&amp;gt;http://&amp;lt;my_server&amp;gt;/api/index.php/&amp;lt;action&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
with one of the 4 following methods : GET, POST, PUT, DELETE, replacing &amp;lt;action&amp;gt; by the action you want to use. Ex : &amp;lt;nowiki&amp;gt;http://&amp;lt;my_server&amp;gt;/api/index.php/invoices&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There&#039;s different ways to do so. Here&#039;s a piece of code but you can also use libraries such as phphttpclient.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Example of function to call a REST API&lt;br /&gt;
function callAPI($method, $apikey, $url, $data = false)&lt;br /&gt;
{&lt;br /&gt;
    $curl = curl_init();&lt;br /&gt;
    $httpheader = [&#039;DOLAPIKEY: &#039;.$apikey];&lt;br /&gt;
&lt;br /&gt;
    switch ($method)&lt;br /&gt;
    {&lt;br /&gt;
        case &amp;quot;POST&amp;quot;:&lt;br /&gt;
            curl_setopt($curl, CURLOPT_POST, 1);&lt;br /&gt;
            $httpheader[] = &amp;quot;Content-Type:application/json&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
            if ($data)&lt;br /&gt;
                curl_setopt($curl, CURLOPT_POSTFIELDS, $data);&lt;br /&gt;
&lt;br /&gt;
            break;&lt;br /&gt;
        case &amp;quot;PUT&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
	    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, &#039;PUT&#039;);&lt;br /&gt;
            $httpheader[] = &amp;quot;Content-Type:application/json&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
            if ($data)&lt;br /&gt;
                curl_setopt($curl, CURLOPT_POSTFIELDS, $data);&lt;br /&gt;
&lt;br /&gt;
            break;&lt;br /&gt;
        default:&lt;br /&gt;
            if ($data)&lt;br /&gt;
                $url = sprintf(&amp;quot;%s?%s&amp;quot;, $url, http_build_query($data));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Optional Authentication:&lt;br /&gt;
    //    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);&lt;br /&gt;
    //    curl_setopt($curl, CURLOPT_USERPWD, &amp;quot;username:password&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    curl_setopt($curl, CURLOPT_URL, $url);&lt;br /&gt;
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    curl_setopt($curl, CURLOPT_HTTPHEADER, $httpheader);&lt;br /&gt;
&lt;br /&gt;
    $result = curl_exec($curl);&lt;br /&gt;
&lt;br /&gt;
    curl_close($curl);&lt;br /&gt;
&lt;br /&gt;
    return $result;&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is just a working example. There&#039;s no error control and security was not in mind but you can use this code, modify it to suit your needs&amp;lt;br/&amp;gt;&lt;br /&gt;
The fonction has 4 parameters :&lt;br /&gt;
* $method : string, &amp;quot;GET&amp;quot;, &amp;quot;POST&amp;quot;, &amp;quot;PUT&amp;quot;, &amp;quot;DELETE&amp;quot;&lt;br /&gt;
* $apikey : string, &amp;quot;your &amp;lt;token&amp;gt; generated earlier&amp;quot;&lt;br /&gt;
* $url : string, url to call. Ex : &amp;quot;&amp;lt;nowiki&amp;gt;http://&amp;lt;my_server&amp;gt;/api/index.php/invoices&amp;lt;/nowiki&amp;gt;&amp;quot;&lt;br /&gt;
* $data : string, datas in json format. This parameter is not mandatory.&lt;br /&gt;
&lt;br /&gt;
= Examples with PHP =&lt;br /&gt;
&lt;br /&gt;
This is more examples, for different uses cases:&lt;br /&gt;
&lt;br /&gt;
In every examples, we have:&lt;br /&gt;
* $apiKey = &amp;quot;&amp;lt;my token&amp;gt;&amp;quot;;&lt;br /&gt;
* $apiUrl = &amp;quot;&amp;lt;nowiki&amp;gt;http://&amp;lt;my_server&amp;gt;/api/index.php/&amp;lt;/nowiki&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Retrieve products list&lt;br /&gt;
	$listProduits = [];&lt;br /&gt;
	$produitParam = [&amp;quot;limit&amp;quot; =&amp;gt; 10000, &amp;quot;sortfield&amp;quot; =&amp;gt; &amp;quot;rowid&amp;quot;];&lt;br /&gt;
	$listProduitsResult = CallAPI(&amp;quot;GET&amp;quot;, $apiKey, $apiUrl.&amp;quot;products&amp;quot;, $produitParam);&lt;br /&gt;
	$listProduitsResult = json_decode($listProduitsResult, true);&lt;br /&gt;
&lt;br /&gt;
	if (isset($listProduitsResult[&amp;quot;error&amp;quot;]) &amp;amp;&amp;amp; $listProduitsResult[&amp;quot;error&amp;quot;][&amp;quot;code&amp;quot;] &amp;gt;= &amp;quot;300&amp;quot;) {&lt;br /&gt;
	} else {&lt;br /&gt;
		foreach ($listProduitsResult as $produit) {&lt;br /&gt;
			$listProduits[intval($produit[&amp;quot;id&amp;quot;])] = html_entity_decode($produit[&amp;quot;ref&amp;quot;], ENT_QUOTES);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* I retrieve the 10&#039;000 first products sorted on their ID in the base&lt;br /&gt;
* html_entity_decode is necessary as single quotes are encoded&lt;br /&gt;
* It&#039;s easy to use the same method (replacing products with dictionnarycountries) to retrieve the list of countries and their ID&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Create a product&lt;br /&gt;
	$ref = &amp;quot;my_product_ref_X203ZZ&amp;quot;;&lt;br /&gt;
	$newProduct = [&lt;br /&gt;
		&amp;quot;ref&amp;quot;	=&amp;gt; $ref,&lt;br /&gt;
		&amp;quot;label&amp;quot;	=&amp;gt; $ref&lt;br /&gt;
	];&lt;br /&gt;
	$newProductResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;products&amp;quot;, json_encode($newProduct));&lt;br /&gt;
	$newProductResult = json_decode($newProductResult, true);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* before creating a product, it could be wise to check if it exists. Using my first example, you&#039;ll have  :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// my ref&lt;br /&gt;
	$ref = &amp;quot;my_product_ref_X203ZZ&amp;quot;;&lt;br /&gt;
// does it exist in my array&lt;br /&gt;
	$produitKey = array_search($ref, $listProduits);&lt;br /&gt;
	if ($produitKey) {&lt;br /&gt;
// yes&lt;br /&gt;
		$fk_product = $produitKey;&lt;br /&gt;
	} else {&lt;br /&gt;
// no&lt;br /&gt;
// Create the product&lt;br /&gt;
		$newProduct = [&lt;br /&gt;
			&amp;quot;ref&amp;quot;	=&amp;gt; $ref,&lt;br /&gt;
			&amp;quot;label&amp;quot;	=&amp;gt; $ref&lt;br /&gt;
		];&lt;br /&gt;
		$newProductResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;products&amp;quot;, json_encode($newProduct));&lt;br /&gt;
		$newProductResult = json_decode($newProductResult, true);&lt;br /&gt;
		if (isset($newProductResult[&amp;quot;error&amp;quot;]) &amp;amp;&amp;amp; $newProductResult[&amp;quot;error&amp;quot;][&amp;quot;code&amp;quot;] &amp;gt;= &amp;quot;300&amp;quot;) {&lt;br /&gt;
// there&#039;s been an error&lt;br /&gt;
			echo &amp;quot;&amp;lt;pre&amp;gt;ERROR&amp;quot;, var_dump($newProductResult), &amp;quot;&amp;lt;/pre&amp;gt;&amp;quot;;&lt;br /&gt;
			exit;&lt;br /&gt;
		} else {&lt;br /&gt;
// everything good&lt;br /&gt;
			$fk_product = $newProductResult;&lt;br /&gt;
			$listProduits[$fk_product] = $ref;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* I check if the ref of my product exist in the array created in the first example.&lt;br /&gt;
* If it exists, I use it&#039;s key in the array as ID&lt;br /&gt;
* If it doesn&#039;t exist, I create the product, then I add it to my array for next time then I use the ID created&lt;br /&gt;
* I choose this method to do less API calls when I have to import 500 orders. I just need to retrieve the products list once at the beginning instead of searching Dolibarr each time.&lt;br /&gt;
&lt;br /&gt;
Warning: The example below is not working properly. Creating an order and lines in one go is not supported. Instead you have to create an order first and with the returned order id add the lines using the /orders/{id}/lines endpoint. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// create an order with 2 products&lt;br /&gt;
&lt;br /&gt;
// The array where there will be all the products lines of my order.&lt;br /&gt;
	$newCommandeLine = [];&lt;br /&gt;
&lt;br /&gt;
// product 1&lt;br /&gt;
	$ref1 = &amp;quot;my_product_ref_X203ZZ&amp;quot;;&lt;br /&gt;
	$prix1 = 10;&lt;br /&gt;
	$qtt1  = 100;&lt;br /&gt;
	$tva1 = 20;&lt;br /&gt;
	$fk_product1&lt;br /&gt;
// product 2&lt;br /&gt;
	$ref2 = &amp;quot;my_product_ref_B707FD&amp;quot;;&lt;br /&gt;
	$prix2 = 13;&lt;br /&gt;
	$qtt2  = 37;&lt;br /&gt;
	$tva2 = 20;&lt;br /&gt;
&lt;br /&gt;
	$newCommandeLine[] = [&lt;br /&gt;
		&amp;quot;desc&amp;quot;		=&amp;gt; $ref1,&lt;br /&gt;
		&amp;quot;subprice&amp;quot;	=&amp;gt; $prix1,&lt;br /&gt;
		&amp;quot;qty&amp;quot;		=&amp;gt; $qtt1,&lt;br /&gt;
		&amp;quot;tva_tx&amp;quot;	=&amp;gt; floatval($tva1),&lt;br /&gt;
		&amp;quot;fk_product&amp;quot;=&amp;gt; $fk_product1&lt;br /&gt;
	];&lt;br /&gt;
&lt;br /&gt;
	$newCommandeLine[] = [&lt;br /&gt;
		&amp;quot;desc&amp;quot;		=&amp;gt; $ref2,&lt;br /&gt;
		&amp;quot;subprice&amp;quot;	=&amp;gt; $prix2,&lt;br /&gt;
		&amp;quot;qty&amp;quot;		=&amp;gt; $qtt2,&lt;br /&gt;
		&amp;quot;tva_tx&amp;quot;	=&amp;gt; floatval($tva2),&lt;br /&gt;
		&amp;quot;fk_product&amp;quot;=&amp;gt; $fk_product2&lt;br /&gt;
	];&lt;br /&gt;
&lt;br /&gt;
	if (count($newCommandeLine) &amp;gt; 0) {&lt;br /&gt;
		$newCommande = [&lt;br /&gt;
			&amp;quot;socid&amp;quot;			=&amp;gt; $clientDoliId,&lt;br /&gt;
			&amp;quot;type&amp;quot; 			=&amp;gt; &amp;quot;0&amp;quot;,&lt;br /&gt;
			&amp;quot;lines&amp;quot;			=&amp;gt; $newCommandeLine,&lt;br /&gt;
			&amp;quot;note_private&amp;quot;	=&amp;gt; &amp;quot;order created automatically with API&amp;quot;,&lt;br /&gt;
		];&lt;br /&gt;
		$newCommandeResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;orders&amp;quot;, json_encode($newCommande));&lt;br /&gt;
		$newCommandeResult = json_decode($newCommandeResult, true);&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* $clientDoliId is the ID of the customer in the Dolibarr database. Either you know it or you can search for it before&lt;br /&gt;
* type =&amp;gt; 0, This is a customer order (while 1 = supplier order)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Validate an order &lt;br /&gt;
	$newCommandeValider = [&lt;br /&gt;
		&amp;quot;idwarehouse&amp;quot;	=&amp;gt; &amp;quot;0&amp;quot;,&lt;br /&gt;
		&amp;quot;notrigger&amp;quot;		=&amp;gt; &amp;quot;0&amp;quot;&lt;br /&gt;
	];&lt;br /&gt;
	$newCommandeValiderResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;orders/&amp;quot;.$newCommandeResult.&amp;quot;/validate&amp;quot;, json_encode($newCommandeValider));&lt;br /&gt;
	$newCommandeValiderResult = json_decode($newCommandeValiderResult, true);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* in this example, on the penultimate line, we can see : $apiUrl.&amp;quot;orders/&amp;quot;.$newCommandeResult.&amp;quot;/validate&amp;quot;.&amp;lt;br/&amp;gt;&lt;br /&gt;
$newCommandeResult is the ID of the order created in the previous example&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// search in the database if a customer exist&lt;br /&gt;
	$customer_name = &amp;quot;Acme Inc&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	$clientSearch = json_decode(CallAPI(&amp;quot;GET&amp;quot;, $apiKey, $apiUrl.&amp;quot;thirdparties&amp;quot;, array(&lt;br /&gt;
		&amp;quot;sortfield&amp;quot; =&amp;gt; &amp;quot;t.rowid&amp;quot;, &lt;br /&gt;
		&amp;quot;sortorder&amp;quot; =&amp;gt; &amp;quot;ASC&amp;quot;, &lt;br /&gt;
		&amp;quot;limit&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &lt;br /&gt;
		&amp;quot;mode&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;,&lt;br /&gt;
		&amp;quot;sqlfilters&amp;quot; =&amp;gt; &amp;quot;(t.nom:=:&#039;&amp;quot;.$customer_name.&amp;quot;&#039;)&amp;quot;&lt;br /&gt;
		)&lt;br /&gt;
	), true);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* limit =&amp;gt; 1 only 1 customer&lt;br /&gt;
* mode =&amp;gt; 1 we are looking for a customer, not a supplier (they are thirdparties too but with a different status)&lt;br /&gt;
* sqlfilters a bit special but there are more examples on the explorer page&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// customer doesn&#039;t exist. Let&#039;s create it and get it&#039;s ID&lt;br /&gt;
	$newClient = [&lt;br /&gt;
		&amp;quot;name&amp;quot; 			=&amp;gt; &amp;quot;customer company name&amp;quot;,&lt;br /&gt;
		&amp;quot;email&amp;quot;			=&amp;gt; &amp;quot;customer company email&amp;quot;,&lt;br /&gt;
		&amp;quot;client&amp;quot; 		=&amp;gt; &amp;quot;1&amp;quot;,&lt;br /&gt;
		&amp;quot;code_client&amp;quot;	=&amp;gt; &amp;quot;-1&amp;quot;&lt;br /&gt;
	];&lt;br /&gt;
	$newClientResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;thirdparties&amp;quot;, json_encode($newClient));&lt;br /&gt;
	$newClientResult = json_decode($newClientResult, true);&lt;br /&gt;
	$clientDoliId = $newClientResult;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* client =&amp;gt; 1 He is a customer (not a supplier)&lt;br /&gt;
* code_client =&amp;gt; -1 so the customer code will be generated automatically.&lt;br /&gt;
* we get the customer ID in $clientDoliId&lt;br /&gt;
&lt;br /&gt;
= Develop your own service / API =&lt;br /&gt;
Adding a new REST service is as easy than adding a file called &#039;&#039;&#039;api_mymoduleobject.class.php&#039;&#039;&#039; into the directory &#039;&#039;&#039;htdocs/mymodule/class&#039;&#039;&#039;.&lt;br /&gt;
You take the example into &#039;&#039;&#039;htdocs/commande/class/api_orders.class.php&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that if you use the &#039;&#039;&#039;modulebuilder&#039;&#039;&#039; tool, the file may be generated for you.&lt;br /&gt;
&lt;br /&gt;
The framework detects automatically the API and it should be visible into the explorer.&lt;br /&gt;
&lt;br /&gt;
Method and parameters are detected according to introspection done into PHP class of the object (&#039;&#039;&#039;htdocs/mymodule/class/object.class.php&#039;&#039;&#039;) using the &#039;&#039;&#039;annotations&#039;&#039;&#039; found into the class.&lt;br /&gt;
For a documentation about annotation: https://github.com/Luracast/Restler/blob/master/ANNOTATIONS.md&lt;br /&gt;
&lt;br /&gt;
These are just the basics.&lt;br /&gt;
&lt;br /&gt;
Some more informations in the Dolibarr code. You can look here : htdocs/&amp;lt;directory&amp;gt;/class/api_xxx_class.php&amp;lt;br/&amp;gt;&lt;br /&gt;
Ex : htdocs/societe/class/api_thirdparties.class.php for thirdparties.&amp;lt;br/&amp;gt;&lt;br /&gt;
Ex : Invoices are in htdocs/compta/facture/class&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Web_Services_API_REST_(developer)&amp;diff=47908</id>
		<title>Module Web Services API REST (developer)</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Web_Services_API_REST_(developer)&amp;diff=47908"/>
		<updated>2020-07-13T05:11:26Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* Dolibarr REST web services server */ nginx setup&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:Module_Web_Services_API_REST_(développeur)]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
{{TemplateModEN}}&lt;br /&gt;
[[Category:List of Modules]]&lt;br /&gt;
{{BasculeDevUserEn|&lt;br /&gt;
name=Web services|&lt;br /&gt;
num=2610|&lt;br /&gt;
devdoc=This page|&lt;br /&gt;
userdoc=Not applicable|}}&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;
= Function =&lt;br /&gt;
When enabling this module, you enable usage of web services provided by Dolibarr server. You can then make REST call of different web services provided by Dolibarr.&lt;br /&gt;
&lt;br /&gt;
= Dolibarr REST web services server =&lt;br /&gt;
Once module webservices REST is activated, Dolibarr become also a server of REST web services. So you can send your own REST request to relative URL&lt;br /&gt;
&#039;&#039;&#039;/api/index.php/xxx&#039;&#039;&#039; where xxx is name of the API to call.&lt;br /&gt;
&lt;br /&gt;
A list of APIs on your installation can be found via the explorer.&lt;br /&gt;
&lt;br /&gt;
==Nginx setup==&lt;br /&gt;
This is a simple localhost setup with a working REST API handling (tested with 9.0.1 on parabola gnu/linux).&lt;br /&gt;
&amp;lt;code language=nginx&amp;gt;&lt;br /&gt;
#user html;&lt;br /&gt;
worker_processes  1;&lt;br /&gt;
&lt;br /&gt;
error_log  /var/log/nginx/error.log;&lt;br /&gt;
#error_log  error.log  notice;&lt;br /&gt;
#error_log  error.log  info;&lt;br /&gt;
&lt;br /&gt;
#pid        logs/nginx.pid;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
events {&lt;br /&gt;
    worker_connections  1024;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http {&lt;br /&gt;
    include       mime.types;&lt;br /&gt;
    default_type  application/octet-stream;&lt;br /&gt;
&lt;br /&gt;
    #log_format  main  &#039;$remote_addr - $remote_user [$time_local] &amp;quot;$request&amp;quot; &#039;&lt;br /&gt;
    #                  &#039;$status $body_bytes_sent &amp;quot;$http_referer&amp;quot; &#039;&lt;br /&gt;
    #                  &#039;&amp;quot;$http_user_agent&amp;quot; &amp;quot;$http_x_forwarded_for&amp;quot;&#039;;&lt;br /&gt;
&lt;br /&gt;
    #access_log  logs/access.log  main;&lt;br /&gt;
&lt;br /&gt;
    sendfile        on;&lt;br /&gt;
    #tcp_nopush     on;&lt;br /&gt;
&lt;br /&gt;
    #keepalive_timeout  0;&lt;br /&gt;
    keepalive_timeout  65;&lt;br /&gt;
&lt;br /&gt;
    #gzip  on;&lt;br /&gt;
&lt;br /&gt;
    server {&lt;br /&gt;
    	listen		80;&lt;br /&gt;
        server_name     dolibarr.localhost; # adjust to your domain&lt;br /&gt;
&lt;br /&gt;
        root    /usr/share/webapps/dolibarr/htdocs; # adjust to your path &lt;br /&gt;
        index   index.php;&lt;br /&gt;
&lt;br /&gt;
        # from https://github.com/Dolibarr/dolibarr/issues/6163#issuecomment-391265538&lt;br /&gt;
        location ~ [^/]\.php(/|$) {&lt;br /&gt;
            fastcgi_split_path_info ^(.+?\.php)(/.*)$;&lt;br /&gt;
            if (!-f $document_root$fastcgi_script_name) {&lt;br /&gt;
                return 404;&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            # Mitigate https://httpoxy.org/ vulnerabilities&lt;br /&gt;
            fastcgi_param HTTP_PROXY &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
            root           /usr/share/webapps/dolibarr/htdocs;&lt;br /&gt;
            fastcgi_pass   unix:/run/php-fpm/php-fpm.sock;&lt;br /&gt;
            fastcgi_index  index.php;&lt;br /&gt;
            include        fastcgi_params;&lt;br /&gt;
            fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;&lt;br /&gt;
            # Dolibarr Rest API path support&lt;br /&gt;
            fastcgi_param  PATH_INFO       $fastcgi_path_info;&lt;br /&gt;
            fastcgi_param  PATH_TRANSLATED $document_root$fastcgi_script_name;&lt;br /&gt;
        }&lt;br /&gt;
     }		&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= List of provided services =&lt;br /&gt;
Only few services are available. Starting to Dolibarr 5.0 version, you can see full list of Dolibarr Web services provided, by calling the explorer here at address:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;http://yourdolibarrurl/api/index.php/explorer&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You must first make the first call to the &#039;&#039;&#039;login&#039;&#039;&#039; api to get the API key.&lt;br /&gt;
Then enter api key to get list of all other available API services.&lt;br /&gt;
&lt;br /&gt;
For example, you can try the explorer on the demo instance at:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;https://demo.dolibarr.org/api/index.php/explorer&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You must first make the first call to the &#039;&#039;&#039;login&#039;&#039;&#039; api to get the API key.&lt;br /&gt;
Then enter api key to get list of all other available API services.&lt;br /&gt;
&lt;br /&gt;
You can then test directly from this explorer any API. This is the recommended solution to test any Dolibarr API since any API and parameters is documented here. As a result of any test, you will get the answer but also example on how to call the API from command line using &#039;&#039;&#039;curl&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
To install, open the modules page and activate de API REST module. On the configuration page of the module, there&#039;s a link to an explorer. Click on it to open the API explorer.&lt;br /&gt;
&lt;br /&gt;
On the top right corner, paste the &amp;lt;token&amp;gt; of the user you want to use to call the API and click the &amp;quot;explore&amp;quot; button. Note: The token of each user can be defined on the user record page. &lt;br /&gt;
&lt;br /&gt;
After clicking on &amp;quot;Explore&amp;quot;, you should see all the actions available with this token. If you don&#039;t have a lot of actions, it&#039;s probably because the according modules are not activated. If you want to see the invoices, you have to activate the invoice module in the configuration of Dolibarr. Same for products, third parties and so on.&lt;br /&gt;
&lt;br /&gt;
On this exploration page of the API, you can do quite a lot of tests. Reading datas from Dolibarr and writing, modifying and deleting as well. Warning: Data are really modified in your database.&lt;br /&gt;
&lt;br /&gt;
= Use =&lt;br /&gt;
&lt;br /&gt;
To use the REST API,  you have to call an url such as this one : &amp;lt;nowiki&amp;gt;http://&amp;lt;my_server&amp;gt;/api/index.php/&amp;lt;action&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
with one of the 4 following methods : GET, POST, PUT, DELETE, replacing &amp;lt;action&amp;gt; by the action you want to use. Ex : &amp;lt;nowiki&amp;gt;http://&amp;lt;my_server&amp;gt;/api/index.php/invoices&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There&#039;s different ways to do so. Here&#039;s a piece of code but you can also use libraries such as phphttpclient.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Example of function to call a REST API&lt;br /&gt;
function callAPI($method, $apikey, $url, $data = false)&lt;br /&gt;
{&lt;br /&gt;
    $curl = curl_init();&lt;br /&gt;
    $httpheader = [&#039;DOLAPIKEY: &#039;.$apikey];&lt;br /&gt;
&lt;br /&gt;
    switch ($method)&lt;br /&gt;
    {&lt;br /&gt;
        case &amp;quot;POST&amp;quot;:&lt;br /&gt;
            curl_setopt($curl, CURLOPT_POST, 1);&lt;br /&gt;
            $httpheader[] = &amp;quot;Content-Type:application/json&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
            if ($data)&lt;br /&gt;
                curl_setopt($curl, CURLOPT_POSTFIELDS, $data);&lt;br /&gt;
&lt;br /&gt;
            break;&lt;br /&gt;
        case &amp;quot;PUT&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
	    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, &#039;PUT&#039;);&lt;br /&gt;
            $httpheader[] = &amp;quot;Content-Type:application/json&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
            if ($data)&lt;br /&gt;
                curl_setopt($curl, CURLOPT_POSTFIELDS, $data);&lt;br /&gt;
&lt;br /&gt;
            break;&lt;br /&gt;
        default:&lt;br /&gt;
            if ($data)&lt;br /&gt;
                $url = sprintf(&amp;quot;%s?%s&amp;quot;, $url, http_build_query($data));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Optional Authentication:&lt;br /&gt;
    //    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);&lt;br /&gt;
    //    curl_setopt($curl, CURLOPT_USERPWD, &amp;quot;username:password&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    curl_setopt($curl, CURLOPT_URL, $url);&lt;br /&gt;
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    curl_setopt($curl, CURLOPT_HTTPHEADER, $httpheader);&lt;br /&gt;
&lt;br /&gt;
    $result = curl_exec($curl);&lt;br /&gt;
&lt;br /&gt;
    curl_close($curl);&lt;br /&gt;
&lt;br /&gt;
    return $result;&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is just a working example. There&#039;s no error control and security was not in mind but you can use this code, modify it to suit your needs&amp;lt;br/&amp;gt;&lt;br /&gt;
The fonction has 4 parameters :&lt;br /&gt;
* $method : string, &amp;quot;GET&amp;quot;, &amp;quot;POST&amp;quot;, &amp;quot;PUT&amp;quot;, &amp;quot;DELETE&amp;quot;&lt;br /&gt;
* $apikey : string, &amp;quot;your &amp;lt;token&amp;gt; generated earlier&amp;quot;&lt;br /&gt;
* $url : string, url to call. Ex : &amp;quot;&amp;lt;nowiki&amp;gt;http://&amp;lt;my_server&amp;gt;/api/index.php/invoices&amp;lt;/nowiki&amp;gt;&amp;quot;&lt;br /&gt;
* $data : string, datas in json format. This parameter is not mandatory.&lt;br /&gt;
&lt;br /&gt;
= Examples with PHP =&lt;br /&gt;
&lt;br /&gt;
This is more examples, for different uses cases:&lt;br /&gt;
&lt;br /&gt;
In every examples, we have:&lt;br /&gt;
* $apiKey = &amp;quot;&amp;lt;my token&amp;gt;&amp;quot;;&lt;br /&gt;
* $apiUrl = &amp;quot;&amp;lt;nowiki&amp;gt;http://&amp;lt;my_server&amp;gt;/api/index.php/&amp;lt;/nowiki&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Retrieve products list&lt;br /&gt;
	$listProduits = [];&lt;br /&gt;
	$produitParam = [&amp;quot;limit&amp;quot; =&amp;gt; 10000, &amp;quot;sortfield&amp;quot; =&amp;gt; &amp;quot;rowid&amp;quot;];&lt;br /&gt;
	$listProduitsResult = CallAPI(&amp;quot;GET&amp;quot;, $apiKey, $apiUrl.&amp;quot;products&amp;quot;, $produitParam);&lt;br /&gt;
	$listProduitsResult = json_decode($listProduitsResult, true);&lt;br /&gt;
&lt;br /&gt;
	if (isset($listProduitsResult[&amp;quot;error&amp;quot;]) &amp;amp;&amp;amp; $listProduitsResult[&amp;quot;error&amp;quot;][&amp;quot;code&amp;quot;] &amp;gt;= &amp;quot;300&amp;quot;) {&lt;br /&gt;
	} else {&lt;br /&gt;
		foreach ($listProduitsResult as $produit) {&lt;br /&gt;
			$listProduits[intval($produit[&amp;quot;id&amp;quot;])] = html_entity_decode($produit[&amp;quot;ref&amp;quot;], ENT_QUOTES);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* I retrieve the 10&#039;000 first products sorted on their ID in the base&lt;br /&gt;
* html_entity_decode is necessary as single quotes are encoded&lt;br /&gt;
* It&#039;s easy to use the same method (replacing products with dictionnarycountries) to retrieve the list of countries and their ID&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Create a product&lt;br /&gt;
	$ref = &amp;quot;my_product_ref_X203ZZ&amp;quot;;&lt;br /&gt;
	$newProduct = [&lt;br /&gt;
		&amp;quot;ref&amp;quot;	=&amp;gt; $ref,&lt;br /&gt;
		&amp;quot;label&amp;quot;	=&amp;gt; $ref&lt;br /&gt;
	];&lt;br /&gt;
	$newProductResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;products&amp;quot;, json_encode($newProduct));&lt;br /&gt;
	$newProductResult = json_decode($newProductResult, true);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* before creating a product, it could be wise to check if it exists. Using my first example, you&#039;ll have  :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// my ref&lt;br /&gt;
	$ref = &amp;quot;my_product_ref_X203ZZ&amp;quot;;&lt;br /&gt;
// does it exist in my array&lt;br /&gt;
	$produitKey = array_search($ref, $listProduits);&lt;br /&gt;
	if ($produitKey) {&lt;br /&gt;
// yes&lt;br /&gt;
		$fk_product = $produitKey;&lt;br /&gt;
	} else {&lt;br /&gt;
// no&lt;br /&gt;
// Create the product&lt;br /&gt;
		$newProduct = [&lt;br /&gt;
			&amp;quot;ref&amp;quot;	=&amp;gt; $ref,&lt;br /&gt;
			&amp;quot;label&amp;quot;	=&amp;gt; $ref&lt;br /&gt;
		];&lt;br /&gt;
		$newProductResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;products&amp;quot;, json_encode($newProduct));&lt;br /&gt;
		$newProductResult = json_decode($newProductResult, true);&lt;br /&gt;
		if (isset($newProductResult[&amp;quot;error&amp;quot;]) &amp;amp;&amp;amp; $newProductResult[&amp;quot;error&amp;quot;][&amp;quot;code&amp;quot;] &amp;gt;= &amp;quot;300&amp;quot;) {&lt;br /&gt;
// there&#039;s been an error&lt;br /&gt;
			echo &amp;quot;&amp;lt;pre&amp;gt;ERROR&amp;quot;, var_dump($newProductResult), &amp;quot;&amp;lt;/pre&amp;gt;&amp;quot;;&lt;br /&gt;
			exit;&lt;br /&gt;
		} else {&lt;br /&gt;
// everything good&lt;br /&gt;
			$fk_product = $newProductResult;&lt;br /&gt;
			$listProduits[$fk_product] = $ref;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* I check if the ref of my product exist in the array created in the first example.&lt;br /&gt;
* If it exists, I use it&#039;s key in the array as ID&lt;br /&gt;
* If it doesn&#039;t exist, I create the product, then I add it to my array for next time then I use the ID created&lt;br /&gt;
* I choose this method to do less API calls when I have to import 500 orders. I just need to retrieve the products list once at the beginning instead of searching Dolibarr each time.&lt;br /&gt;
&lt;br /&gt;
Warning: The example below is not working properly. Creating an order and lines in one go is not supported. Instead you have to create an order first and with the returned order id add the lines using the /orders/{id}/lines endpoint. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// create an order with 2 products&lt;br /&gt;
&lt;br /&gt;
// The array where there will be all the products lines of my order.&lt;br /&gt;
	$newCommandeLine = [];&lt;br /&gt;
&lt;br /&gt;
// product 1&lt;br /&gt;
	$ref1 = &amp;quot;my_product_ref_X203ZZ&amp;quot;;&lt;br /&gt;
	$prix1 = 10;&lt;br /&gt;
	$qtt1  = 100;&lt;br /&gt;
	$tva1 = 20;&lt;br /&gt;
	$fk_product1&lt;br /&gt;
// product 2&lt;br /&gt;
	$ref2 = &amp;quot;my_product_ref_B707FD&amp;quot;;&lt;br /&gt;
	$prix2 = 13;&lt;br /&gt;
	$qtt2  = 37;&lt;br /&gt;
	$tva2 = 20;&lt;br /&gt;
&lt;br /&gt;
	$newCommandeLine[] = [&lt;br /&gt;
		&amp;quot;desc&amp;quot;		=&amp;gt; $ref1,&lt;br /&gt;
		&amp;quot;subprice&amp;quot;	=&amp;gt; $prix1,&lt;br /&gt;
		&amp;quot;qty&amp;quot;		=&amp;gt; $qtt1,&lt;br /&gt;
		&amp;quot;tva_tx&amp;quot;	=&amp;gt; floatval($tva1),&lt;br /&gt;
		&amp;quot;fk_product&amp;quot;=&amp;gt; $fk_product1&lt;br /&gt;
	];&lt;br /&gt;
&lt;br /&gt;
	$newCommandeLine[] = [&lt;br /&gt;
		&amp;quot;desc&amp;quot;		=&amp;gt; $ref2,&lt;br /&gt;
		&amp;quot;subprice&amp;quot;	=&amp;gt; $prix2,&lt;br /&gt;
		&amp;quot;qty&amp;quot;		=&amp;gt; $qtt2,&lt;br /&gt;
		&amp;quot;tva_tx&amp;quot;	=&amp;gt; floatval($tva2),&lt;br /&gt;
		&amp;quot;fk_product&amp;quot;=&amp;gt; $fk_product2&lt;br /&gt;
	];&lt;br /&gt;
&lt;br /&gt;
	if (count($newCommandeLine) &amp;gt; 0) {&lt;br /&gt;
		$newCommande = [&lt;br /&gt;
			&amp;quot;socid&amp;quot;			=&amp;gt; $clientDoliId,&lt;br /&gt;
			&amp;quot;type&amp;quot; 			=&amp;gt; &amp;quot;0&amp;quot;,&lt;br /&gt;
			&amp;quot;lines&amp;quot;			=&amp;gt; $newCommandeLine,&lt;br /&gt;
			&amp;quot;note_private&amp;quot;	=&amp;gt; &amp;quot;order created automatically with API&amp;quot;,&lt;br /&gt;
		];&lt;br /&gt;
		$newCommandeResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;orders&amp;quot;, json_encode($newCommande));&lt;br /&gt;
		$newCommandeResult = json_decode($newCommandeResult, true);&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* $clientDoliId is the ID of the customer in the Dolibarr database. Either you know it or you can search for it before&lt;br /&gt;
* type =&amp;gt; 0, This is a customer order (while 1 = supplier order)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Validate an order &lt;br /&gt;
	$newCommandeValider = [&lt;br /&gt;
		&amp;quot;idwarehouse&amp;quot;	=&amp;gt; &amp;quot;0&amp;quot;,&lt;br /&gt;
		&amp;quot;notrigger&amp;quot;		=&amp;gt; &amp;quot;0&amp;quot;&lt;br /&gt;
	];&lt;br /&gt;
	$newCommandeValiderResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;orders/&amp;quot;.$newCommandeResult.&amp;quot;/validate&amp;quot;, json_encode($newCommandeValider));&lt;br /&gt;
	$newCommandeValiderResult = json_decode($newCommandeValiderResult, true);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* in this example, on the penultimate line, we can see : $apiUrl.&amp;quot;orders/&amp;quot;.$newCommandeResult.&amp;quot;/validate&amp;quot;.&amp;lt;br/&amp;gt;&lt;br /&gt;
$newCommandeResult is the ID of the order created in the previous example&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// search in the database if a customer exist&lt;br /&gt;
	$customer_name = &amp;quot;Acme Inc&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	$clientSearch = json_decode(CallAPI(&amp;quot;GET&amp;quot;, $apiKey, $apiUrl.&amp;quot;thirdparties&amp;quot;, array(&lt;br /&gt;
		&amp;quot;sortfield&amp;quot; =&amp;gt; &amp;quot;t.rowid&amp;quot;, &lt;br /&gt;
		&amp;quot;sortorder&amp;quot; =&amp;gt; &amp;quot;ASC&amp;quot;, &lt;br /&gt;
		&amp;quot;limit&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &lt;br /&gt;
		&amp;quot;mode&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;,&lt;br /&gt;
		&amp;quot;sqlfilters&amp;quot; =&amp;gt; &amp;quot;(t.nom:=:&#039;&amp;quot;.$customer_name.&amp;quot;&#039;)&amp;quot;&lt;br /&gt;
		)&lt;br /&gt;
	), true);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* limit =&amp;gt; 1 only 1 customer&lt;br /&gt;
* mode =&amp;gt; 1 we are looking for a customer, not a supplier (they are thirdparties too but with a different status)&lt;br /&gt;
* sqlfilters a bit special but there are more examples on the explorer page&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// customer doesn&#039;t exist. Let&#039;s create it and get it&#039;s ID&lt;br /&gt;
	$newClient = [&lt;br /&gt;
		&amp;quot;name&amp;quot; 			=&amp;gt; &amp;quot;customer company name&amp;quot;,&lt;br /&gt;
		&amp;quot;email&amp;quot;			=&amp;gt; &amp;quot;customer company email&amp;quot;,&lt;br /&gt;
		&amp;quot;client&amp;quot; 		=&amp;gt; &amp;quot;1&amp;quot;,&lt;br /&gt;
		&amp;quot;code_client&amp;quot;	=&amp;gt; &amp;quot;-1&amp;quot;&lt;br /&gt;
	];&lt;br /&gt;
	$newClientResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;thirdparties&amp;quot;, json_encode($newClient));&lt;br /&gt;
	$newClientResult = json_decode($newClientResult, true);&lt;br /&gt;
	$clientDoliId = $newClientResult;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* client =&amp;gt; 1 He is a customer (not a supplier)&lt;br /&gt;
* code_client =&amp;gt; -1 so the customer code will be generated automatically.&lt;br /&gt;
* we get the customer ID in $clientDoliId&lt;br /&gt;
&lt;br /&gt;
= Develop your own service / API =&lt;br /&gt;
Adding a new REST service is as easy than adding a file called &#039;&#039;&#039;api_mymoduleobject.class.php&#039;&#039;&#039; into the directory &#039;&#039;&#039;htdocs/mymodule/class&#039;&#039;&#039;.&lt;br /&gt;
You take the example into &#039;&#039;&#039;htdocs/commande/class/api_orders.class.php&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that if you use the &#039;&#039;&#039;modulebuilder&#039;&#039;&#039; tool, the file may be generated for you.&lt;br /&gt;
&lt;br /&gt;
The framework detects automatically the API and it should be visible into the explorer.&lt;br /&gt;
&lt;br /&gt;
Method and parameters are detected according to introspection done into PHP class of the object (&#039;&#039;&#039;htdocs/mymodule/class/object.class.php&#039;&#039;&#039;) using the &#039;&#039;&#039;annotations&#039;&#039;&#039; found into the class.&lt;br /&gt;
For a documentation about annotation: https://github.com/Luracast/Restler/blob/master/ANNOTATIONS.md&lt;br /&gt;
&lt;br /&gt;
These are just the basics.&lt;br /&gt;
&lt;br /&gt;
Some more informations in the Dolibarr code. You can look here : htdocs/&amp;lt;directory&amp;gt;/class/api_xxx_class.php&amp;lt;br/&amp;gt;&lt;br /&gt;
Ex : htdocs/societe/class/api_thirdparties.class.php for thirdparties.&amp;lt;br/&amp;gt;&lt;br /&gt;
Ex : Invoices are in htdocs/compta/facture/class&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Web_Services_API_REST_(developer)&amp;diff=47907</id>
		<title>Module Web Services API REST (developer)</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Web_Services_API_REST_(developer)&amp;diff=47907"/>
		<updated>2020-07-12T21:22:25Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* Examples */ warning about non-working example&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:Module_Web_Services_API_REST_(développeur)]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
{{TemplateModEN}}&lt;br /&gt;
[[Category:List of Modules]]&lt;br /&gt;
{{BasculeDevUserEn|&lt;br /&gt;
name=Web services|&lt;br /&gt;
num=2610|&lt;br /&gt;
devdoc=This page|&lt;br /&gt;
userdoc=Not applicable|}}&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;
= Function =&lt;br /&gt;
When enabling this module, you enable usage of web services provided by Dolibarr server. You can then make REST call of different web services provided by Dolibarr.&lt;br /&gt;
&lt;br /&gt;
= Dolibarr REST web services server =&lt;br /&gt;
Once module webservices REST is activated, Dolibarr become also a server of REST web services. So you can send your own REST request to relative URL&lt;br /&gt;
&#039;&#039;&#039;/api/index.php/xxx.php&#039;&#039;&#039; where xxx is name of the API to call.&lt;br /&gt;
&lt;br /&gt;
= List of provided services =&lt;br /&gt;
Only few services are available. Starting to Dolibarr 5.0 version, you can see full list of Dolibarr Web services provided, by calling the explorer here at address:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;http://yourdolibarrurl/api/index.php/explorer&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
You must first make the first call to the &#039;&#039;&#039;login&#039;&#039;&#039; api to get the API key.&lt;br /&gt;
Then enter api key to get list of all other available API services.&lt;br /&gt;
&lt;br /&gt;
For example, you can try the explorer on the demo instance at:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;https://demo.dolibarr.org/api/index.php/explorer&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You must first make the first call to the &#039;&#039;&#039;login&#039;&#039;&#039; api to get the API key.&lt;br /&gt;
Then enter api key to get list of all other available API services.&lt;br /&gt;
&lt;br /&gt;
You can then test directly from this explorer any API. This is the recommended solution to test any Dolibarr API since any API and parameters is documented here. As a result of any test, you will get the answer but also example on how to call the API from command line using &#039;&#039;&#039;curl&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
To install, open the modules page and activate de API REST module. On the configuration page of the module, there&#039;s a link to an explorer. Click on it to open the API explorer.&lt;br /&gt;
&lt;br /&gt;
On the top right corner, paste the &amp;lt;token&amp;gt; of the user you want to use to call the API and click the &amp;quot;explore&amp;quot; button. Note: The token of each user can be defined on the user record page. &lt;br /&gt;
&lt;br /&gt;
After clicking on &amp;quot;Explore&amp;quot;, you should see all the actions available with this token. If you don&#039;t have a lot of actions, it&#039;s probably because the according modules are not activated. If you want to see the invoices, you have to activate the invoice module in the configuration of Dolibarr. Same for products, third parties and so on.&lt;br /&gt;
&lt;br /&gt;
On this exploration page of the API, you can do quite a lot of tests. Reading datas from Dolibarr and writing, modifying and deleting as well. Warning: Data are really modified in your database.&lt;br /&gt;
&lt;br /&gt;
= Use =&lt;br /&gt;
&lt;br /&gt;
To use the REST API,  you have to call an url such as this one : &amp;lt;nowiki&amp;gt;http://&amp;lt;my_server&amp;gt;/api/index.php/&amp;lt;action&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
with one of the 4 following methods : GET, POST, PUT, DELETE, replacing &amp;lt;action&amp;gt; by the action you want to use. Ex : &amp;lt;nowiki&amp;gt;http://&amp;lt;my_server&amp;gt;/api/index.php/invoices&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There&#039;s different ways to do so. Here&#039;s a piece of code but you can also use libraries such as phphttpclient.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Example of function to call a REST API&lt;br /&gt;
function callAPI($method, $apikey, $url, $data = false)&lt;br /&gt;
{&lt;br /&gt;
    $curl = curl_init();&lt;br /&gt;
    $httpheader = [&#039;DOLAPIKEY: &#039;.$apikey];&lt;br /&gt;
&lt;br /&gt;
    switch ($method)&lt;br /&gt;
    {&lt;br /&gt;
        case &amp;quot;POST&amp;quot;:&lt;br /&gt;
            curl_setopt($curl, CURLOPT_POST, 1);&lt;br /&gt;
            $httpheader[] = &amp;quot;Content-Type:application/json&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
            if ($data)&lt;br /&gt;
                curl_setopt($curl, CURLOPT_POSTFIELDS, $data);&lt;br /&gt;
&lt;br /&gt;
            break;&lt;br /&gt;
        case &amp;quot;PUT&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
	    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, &#039;PUT&#039;);&lt;br /&gt;
            $httpheader[] = &amp;quot;Content-Type:application/json&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
            if ($data)&lt;br /&gt;
                curl_setopt($curl, CURLOPT_POSTFIELDS, $data);&lt;br /&gt;
&lt;br /&gt;
            break;&lt;br /&gt;
        default:&lt;br /&gt;
            if ($data)&lt;br /&gt;
                $url = sprintf(&amp;quot;%s?%s&amp;quot;, $url, http_build_query($data));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Optional Authentication:&lt;br /&gt;
    //    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);&lt;br /&gt;
    //    curl_setopt($curl, CURLOPT_USERPWD, &amp;quot;username:password&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    curl_setopt($curl, CURLOPT_URL, $url);&lt;br /&gt;
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    curl_setopt($curl, CURLOPT_HTTPHEADER, $httpheader);&lt;br /&gt;
&lt;br /&gt;
    $result = curl_exec($curl);&lt;br /&gt;
&lt;br /&gt;
    curl_close($curl);&lt;br /&gt;
&lt;br /&gt;
    return $result;&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is just a working example. There&#039;s no error control and security was not in mind but you can use this code, modify it to suit your needs&amp;lt;br/&amp;gt;&lt;br /&gt;
The fonction has 4 parameters :&lt;br /&gt;
* $method : string, &amp;quot;GET&amp;quot;, &amp;quot;POST&amp;quot;, &amp;quot;PUT&amp;quot;, &amp;quot;DELETE&amp;quot;&lt;br /&gt;
* $apikey : string, &amp;quot;your &amp;lt;token&amp;gt; generated earlier&amp;quot;&lt;br /&gt;
* $url : string, url to call. Ex : &amp;quot;&amp;lt;nowiki&amp;gt;http://&amp;lt;my_server&amp;gt;/api/index.php/invoices&amp;lt;/nowiki&amp;gt;&amp;quot;&lt;br /&gt;
* $data : string, datas in json format. This parameter is not mandatory.&lt;br /&gt;
&lt;br /&gt;
= Examples with PHP =&lt;br /&gt;
&lt;br /&gt;
This is more examples, for different uses cases:&lt;br /&gt;
&lt;br /&gt;
In every examples, we have:&lt;br /&gt;
* $apiKey = &amp;quot;&amp;lt;my token&amp;gt;&amp;quot;;&lt;br /&gt;
* $apiUrl = &amp;quot;&amp;lt;nowiki&amp;gt;http://&amp;lt;my_server&amp;gt;/api/index.php/&amp;lt;/nowiki&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Retrieve products list&lt;br /&gt;
	$listProduits = [];&lt;br /&gt;
	$produitParam = [&amp;quot;limit&amp;quot; =&amp;gt; 10000, &amp;quot;sortfield&amp;quot; =&amp;gt; &amp;quot;rowid&amp;quot;];&lt;br /&gt;
	$listProduitsResult = CallAPI(&amp;quot;GET&amp;quot;, $apiKey, $apiUrl.&amp;quot;products&amp;quot;, $produitParam);&lt;br /&gt;
	$listProduitsResult = json_decode($listProduitsResult, true);&lt;br /&gt;
&lt;br /&gt;
	if (isset($listProduitsResult[&amp;quot;error&amp;quot;]) &amp;amp;&amp;amp; $listProduitsResult[&amp;quot;error&amp;quot;][&amp;quot;code&amp;quot;] &amp;gt;= &amp;quot;300&amp;quot;) {&lt;br /&gt;
	} else {&lt;br /&gt;
		foreach ($listProduitsResult as $produit) {&lt;br /&gt;
			$listProduits[intval($produit[&amp;quot;id&amp;quot;])] = html_entity_decode($produit[&amp;quot;ref&amp;quot;], ENT_QUOTES);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* I retrieve the 10&#039;000 first products sorted on their ID in the base&lt;br /&gt;
* html_entity_decode is necessary as single quotes are encoded&lt;br /&gt;
* It&#039;s easy to use the same method (replacing products with dictionnarycountries) to retrieve the list of countries and their ID&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Create a product&lt;br /&gt;
	$ref = &amp;quot;my_product_ref_X203ZZ&amp;quot;;&lt;br /&gt;
	$newProduct = [&lt;br /&gt;
		&amp;quot;ref&amp;quot;	=&amp;gt; $ref,&lt;br /&gt;
		&amp;quot;label&amp;quot;	=&amp;gt; $ref&lt;br /&gt;
	];&lt;br /&gt;
	$newProductResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;products&amp;quot;, json_encode($newProduct));&lt;br /&gt;
	$newProductResult = json_decode($newProductResult, true);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* before creating a product, it could be wise to check if it exists. Using my first example, you&#039;ll have  :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// my ref&lt;br /&gt;
	$ref = &amp;quot;my_product_ref_X203ZZ&amp;quot;;&lt;br /&gt;
// does it exist in my array&lt;br /&gt;
	$produitKey = array_search($ref, $listProduits);&lt;br /&gt;
	if ($produitKey) {&lt;br /&gt;
// yes&lt;br /&gt;
		$fk_product = $produitKey;&lt;br /&gt;
	} else {&lt;br /&gt;
// no&lt;br /&gt;
// Create the product&lt;br /&gt;
		$newProduct = [&lt;br /&gt;
			&amp;quot;ref&amp;quot;	=&amp;gt; $ref,&lt;br /&gt;
			&amp;quot;label&amp;quot;	=&amp;gt; $ref&lt;br /&gt;
		];&lt;br /&gt;
		$newProductResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;products&amp;quot;, json_encode($newProduct));&lt;br /&gt;
		$newProductResult = json_decode($newProductResult, true);&lt;br /&gt;
		if (isset($newProductResult[&amp;quot;error&amp;quot;]) &amp;amp;&amp;amp; $newProductResult[&amp;quot;error&amp;quot;][&amp;quot;code&amp;quot;] &amp;gt;= &amp;quot;300&amp;quot;) {&lt;br /&gt;
// there&#039;s been an error&lt;br /&gt;
			echo &amp;quot;&amp;lt;pre&amp;gt;ERROR&amp;quot;, var_dump($newProductResult), &amp;quot;&amp;lt;/pre&amp;gt;&amp;quot;;&lt;br /&gt;
			exit;&lt;br /&gt;
		} else {&lt;br /&gt;
// everything good&lt;br /&gt;
			$fk_product = $newProductResult;&lt;br /&gt;
			$listProduits[$fk_product] = $ref;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* I check if the ref of my product exist in the array created in the first example.&lt;br /&gt;
* If it exists, I use it&#039;s key in the array as ID&lt;br /&gt;
* If it doesn&#039;t exist, I create the product, then I add it to my array for next time then I use the ID created&lt;br /&gt;
* I choose this method to do less API calls when I have to import 500 orders. I just need to retrieve the products list once at the beginning instead of searching Dolibarr each time.&lt;br /&gt;
&lt;br /&gt;
Warning: The example below is not working properly. Creating an order and lines in one go is not supported. Instead you have to create an order first and with the returned order id add the lines using the /orders/{id}/lines endpoint. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// create an order with 2 products&lt;br /&gt;
&lt;br /&gt;
// The array where there will be all the products lines of my order.&lt;br /&gt;
	$newCommandeLine = [];&lt;br /&gt;
&lt;br /&gt;
// product 1&lt;br /&gt;
	$ref1 = &amp;quot;my_product_ref_X203ZZ&amp;quot;;&lt;br /&gt;
	$prix1 = 10;&lt;br /&gt;
	$qtt1  = 100;&lt;br /&gt;
	$tva1 = 20;&lt;br /&gt;
	$fk_product1&lt;br /&gt;
// product 2&lt;br /&gt;
	$ref2 = &amp;quot;my_product_ref_B707FD&amp;quot;;&lt;br /&gt;
	$prix2 = 13;&lt;br /&gt;
	$qtt2  = 37;&lt;br /&gt;
	$tva2 = 20;&lt;br /&gt;
&lt;br /&gt;
	$newCommandeLine[] = [&lt;br /&gt;
		&amp;quot;desc&amp;quot;		=&amp;gt; $ref1,&lt;br /&gt;
		&amp;quot;subprice&amp;quot;	=&amp;gt; $prix1,&lt;br /&gt;
		&amp;quot;qty&amp;quot;		=&amp;gt; $qtt1,&lt;br /&gt;
		&amp;quot;tva_tx&amp;quot;	=&amp;gt; floatval($tva1),&lt;br /&gt;
		&amp;quot;fk_product&amp;quot;=&amp;gt; $fk_product1&lt;br /&gt;
	];&lt;br /&gt;
&lt;br /&gt;
	$newCommandeLine[] = [&lt;br /&gt;
		&amp;quot;desc&amp;quot;		=&amp;gt; $ref2,&lt;br /&gt;
		&amp;quot;subprice&amp;quot;	=&amp;gt; $prix2,&lt;br /&gt;
		&amp;quot;qty&amp;quot;		=&amp;gt; $qtt2,&lt;br /&gt;
		&amp;quot;tva_tx&amp;quot;	=&amp;gt; floatval($tva2),&lt;br /&gt;
		&amp;quot;fk_product&amp;quot;=&amp;gt; $fk_product2&lt;br /&gt;
	];&lt;br /&gt;
&lt;br /&gt;
	if (count($newCommandeLine) &amp;gt; 0) {&lt;br /&gt;
		$newCommande = [&lt;br /&gt;
			&amp;quot;socid&amp;quot;			=&amp;gt; $clientDoliId,&lt;br /&gt;
			&amp;quot;type&amp;quot; 			=&amp;gt; &amp;quot;0&amp;quot;,&lt;br /&gt;
			&amp;quot;lines&amp;quot;			=&amp;gt; $newCommandeLine,&lt;br /&gt;
			&amp;quot;note_private&amp;quot;	=&amp;gt; &amp;quot;order created automatically with API&amp;quot;,&lt;br /&gt;
		];&lt;br /&gt;
		$newCommandeResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;orders&amp;quot;, json_encode($newCommande));&lt;br /&gt;
		$newCommandeResult = json_decode($newCommandeResult, true);&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* $clientDoliId is the ID of the customer in the Dolibarr database. Either you know it or you can search for it before&lt;br /&gt;
* type =&amp;gt; 0, This is a customer order (while 1 = supplier order)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Validate an order &lt;br /&gt;
	$newCommandeValider = [&lt;br /&gt;
		&amp;quot;idwarehouse&amp;quot;	=&amp;gt; &amp;quot;0&amp;quot;,&lt;br /&gt;
		&amp;quot;notrigger&amp;quot;		=&amp;gt; &amp;quot;0&amp;quot;&lt;br /&gt;
	];&lt;br /&gt;
	$newCommandeValiderResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;orders/&amp;quot;.$newCommandeResult.&amp;quot;/validate&amp;quot;, json_encode($newCommandeValider));&lt;br /&gt;
	$newCommandeValiderResult = json_decode($newCommandeValiderResult, true);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* in this example, on the penultimate line, we can see : $apiUrl.&amp;quot;orders/&amp;quot;.$newCommandeResult.&amp;quot;/validate&amp;quot;.&amp;lt;br/&amp;gt;&lt;br /&gt;
$newCommandeResult is the ID of the order created in the previous example&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// search in the database if a customer exist&lt;br /&gt;
	$customer_name = &amp;quot;Acme Inc&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	$clientSearch = json_decode(CallAPI(&amp;quot;GET&amp;quot;, $apiKey, $apiUrl.&amp;quot;thirdparties&amp;quot;, array(&lt;br /&gt;
		&amp;quot;sortfield&amp;quot; =&amp;gt; &amp;quot;t.rowid&amp;quot;, &lt;br /&gt;
		&amp;quot;sortorder&amp;quot; =&amp;gt; &amp;quot;ASC&amp;quot;, &lt;br /&gt;
		&amp;quot;limit&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &lt;br /&gt;
		&amp;quot;mode&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;,&lt;br /&gt;
		&amp;quot;sqlfilters&amp;quot; =&amp;gt; &amp;quot;(t.nom:=:&#039;&amp;quot;.$customer_name.&amp;quot;&#039;)&amp;quot;&lt;br /&gt;
		)&lt;br /&gt;
	), true);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* limit =&amp;gt; 1 only 1 customer&lt;br /&gt;
* mode =&amp;gt; 1 we are looking for a customer, not a supplier (they are thirdparties too but with a different status)&lt;br /&gt;
* sqlfilters a bit special but there are more examples on the explorer page&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// customer doesn&#039;t exist. Let&#039;s create it and get it&#039;s ID&lt;br /&gt;
	$newClient = [&lt;br /&gt;
		&amp;quot;name&amp;quot; 			=&amp;gt; &amp;quot;customer company name&amp;quot;,&lt;br /&gt;
		&amp;quot;email&amp;quot;			=&amp;gt; &amp;quot;customer company email&amp;quot;,&lt;br /&gt;
		&amp;quot;client&amp;quot; 		=&amp;gt; &amp;quot;1&amp;quot;,&lt;br /&gt;
		&amp;quot;code_client&amp;quot;	=&amp;gt; &amp;quot;-1&amp;quot;&lt;br /&gt;
	];&lt;br /&gt;
	$newClientResult = CallAPI(&amp;quot;POST&amp;quot;, $apiKey, $apiUrl.&amp;quot;thirdparties&amp;quot;, json_encode($newClient));&lt;br /&gt;
	$newClientResult = json_decode($newClientResult, true);&lt;br /&gt;
	$clientDoliId = $newClientResult;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Comments :&lt;br /&gt;
* client =&amp;gt; 1 He is a customer (not a supplier)&lt;br /&gt;
* code_client =&amp;gt; -1 so the customer code will be generated automatically.&lt;br /&gt;
* we get the customer ID in $clientDoliId&lt;br /&gt;
&lt;br /&gt;
= Develop your own service / API =&lt;br /&gt;
Adding a new REST service is as easy than adding a file called &#039;&#039;&#039;api_mymoduleobject.class.php&#039;&#039;&#039; into the directory &#039;&#039;&#039;htdocs/mymodule/class&#039;&#039;&#039;.&lt;br /&gt;
You take the example into &#039;&#039;&#039;htdocs/commande/class/api_orders.class.php&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that if you use the &#039;&#039;&#039;modulebuilder&#039;&#039;&#039; tool, the file may be generated for you.&lt;br /&gt;
&lt;br /&gt;
The framework detects automatically the API and it should be visible into the explorer.&lt;br /&gt;
&lt;br /&gt;
Method and parameters are detected according to introspection done into PHP class of the object (&#039;&#039;&#039;htdocs/mymodule/class/object.class.php&#039;&#039;&#039;) using the &#039;&#039;&#039;annotations&#039;&#039;&#039; found into the class.&lt;br /&gt;
For a documentation about annotation: https://github.com/Luracast/Restler/blob/master/ANNOTATIONS.md&lt;br /&gt;
&lt;br /&gt;
These are just the basics.&lt;br /&gt;
&lt;br /&gt;
Some more informations in the Dolibarr code. You can look here : htdocs/&amp;lt;directory&amp;gt;/class/api_xxx_class.php&amp;lt;br/&amp;gt;&lt;br /&gt;
Ex : htdocs/societe/class/api_thirdparties.class.php for thirdparties.&amp;lt;br/&amp;gt;&lt;br /&gt;
Ex : Invoices are in htdocs/compta/facture/class&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=FAQ_Custom_reporting_script_EN&amp;diff=46709</id>
		<title>FAQ Custom reporting script EN</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=FAQ_Custom_reporting_script_EN&amp;diff=46709"/>
		<updated>2020-03-20T18:10:22Z</updated>

		<summary type="html">&lt;p&gt;Egils: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
[[Category:FAQ EN]]&lt;br /&gt;
&lt;br /&gt;
The standard reporting in Dolibarr did not suit my needs so I created a custom one using a bash script. To use and adapt this script you should familiarize yourself with the columns of the table llx_accounting_bookkeeping as this is where your ledger is stored.&lt;br /&gt;
&lt;br /&gt;
Before running this script, make sure you have committed all your transactions to the journal (Journalization). This script was run on a Dolibarr 9.0.1 install, you might have to adapt it if using another version e.g. if the table or column names have changed.&lt;br /&gt;
&lt;br /&gt;
This outputs the total sale of year 2019 before taxes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash                                                                     &lt;br /&gt;
DATE=&amp;quot;2019&amp;quot;&lt;br /&gt;
DAT=&amp;quot;19&amp;quot;&lt;br /&gt;
PSQL=&amp;quot;psql -d dolibarr -U dolibarr -t -c&amp;quot;&lt;br /&gt;
SALES=&amp;quot;select sum(credit) from llx_accounting_bookkeeping where code_journal = \&lt;br /&gt;
&#039;short_code_for_sell_journal&#039; and numero_compte = &#039;sales_account_number&#039;  and doc_date &amp;lt;= &#039;12/31/$DAT&#039; and doc_date &amp;gt;= &#039;\&lt;br /&gt;
01/01/$DAT&#039;&amp;quot;&lt;br /&gt;
echo Report for year $AAR&lt;br /&gt;
echo&lt;br /&gt;
echo  -n &amp;quot;Total sales before taxes:&amp;quot;&lt;br /&gt;
$PSQL &amp;quot;$SALES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On linux with postgres installed I do this in a terminal:&lt;br /&gt;
# login as postgres&lt;br /&gt;
 sudo su postres&lt;br /&gt;
# save the script to a file where postgres can write&lt;br /&gt;
  cd ~ &amp;amp;&amp;amp; nano report.sh (paste the content and adjust the short_code_for_sell_journal (defaults to VT), sales_account_number and the DATE/DAT to the year you want)&lt;br /&gt;
# give run permissions&lt;br /&gt;
  chmod +x report.sh&lt;br /&gt;
# run the script&lt;br /&gt;
  ./report.sh&lt;br /&gt;
&lt;br /&gt;
This can be expanded very easily to output very long and detailed reports.&lt;br /&gt;
== Links ==&lt;br /&gt;
* [https://gitlab.com/snippets/1955302 Snippet with a localized script for gathering information for Swedish tax reports]&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=FAQ_Custom_reporting_script_EN&amp;diff=46708</id>
		<title>FAQ Custom reporting script EN</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=FAQ_Custom_reporting_script_EN&amp;diff=46708"/>
		<updated>2020-03-20T18:08:30Z</updated>

		<summary type="html">&lt;p&gt;Egils: snippet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
[[Category:FAQ EN]]&lt;br /&gt;
&lt;br /&gt;
The standard reporting in Dolibarr did not suit my needs so I created a custom one using a bash script. To use and adapt this script you should familiarize yourself with the columns of the table llx_accounting_bookkeeping as this is where your ledger is stored.&lt;br /&gt;
&lt;br /&gt;
Before running this script, make sure you have committed all your transactions to the journal (Journalization).&lt;br /&gt;
&lt;br /&gt;
This outputs the total sale of year 2019 before taxes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash                                                                     &lt;br /&gt;
DATE=&amp;quot;2019&amp;quot;&lt;br /&gt;
DAT=&amp;quot;19&amp;quot;&lt;br /&gt;
PSQL=&amp;quot;psql -d dolibarr -U dolibarr -t -c&amp;quot;&lt;br /&gt;
SALES=&amp;quot;select sum(credit) from llx_accounting_bookkeeping where code_journal = \&lt;br /&gt;
&#039;short_code_for_sell_journal&#039; and numero_compte = &#039;sales_account_number&#039;  and doc_date &amp;lt;= &#039;12/31/$DAT&#039; and doc_date &amp;gt;= &#039;\&lt;br /&gt;
01/01/$DAT&#039;&amp;quot;&lt;br /&gt;
echo Report for year $AAR&lt;br /&gt;
echo&lt;br /&gt;
echo  -n &amp;quot;Total sales before taxes:&amp;quot;&lt;br /&gt;
$PSQL &amp;quot;$SALES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On linux with postgres installed I do this in a terminal:&lt;br /&gt;
# login as postgres&lt;br /&gt;
 sudo su postres&lt;br /&gt;
# save the script to a file where postgres can write&lt;br /&gt;
  cd ~ &amp;amp;&amp;amp; nano report.sh (paste the content and adjust the short_code_for_sell_journal (defaults to VT), sales_account_number and the DATE/DAT to the year you want)&lt;br /&gt;
# give run permissions&lt;br /&gt;
  chmod +x report.sh&lt;br /&gt;
# run the script&lt;br /&gt;
  ./report.sh&lt;br /&gt;
&lt;br /&gt;
This can be expanded very easily to output very long and detailed reports.&lt;br /&gt;
== Links ==&lt;br /&gt;
* [https://gitlab.com/snippets/1955302 Snippet with a localized script for gathering information for Swedish tax reports]&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=FAQ_Custom_reporting_script_EN&amp;diff=46707</id>
		<title>FAQ Custom reporting script EN</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=FAQ_Custom_reporting_script_EN&amp;diff=46707"/>
		<updated>2020-03-20T17:14:44Z</updated>

		<summary type="html">&lt;p&gt;Egils: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
[[Category:FAQ EN]]&lt;br /&gt;
&lt;br /&gt;
The standard reporting in Dolibarr did not suit my needs so I created a custom one using a bash script. To use and adapt this script you should familiarize yourself with the columns of the table llx_accounting_bookkeeping as this is where your ledger is stored.&lt;br /&gt;
&lt;br /&gt;
Before running this script, make sure you have committed all your transactions to the journal (Journalization).&lt;br /&gt;
&lt;br /&gt;
This outputs the total sale of year 2019 before taxes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash                                                                     &lt;br /&gt;
DATE=&amp;quot;2019&amp;quot;&lt;br /&gt;
DAT=&amp;quot;19&amp;quot;&lt;br /&gt;
PSQL=&amp;quot;psql -d dolibarr -U dolibarr -t -c&amp;quot;&lt;br /&gt;
SALES=&amp;quot;select sum(credit) from llx_accounting_bookkeeping where code_journal = \&lt;br /&gt;
&#039;short_code_for_sell_journal&#039; and numero_compte = &#039;sales_account_number&#039;  and doc_date &amp;lt;= &#039;12/31/$DAT&#039; and doc_date &amp;gt;= &#039;\&lt;br /&gt;
01/01/$DAT&#039;&amp;quot;&lt;br /&gt;
echo Report for year $AAR&lt;br /&gt;
echo&lt;br /&gt;
echo  -n &amp;quot;Total sales before taxes:&amp;quot;&lt;br /&gt;
$PSQL &amp;quot;$SALES&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On linux with postgres installed I do this in a terminal:&lt;br /&gt;
# login as postgres&lt;br /&gt;
 sudo su postres&lt;br /&gt;
# save the script to a file where postgres can write&lt;br /&gt;
  cd ~ &amp;amp;&amp;amp; nano report.sh (paste the content and adjust the short_code_for_sell_journal (defaults to VT), sales_account_number and the DATE/DAT to the year you want)&lt;br /&gt;
# give run permissions&lt;br /&gt;
  chmod +x report.sh&lt;br /&gt;
# run the script&lt;br /&gt;
  ./report.sh&lt;br /&gt;
&lt;br /&gt;
This can be expanded very easily to output very long and detailed reports.&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=FAQ_Custom_reporting_script_EN&amp;diff=46706</id>
		<title>FAQ Custom reporting script EN</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=FAQ_Custom_reporting_script_EN&amp;diff=46706"/>
		<updated>2020-03-20T17:13:40Z</updated>

		<summary type="html">&lt;p&gt;Egils: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
[[Category:FAQ EN]]&lt;br /&gt;
&lt;br /&gt;
The standard reporting in Dolibarr did not suit my needs so I created a custom one using a bash script. To use and adapt this script you should familiarize yourself with the columns of the table llx_accounting_bookkeeping as this is where your ledger is stored.&lt;br /&gt;
&lt;br /&gt;
Before running this script, make sure you have committed all your transactions to the journal (Journalization).&lt;br /&gt;
&lt;br /&gt;
This outputs the total sale of year 2019 before taxes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash                                                                     &lt;br /&gt;
DATE=&amp;quot;2019&amp;quot;&lt;br /&gt;
DAT=&amp;quot;19&amp;quot;&lt;br /&gt;
PSQL=&amp;quot;psql -d dolibarr -U dolibarr -t -c&amp;quot;&lt;br /&gt;
c3000=&amp;quot;select sum(credit) from llx_accounting_bookkeeping where code_journal = \&lt;br /&gt;
&#039;short_code_for_sell_journal&#039; and numero_compte = &#039;sales_account_number&#039;  and doc_date &amp;lt;= &#039;12/31/$DAT&#039; and doc_date &amp;gt;= &#039;\&lt;br /&gt;
01/01/$DAT&#039;&amp;quot;&lt;br /&gt;
echo Report for year $AAR&lt;br /&gt;
echo&lt;br /&gt;
echo  -n &amp;quot;Total sales before taxes:&amp;quot;&lt;br /&gt;
$PSQL &amp;quot;$c3000&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On linux with postgres installed I do this in a terminal:&lt;br /&gt;
# login as postgres&lt;br /&gt;
 sudo su postres&lt;br /&gt;
# save the script to a file where postgres can write&lt;br /&gt;
  cd ~ &amp;amp;&amp;amp; nano report.sh (paste the content and adjust the short_code_for_sell_journal (defaults to VT), sales_account_number and the DATE/DAT to the year you want)&lt;br /&gt;
# give run permissions&lt;br /&gt;
  chmod +x report.sh&lt;br /&gt;
# run the script&lt;br /&gt;
  ./report.sh&lt;br /&gt;
&lt;br /&gt;
This can be expanded very easily to output very long and detailed reports.&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=FAQ_Custom_reporting_script_EN&amp;diff=46705</id>
		<title>FAQ Custom reporting script EN</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=FAQ_Custom_reporting_script_EN&amp;diff=46705"/>
		<updated>2020-03-20T17:12:21Z</updated>

		<summary type="html">&lt;p&gt;Egils: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
[[Category:FAQ EN]]&lt;br /&gt;
&lt;br /&gt;
The standard reporting in Dolibarr did not suit my needs so I created a custom one using a bash script. To use and adapt this script you should familiarize yourself with the columns of the table llx_accounting_bookkeeping as this is where your ledger is stored.&lt;br /&gt;
&lt;br /&gt;
Before running this script, make sure you have committed all your transactions to the journal (Journalization).&lt;br /&gt;
&lt;br /&gt;
This outputs the total sale of year 2019 before taxes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash                                                                     &lt;br /&gt;
DATE=&amp;quot;2019&amp;quot;&lt;br /&gt;
DAT=&amp;quot;19&amp;quot;&lt;br /&gt;
PSQL=&amp;quot;psql -d dolibarr -U dolibarr -t -c&amp;quot;&lt;br /&gt;
c3000=&amp;quot;select sum(credit) from llx_accounting_bookkeeping where code_journal = \&lt;br /&gt;
&#039;short_code_for_sell_journal&#039; and numero_compte = &#039;sales_account_number&#039;  and doc_date &amp;lt;= &#039;12/31/$DAT&#039; and doc_date &amp;gt;= &#039;\&lt;br /&gt;
01/01/$DAT&#039;&amp;quot;&lt;br /&gt;
echo Report for year $AAR&lt;br /&gt;
echo&lt;br /&gt;
echo  -n &amp;quot;Total sales before taxes:&amp;quot;&lt;br /&gt;
$PSQL &amp;quot;$c3000&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On linux with postgres installed I do this in a terminal:&lt;br /&gt;
# login as postgres&lt;br /&gt;
 sudo su postres&lt;br /&gt;
# save the script to a file where postgres can write&lt;br /&gt;
  cd ~ &amp;amp;&amp;amp; nano report.sh (paste the content and adapt to your database)&lt;br /&gt;
# give run permissions&lt;br /&gt;
  chmod +x report.sh&lt;br /&gt;
# run the script&lt;br /&gt;
  ./report.sh&lt;br /&gt;
&lt;br /&gt;
Adjust short_code_for_sell_journal (defaults to VT), sales_account_number and the DATE/DAT to the year you want.&lt;br /&gt;
&lt;br /&gt;
This can be expanded very easily to output very long and detailed reports.&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=FAQ_Custom_reporting_script_EN&amp;diff=46704</id>
		<title>FAQ Custom reporting script EN</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=FAQ_Custom_reporting_script_EN&amp;diff=46704"/>
		<updated>2020-03-20T17:04:16Z</updated>

		<summary type="html">&lt;p&gt;Egils: Created page with &amp;quot;{{TemplateDocUser}} Category:FAQ EN  The standard reporting in Dolibarr did not suit my needs so I created a custom one using a bash script.  &amp;lt;code&amp;gt; #!/bin/bash...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TemplateDocUser}}&lt;br /&gt;
[[Category:FAQ EN]]&lt;br /&gt;
&lt;br /&gt;
The standard reporting in Dolibarr did not suit my needs so I created a custom one using a bash script.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
#!/bin/bash                                                                     &lt;br /&gt;
DATE=&amp;quot;2019&amp;quot;&lt;br /&gt;
DAT=&amp;quot;19&amp;quot;&lt;br /&gt;
PSQL=&amp;quot;psql -d dolibarr -U dolibarr -t -c&amp;quot;&lt;br /&gt;
c3000=&amp;quot;select sum(credit) from llx_accounting_bookkeeping where code_journal = \&lt;br /&gt;
&#039;short_code_for_sell_journal&#039; and numero_compte = &#039;3000&#039;  and doc_date &amp;lt;= &#039;12/31/$DAT&#039; and doc_date &amp;gt;= &#039;\&lt;br /&gt;
01/01/$DAT&#039;&amp;quot;&lt;br /&gt;
echo Report for year $AAR&lt;br /&gt;
echo&lt;br /&gt;
echo  -n &amp;quot;Total sales before taxes:&amp;quot;&lt;br /&gt;
$PSQL &amp;quot;$c3000&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This outputs the total sale of year 2019 before taxes. &lt;br /&gt;
&lt;br /&gt;
Adjust short_code_for_sell_journal (defaults to VT) and the DATE/DAT to the year you want.&lt;br /&gt;
&lt;br /&gt;
This can be expanded very easily to output very long and detailed reports.&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=FAQ_Facture_EN&amp;diff=46703</id>
		<title>FAQ Facture EN</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=FAQ_Facture_EN&amp;diff=46703"/>
		<updated>2020-03-20T16:55:16Z</updated>

		<summary type="html">&lt;p&gt;Egils: Egils moved page FAQ Facture EN to FAQ Delete invoice in the database EN: translated&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[FAQ Delete invoice in the database EN]]&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=FAQ_Delete_invoice_in_the_database_EN&amp;diff=46702</id>
		<title>FAQ Delete invoice in the database EN</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=FAQ_Delete_invoice_in_the_database_EN&amp;diff=46702"/>
		<updated>2020-03-20T16:55:16Z</updated>

		<summary type="html">&lt;p&gt;Egils: Egils moved page FAQ Facture EN to FAQ Delete invoice in the database EN: translated&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:FAQ_Facture]]&lt;br /&gt;
[[es:FAQ_Facture_ES]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ EN]]&lt;br /&gt;
&#039;&#039;&#039;How to remove &amp;quot;easily&amp;quot; an invoice customer &amp;quot;by hand&amp;quot; in the database ?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You must first remove all records into [[Table llx_facturedet]] (there is one record by invoice line), &lt;br /&gt;
and then you can delete invoice in [[Table llx_facture]].&lt;br /&gt;
&lt;br /&gt;
The steps for a MySQL database are:&lt;br /&gt;
&lt;br /&gt;
- get the ID of your invoice (invoice is called &amp;quot;facture&amp;quot; in French). You can get this ID by going to the Invoice&#039;s card, and check the address in your browser. For example&lt;br /&gt;
dolibarr.xxxxx.com/compta/facture.php?facid=29 the invoice ID is &amp;quot;29&amp;quot;&lt;br /&gt;
&lt;br /&gt;
- connect to your database (via phpmyadmin or command line, for example)&lt;br /&gt;
&lt;br /&gt;
- Type the following commands (&#039;&#039;&#039;replace INVOICE_ID by the ID you got earlier&#039;&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
- DELETE FROM llx_facturedet WHERE fk_facture = &#039;&#039;INVOICE_ID&#039;&#039;;&lt;br /&gt;
&lt;br /&gt;
- DELETE FROM llx_facture WHERE rowid = &#039;&#039;INVOICE_ID&#039;&#039;;&lt;br /&gt;
&lt;br /&gt;
Your invoice should be deleted successfully.&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44224</id>
		<title>Module Accounting Simplified</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44224"/>
		<updated>2019-09-07T15:47:24Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* Default accounts */ warning&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:Module_Comptabilité]]&lt;br /&gt;
[[es:Módulo_Contabilidad]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Accounting]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
{{TemplateModEN}}&lt;br /&gt;
{{BasculeDevUser|&lt;br /&gt;
nom=Accountancy| &lt;br /&gt;
num=10|&lt;br /&gt;
devdoc=[[Module Accounting (developer)]]|&lt;br /&gt;
userdoc=This page|}}&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
This module allows you to set up accounting with a suitable chart of accounts. &lt;br /&gt;
&lt;br /&gt;
==Features==&lt;br /&gt;
Its features are:&lt;br /&gt;
* support for double entry accounting&lt;br /&gt;
* grouping transactions in journals&lt;br /&gt;
* support for exports (which formats?)&lt;br /&gt;
&lt;br /&gt;
===Chart of accounts===&lt;br /&gt;
Dolibarr support multiple countries&lt;br /&gt;
* Africa (Benin, Burkina Faso, Cameroon, Central African Republic, Comoros, Congo (Brazzaville), Congo (Kinshasa), Equatorial Guinea, Ghana, Marocco, Niger, Senegal, Tunisia)&lt;br /&gt;
* Europe (Belgium, Denmark, Luxembourg, France, Germany, Great Britain, Netherlands, Romania, Switzerland, Spain, Sweden ([https://github.com/Dolibarr/dolibarr/pull/10907 pull request pending fix]))&lt;br /&gt;
* South America (Chile)&lt;br /&gt;
([https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/install/mysql/data/llx_accounting_abc.sql see full list])&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
{{NoInstallModuleEn}}&lt;br /&gt;
&lt;br /&gt;
=Setup=&lt;br /&gt;
{{ActivationModuleEn}}&lt;br /&gt;
== Default accounts ==&lt;br /&gt;
After setting up your chart of accounts you have to tell Dolibarr to use them.&lt;br /&gt;
&lt;br /&gt;
Warning: Make sure you have different accounts for the top 3 accounts from the ones at the bottom or else all the reports will be mixed/wrong.&lt;br /&gt;
&lt;br /&gt;
[[File:Accountancy-defaultaccounts.png|800px]]&lt;br /&gt;
&lt;br /&gt;
== Journals ==&lt;br /&gt;
Set up your custom journals. Here is an example including a special journal for Upwork &amp;quot;bank&amp;quot; account, taxes and an equity insert/take out.&lt;br /&gt;
&lt;br /&gt;
[[File:Accountancy-journals.png|800px]]&lt;br /&gt;
== Vat accounts ==&lt;br /&gt;
Setup the applicable vat rates and accounts for your country.&lt;br /&gt;
&lt;br /&gt;
[[File:Vat-accounts.png|800px]]&lt;br /&gt;
&lt;br /&gt;
== Tax accounts ==&lt;br /&gt;
Setup the account from which you pay your tax.&lt;br /&gt;
&lt;br /&gt;
[[File:Tax-accounts.png|800px]]&lt;br /&gt;
&lt;br /&gt;
== Export options ==&lt;br /&gt;
Change these if needed.&lt;br /&gt;
&lt;br /&gt;
[[File:Accountancy-export.png|800px]]&lt;br /&gt;
&lt;br /&gt;
=Use=&lt;br /&gt;
This module contain a ledger that enable you to manually add transactions. However this is not recommended for most transactions.&lt;br /&gt;
&lt;br /&gt;
Transactions from the standard sell and purchase journals can easily be committed to the ledger after they have been assigned valid accounts.&lt;br /&gt;
&lt;br /&gt;
The module also contains a balance sheet for you to see the total income and expense of you company.&lt;br /&gt;
&lt;br /&gt;
=Life cycle / Business rules=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
&lt;br /&gt;
=Examples of use cases=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
{{ExamplesCaseEn&lt;br /&gt;
|name=UCAC01: &lt;br /&gt;
|situation=&lt;br /&gt;
|actions=&lt;br /&gt;
}}&amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44223</id>
		<title>Module Accounting Simplified</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44223"/>
		<updated>2019-09-07T11:19:24Z</updated>

		<summary type="html">&lt;p&gt;Egils: export&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:Module_Comptabilité]]&lt;br /&gt;
[[es:Módulo_Contabilidad]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Accounting]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
{{TemplateModEN}}&lt;br /&gt;
{{BasculeDevUser|&lt;br /&gt;
nom=Accountancy| &lt;br /&gt;
num=10|&lt;br /&gt;
devdoc=[[Module Accounting (developer)]]|&lt;br /&gt;
userdoc=This page|}}&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
This module allows you to set up accounting with a suitable chart of accounts. &lt;br /&gt;
&lt;br /&gt;
==Features==&lt;br /&gt;
Its features are:&lt;br /&gt;
* support for double entry accounting&lt;br /&gt;
* grouping transactions in journals&lt;br /&gt;
* support for exports (which formats?)&lt;br /&gt;
&lt;br /&gt;
===Chart of accounts===&lt;br /&gt;
Dolibarr support multiple countries&lt;br /&gt;
* Africa (Benin, Burkina Faso, Cameroon, Central African Republic, Comoros, Congo (Brazzaville), Congo (Kinshasa), Equatorial Guinea, Ghana, Marocco, Niger, Senegal, Tunisia)&lt;br /&gt;
* Europe (Belgium, Denmark, Luxembourg, France, Germany, Great Britain, Netherlands, Romania, Switzerland, Spain, Sweden ([https://github.com/Dolibarr/dolibarr/pull/10907 pull request pending fix]))&lt;br /&gt;
* South America (Chile)&lt;br /&gt;
([https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/install/mysql/data/llx_accounting_abc.sql see full list])&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
{{NoInstallModuleEn}}&lt;br /&gt;
&lt;br /&gt;
=Setup=&lt;br /&gt;
{{ActivationModuleEn}}&lt;br /&gt;
== Default accounts ==&lt;br /&gt;
After setting up your chart of accounts you have to tell Dolibarr to use them.&lt;br /&gt;
&lt;br /&gt;
[[File:Accountancy-defaultaccounts.png|800px]]&lt;br /&gt;
== Journals ==&lt;br /&gt;
Set up your custom journals. Here is an example including a special journal for Upwork &amp;quot;bank&amp;quot; account, taxes and an equity insert/take out.&lt;br /&gt;
&lt;br /&gt;
[[File:Accountancy-journals.png|800px]]&lt;br /&gt;
== Vat accounts ==&lt;br /&gt;
Setup the applicable vat rates and accounts for your country.&lt;br /&gt;
&lt;br /&gt;
[[File:Vat-accounts.png|800px]]&lt;br /&gt;
&lt;br /&gt;
== Tax accounts ==&lt;br /&gt;
Setup the account from which you pay your tax.&lt;br /&gt;
&lt;br /&gt;
[[File:Tax-accounts.png|800px]]&lt;br /&gt;
&lt;br /&gt;
== Export options ==&lt;br /&gt;
Change these if needed.&lt;br /&gt;
&lt;br /&gt;
[[File:Accountancy-export.png|800px]]&lt;br /&gt;
&lt;br /&gt;
=Use=&lt;br /&gt;
This module contain a ledger that enable you to manually add transactions. However this is not recommended for most transactions.&lt;br /&gt;
&lt;br /&gt;
Transactions from the standard sell and purchase journals can easily be committed to the ledger after they have been assigned valid accounts.&lt;br /&gt;
&lt;br /&gt;
The module also contains a balance sheet for you to see the total income and expense of you company.&lt;br /&gt;
&lt;br /&gt;
=Life cycle / Business rules=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
&lt;br /&gt;
=Examples of use cases=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
{{ExamplesCaseEn&lt;br /&gt;
|name=UCAC01: &lt;br /&gt;
|situation=&lt;br /&gt;
|actions=&lt;br /&gt;
}}&amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:Accountancy-export.png&amp;diff=44222</id>
		<title>File:Accountancy-export.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:Accountancy-export.png&amp;diff=44222"/>
		<updated>2019-09-07T11:18:11Z</updated>

		<summary type="html">&lt;p&gt;Egils: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44221</id>
		<title>Module Accounting Simplified</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44221"/>
		<updated>2019-09-07T11:05:21Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* Tax accounts */&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:Module_Comptabilité]]&lt;br /&gt;
[[es:Módulo_Contabilidad]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Accounting]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
{{TemplateModEN}}&lt;br /&gt;
{{BasculeDevUser|&lt;br /&gt;
nom=Accountancy| &lt;br /&gt;
num=10|&lt;br /&gt;
devdoc=[[Module Accounting (developer)]]|&lt;br /&gt;
userdoc=This page|}}&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
This module allows you to set up accounting with a suitable chart of accounts. &lt;br /&gt;
&lt;br /&gt;
==Features==&lt;br /&gt;
Its features are:&lt;br /&gt;
* support for double entry accounting&lt;br /&gt;
* grouping transactions in journals&lt;br /&gt;
* support for exports (which formats?)&lt;br /&gt;
&lt;br /&gt;
===Chart of accounts===&lt;br /&gt;
Dolibarr support multiple countries&lt;br /&gt;
* Africa (Benin, Burkina Faso, Cameroon, Central African Republic, Comoros, Congo (Brazzaville), Congo (Kinshasa), Equatorial Guinea, Ghana, Marocco, Niger, Senegal, Tunisia)&lt;br /&gt;
* Europe (Belgium, Denmark, Luxembourg, France, Germany, Great Britain, Netherlands, Romania, Switzerland, Spain, Sweden ([https://github.com/Dolibarr/dolibarr/pull/10907 pull request pending fix]))&lt;br /&gt;
* South America (Chile)&lt;br /&gt;
([https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/install/mysql/data/llx_accounting_abc.sql see full list])&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
{{NoInstallModuleEn}}&lt;br /&gt;
&lt;br /&gt;
=Setup=&lt;br /&gt;
{{ActivationModuleEn}}&lt;br /&gt;
== Default accounts ==&lt;br /&gt;
After setting up your chart of accounts you have to tell Dolibarr to use them.&lt;br /&gt;
&lt;br /&gt;
[[File:Accountancy-defaultaccounts.png|800px]]&lt;br /&gt;
== Journals ==&lt;br /&gt;
Set up your custom journals. Here is an example including a special journal for Upwork &amp;quot;bank&amp;quot; account, taxes and an equity insert/take out.&lt;br /&gt;
&lt;br /&gt;
[[File:Accountancy-journals.png|800px]]&lt;br /&gt;
== Vat accounts ==&lt;br /&gt;
Setup the applicable vat rates and accounts for your country.&lt;br /&gt;
&lt;br /&gt;
[[File:Vat-accounts.png|800px]]&lt;br /&gt;
&lt;br /&gt;
== Tax accounts ==&lt;br /&gt;
Setup the account from which you pay your tax.&lt;br /&gt;
&lt;br /&gt;
[[File:Tax-accounts.png|800px]]&lt;br /&gt;
&lt;br /&gt;
=Use=&lt;br /&gt;
This module contain a ledger that enable you to manually add transactions. However this is not recommended for most transactions.&lt;br /&gt;
&lt;br /&gt;
Transactions from the standard sell and purchase journals can easily be committed to the ledger after they have been assigned valid accounts.&lt;br /&gt;
&lt;br /&gt;
The module also contains a balance sheet for you to see the total income and expense of you company.&lt;br /&gt;
&lt;br /&gt;
=Life cycle / Business rules=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
&lt;br /&gt;
=Examples of use cases=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
{{ExamplesCaseEn&lt;br /&gt;
|name=UCAC01: &lt;br /&gt;
|situation=&lt;br /&gt;
|actions=&lt;br /&gt;
}}&amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:Tax-accounts.png&amp;diff=44220</id>
		<title>File:Tax-accounts.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:Tax-accounts.png&amp;diff=44220"/>
		<updated>2019-09-07T11:03:55Z</updated>

		<summary type="html">&lt;p&gt;Egils: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44219</id>
		<title>Module Accounting Simplified</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44219"/>
		<updated>2019-09-07T11:01:32Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* Setup */ vat + size increase&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:Module_Comptabilité]]&lt;br /&gt;
[[es:Módulo_Contabilidad]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Accounting]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
{{TemplateModEN}}&lt;br /&gt;
{{BasculeDevUser|&lt;br /&gt;
nom=Accountancy| &lt;br /&gt;
num=10|&lt;br /&gt;
devdoc=[[Module Accounting (developer)]]|&lt;br /&gt;
userdoc=This page|}}&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
This module allows you to set up accounting with a suitable chart of accounts. &lt;br /&gt;
&lt;br /&gt;
==Features==&lt;br /&gt;
Its features are:&lt;br /&gt;
* support for double entry accounting&lt;br /&gt;
* grouping transactions in journals&lt;br /&gt;
* support for exports (which formats?)&lt;br /&gt;
&lt;br /&gt;
===Chart of accounts===&lt;br /&gt;
Dolibarr support multiple countries&lt;br /&gt;
* Africa (Benin, Burkina Faso, Cameroon, Central African Republic, Comoros, Congo (Brazzaville), Congo (Kinshasa), Equatorial Guinea, Ghana, Marocco, Niger, Senegal, Tunisia)&lt;br /&gt;
* Europe (Belgium, Denmark, Luxembourg, France, Germany, Great Britain, Netherlands, Romania, Switzerland, Spain, Sweden ([https://github.com/Dolibarr/dolibarr/pull/10907 pull request pending fix]))&lt;br /&gt;
* South America (Chile)&lt;br /&gt;
([https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/install/mysql/data/llx_accounting_abc.sql see full list])&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
{{NoInstallModuleEn}}&lt;br /&gt;
&lt;br /&gt;
=Setup=&lt;br /&gt;
{{ActivationModuleEn}}&lt;br /&gt;
== Default accounts ==&lt;br /&gt;
After setting up your chart of accounts you have to tell Dolibarr to use them.&lt;br /&gt;
&lt;br /&gt;
[[File:Accountancy-defaultaccounts.png|800px]]&lt;br /&gt;
== Journals ==&lt;br /&gt;
Set up your custom journals. Here is an example including a special journal for Upwork &amp;quot;bank&amp;quot; account, taxes and an equity insert/take out.&lt;br /&gt;
&lt;br /&gt;
[[File:Accountancy-journals.png|800px]]&lt;br /&gt;
== Vat accounts ==&lt;br /&gt;
Setup the applicable vat rates and accounts for your country.&lt;br /&gt;
&lt;br /&gt;
[[File:Vat-accounts.png|800px]]&lt;br /&gt;
&lt;br /&gt;
=Use=&lt;br /&gt;
This module contain a ledger that enable you to manually add transactions. However this is not recommended for most transactions.&lt;br /&gt;
&lt;br /&gt;
Transactions from the standard sell and purchase journals can easily be committed to the ledger after they have been assigned valid accounts.&lt;br /&gt;
&lt;br /&gt;
The module also contains a balance sheet for you to see the total income and expense of you company.&lt;br /&gt;
&lt;br /&gt;
=Life cycle / Business rules=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
&lt;br /&gt;
=Examples of use cases=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
{{ExamplesCaseEn&lt;br /&gt;
|name=UCAC01: &lt;br /&gt;
|situation=&lt;br /&gt;
|actions=&lt;br /&gt;
}}&amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:Vat-accounts.png&amp;diff=44218</id>
		<title>File:Vat-accounts.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:Vat-accounts.png&amp;diff=44218"/>
		<updated>2019-09-07T10:59:14Z</updated>

		<summary type="html">&lt;p&gt;Egils: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44217</id>
		<title>Module Accounting Simplified</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44217"/>
		<updated>2019-09-07T09:17:42Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* Journals */ format&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:Module_Comptabilité]]&lt;br /&gt;
[[es:Módulo_Contabilidad]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Accounting]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
{{TemplateModEN}}&lt;br /&gt;
{{BasculeDevUser|&lt;br /&gt;
nom=Accountancy| &lt;br /&gt;
num=10|&lt;br /&gt;
devdoc=[[Module Accounting (developer)]]|&lt;br /&gt;
userdoc=This page|}}&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
This module allows you to set up accounting with a suitable chart of accounts. &lt;br /&gt;
&lt;br /&gt;
==Features==&lt;br /&gt;
Its features are:&lt;br /&gt;
* support for double entry accounting&lt;br /&gt;
* grouping transactions in journals&lt;br /&gt;
* support for exports (which formats?)&lt;br /&gt;
&lt;br /&gt;
===Chart of accounts===&lt;br /&gt;
Dolibarr support multiple countries&lt;br /&gt;
* Africa (Benin, Burkina Faso, Cameroon, Central African Republic, Comoros, Congo (Brazzaville), Congo (Kinshasa), Equatorial Guinea, Ghana, Marocco, Niger, Senegal, Tunisia)&lt;br /&gt;
* Europe (Belgium, Denmark, Luxembourg, France, Germany, Great Britain, Netherlands, Romania, Switzerland, Spain, Sweden ([https://github.com/Dolibarr/dolibarr/pull/10907 pull request pending fix]))&lt;br /&gt;
* South America (Chile)&lt;br /&gt;
([https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/install/mysql/data/llx_accounting_abc.sql see full list])&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
{{NoInstallModuleEn}}&lt;br /&gt;
&lt;br /&gt;
=Setup=&lt;br /&gt;
{{ActivationModuleEn}}&lt;br /&gt;
== Default accounts ==&lt;br /&gt;
After setting up your chart of accounts you have to tell Dolibarr to use them.&lt;br /&gt;
&lt;br /&gt;
[[File:Accountancy-defaultaccounts.png|600px]]&lt;br /&gt;
== Journals ==&lt;br /&gt;
Set up your custom journals. Here is an example including a special journal for Upwork &amp;quot;bank&amp;quot; account, taxes and an equity insert/take out.&lt;br /&gt;
&lt;br /&gt;
[[File:Accountancy-journals.png|600px]]&lt;br /&gt;
&lt;br /&gt;
=Use=&lt;br /&gt;
This module contain a ledger that enable you to manually add transactions. However this is not recommended for most transactions.&lt;br /&gt;
&lt;br /&gt;
Transactions from the standard sell and purchase journals can easily be committed to the ledger after they have been assigned valid accounts.&lt;br /&gt;
&lt;br /&gt;
The module also contains a balance sheet for you to see the total income and expense of you company.&lt;br /&gt;
&lt;br /&gt;
=Life cycle / Business rules=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
&lt;br /&gt;
=Examples of use cases=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
{{ExamplesCaseEn&lt;br /&gt;
|name=UCAC01: &lt;br /&gt;
|situation=&lt;br /&gt;
|actions=&lt;br /&gt;
}}&amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44216</id>
		<title>Module Accounting Simplified</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44216"/>
		<updated>2019-09-07T09:16:02Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* Journals */ clarify&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:Module_Comptabilité]]&lt;br /&gt;
[[es:Módulo_Contabilidad]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Accounting]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
{{TemplateModEN}}&lt;br /&gt;
{{BasculeDevUser|&lt;br /&gt;
nom=Accountancy| &lt;br /&gt;
num=10|&lt;br /&gt;
devdoc=[[Module Accounting (developer)]]|&lt;br /&gt;
userdoc=This page|}}&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
This module allows you to set up accounting with a suitable chart of accounts. &lt;br /&gt;
&lt;br /&gt;
==Features==&lt;br /&gt;
Its features are:&lt;br /&gt;
* support for double entry accounting&lt;br /&gt;
* grouping transactions in journals&lt;br /&gt;
* support for exports (which formats?)&lt;br /&gt;
&lt;br /&gt;
===Chart of accounts===&lt;br /&gt;
Dolibarr support multiple countries&lt;br /&gt;
* Africa (Benin, Burkina Faso, Cameroon, Central African Republic, Comoros, Congo (Brazzaville), Congo (Kinshasa), Equatorial Guinea, Ghana, Marocco, Niger, Senegal, Tunisia)&lt;br /&gt;
* Europe (Belgium, Denmark, Luxembourg, France, Germany, Great Britain, Netherlands, Romania, Switzerland, Spain, Sweden ([https://github.com/Dolibarr/dolibarr/pull/10907 pull request pending fix]))&lt;br /&gt;
* South America (Chile)&lt;br /&gt;
([https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/install/mysql/data/llx_accounting_abc.sql see full list])&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
{{NoInstallModuleEn}}&lt;br /&gt;
&lt;br /&gt;
=Setup=&lt;br /&gt;
{{ActivationModuleEn}}&lt;br /&gt;
== Default accounts ==&lt;br /&gt;
After setting up your chart of accounts you have to tell Dolibarr to use them.&lt;br /&gt;
&lt;br /&gt;
[[File:Accountancy-defaultaccounts.png|600px]]&lt;br /&gt;
== Journals ==&lt;br /&gt;
Set up your custom journals. Here is an example including a special journal for Upwork &amp;quot;bank&amp;quot; account, taxes and an equity insert/take out.&lt;br /&gt;
[[File:Accountancy-journals.png|600px]]&lt;br /&gt;
&lt;br /&gt;
=Use=&lt;br /&gt;
This module contain a ledger that enable you to manually add transactions. However this is not recommended for most transactions.&lt;br /&gt;
&lt;br /&gt;
Transactions from the standard sell and purchase journals can easily be committed to the ledger after they have been assigned valid accounts.&lt;br /&gt;
&lt;br /&gt;
The module also contains a balance sheet for you to see the total income and expense of you company.&lt;br /&gt;
&lt;br /&gt;
=Life cycle / Business rules=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
&lt;br /&gt;
=Examples of use cases=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
{{ExamplesCaseEn&lt;br /&gt;
|name=UCAC01: &lt;br /&gt;
|situation=&lt;br /&gt;
|actions=&lt;br /&gt;
}}&amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44215</id>
		<title>Module Accounting Simplified</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44215"/>
		<updated>2019-09-07T09:15:38Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* Journals */ limit size&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:Module_Comptabilité]]&lt;br /&gt;
[[es:Módulo_Contabilidad]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Accounting]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
{{TemplateModEN}}&lt;br /&gt;
{{BasculeDevUser|&lt;br /&gt;
nom=Accountancy| &lt;br /&gt;
num=10|&lt;br /&gt;
devdoc=[[Module Accounting (developer)]]|&lt;br /&gt;
userdoc=This page|}}&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
This module allows you to set up accounting with a suitable chart of accounts. &lt;br /&gt;
&lt;br /&gt;
==Features==&lt;br /&gt;
Its features are:&lt;br /&gt;
* support for double entry accounting&lt;br /&gt;
* grouping transactions in journals&lt;br /&gt;
* support for exports (which formats?)&lt;br /&gt;
&lt;br /&gt;
===Chart of accounts===&lt;br /&gt;
Dolibarr support multiple countries&lt;br /&gt;
* Africa (Benin, Burkina Faso, Cameroon, Central African Republic, Comoros, Congo (Brazzaville), Congo (Kinshasa), Equatorial Guinea, Ghana, Marocco, Niger, Senegal, Tunisia)&lt;br /&gt;
* Europe (Belgium, Denmark, Luxembourg, France, Germany, Great Britain, Netherlands, Romania, Switzerland, Spain, Sweden ([https://github.com/Dolibarr/dolibarr/pull/10907 pull request pending fix]))&lt;br /&gt;
* South America (Chile)&lt;br /&gt;
([https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/install/mysql/data/llx_accounting_abc.sql see full list])&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
{{NoInstallModuleEn}}&lt;br /&gt;
&lt;br /&gt;
=Setup=&lt;br /&gt;
{{ActivationModuleEn}}&lt;br /&gt;
== Default accounts ==&lt;br /&gt;
After setting up your chart of accounts you have to tell Dolibarr to use them.&lt;br /&gt;
&lt;br /&gt;
[[File:Accountancy-defaultaccounts.png|600px]]&lt;br /&gt;
== Journals ==&lt;br /&gt;
Set up your custom journals. Here is an example including a special journal for Upwork &amp;quot;bank&amp;quot; account and an equity insert/take out.&lt;br /&gt;
[[File:Accountancy-journals.png|600px]]&lt;br /&gt;
&lt;br /&gt;
=Use=&lt;br /&gt;
This module contain a ledger that enable you to manually add transactions. However this is not recommended for most transactions.&lt;br /&gt;
&lt;br /&gt;
Transactions from the standard sell and purchase journals can easily be committed to the ledger after they have been assigned valid accounts.&lt;br /&gt;
&lt;br /&gt;
The module also contains a balance sheet for you to see the total income and expense of you company.&lt;br /&gt;
&lt;br /&gt;
=Life cycle / Business rules=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
&lt;br /&gt;
=Examples of use cases=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
{{ExamplesCaseEn&lt;br /&gt;
|name=UCAC01: &lt;br /&gt;
|situation=&lt;br /&gt;
|actions=&lt;br /&gt;
}}&amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44214</id>
		<title>Module Accounting Simplified</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44214"/>
		<updated>2019-09-07T09:14:54Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* Setup */&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:Module_Comptabilité]]&lt;br /&gt;
[[es:Módulo_Contabilidad]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Accounting]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
{{TemplateModEN}}&lt;br /&gt;
{{BasculeDevUser|&lt;br /&gt;
nom=Accountancy| &lt;br /&gt;
num=10|&lt;br /&gt;
devdoc=[[Module Accounting (developer)]]|&lt;br /&gt;
userdoc=This page|}}&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
This module allows you to set up accounting with a suitable chart of accounts. &lt;br /&gt;
&lt;br /&gt;
==Features==&lt;br /&gt;
Its features are:&lt;br /&gt;
* support for double entry accounting&lt;br /&gt;
* grouping transactions in journals&lt;br /&gt;
* support for exports (which formats?)&lt;br /&gt;
&lt;br /&gt;
===Chart of accounts===&lt;br /&gt;
Dolibarr support multiple countries&lt;br /&gt;
* Africa (Benin, Burkina Faso, Cameroon, Central African Republic, Comoros, Congo (Brazzaville), Congo (Kinshasa), Equatorial Guinea, Ghana, Marocco, Niger, Senegal, Tunisia)&lt;br /&gt;
* Europe (Belgium, Denmark, Luxembourg, France, Germany, Great Britain, Netherlands, Romania, Switzerland, Spain, Sweden ([https://github.com/Dolibarr/dolibarr/pull/10907 pull request pending fix]))&lt;br /&gt;
* South America (Chile)&lt;br /&gt;
([https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/install/mysql/data/llx_accounting_abc.sql see full list])&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
{{NoInstallModuleEn}}&lt;br /&gt;
&lt;br /&gt;
=Setup=&lt;br /&gt;
{{ActivationModuleEn}}&lt;br /&gt;
== Default accounts ==&lt;br /&gt;
After setting up your chart of accounts you have to tell Dolibarr to use them.&lt;br /&gt;
&lt;br /&gt;
[[File:Accountancy-defaultaccounts.png|600px]]&lt;br /&gt;
== Journals ==&lt;br /&gt;
Set up your custom journals. Here is an example including a special journal for Upwork &amp;quot;bank&amp;quot; account and an equity insert/take out.&lt;br /&gt;
[[File:Accountancy-journals.png]]&lt;br /&gt;
&lt;br /&gt;
=Use=&lt;br /&gt;
This module contain a ledger that enable you to manually add transactions. However this is not recommended for most transactions.&lt;br /&gt;
&lt;br /&gt;
Transactions from the standard sell and purchase journals can easily be committed to the ledger after they have been assigned valid accounts.&lt;br /&gt;
&lt;br /&gt;
The module also contains a balance sheet for you to see the total income and expense of you company.&lt;br /&gt;
&lt;br /&gt;
=Life cycle / Business rules=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
&lt;br /&gt;
=Examples of use cases=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
{{ExamplesCaseEn&lt;br /&gt;
|name=UCAC01: &lt;br /&gt;
|situation=&lt;br /&gt;
|actions=&lt;br /&gt;
}}&amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:Accountancy-journals.png&amp;diff=44213</id>
		<title>File:Accountancy-journals.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:Accountancy-journals.png&amp;diff=44213"/>
		<updated>2019-09-07T09:12:29Z</updated>

		<summary type="html">&lt;p&gt;Egils: Example with a few extra swedish journals for putting in and taking out equity.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Example with a few extra swedish journals for putting in and taking out equity.&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44212</id>
		<title>Module Accounting Simplified</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44212"/>
		<updated>2019-09-07T08:51:54Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* Default accounts */&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:Module_Comptabilité]]&lt;br /&gt;
[[es:Módulo_Contabilidad]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Accounting]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
{{TemplateModEN}}&lt;br /&gt;
{{BasculeDevUser|&lt;br /&gt;
nom=Accountancy| &lt;br /&gt;
num=10|&lt;br /&gt;
devdoc=[[Module Accounting (developer)]]|&lt;br /&gt;
userdoc=This page|}}&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
This module allows you to set up accounting with a suitable chart of accounts. &lt;br /&gt;
&lt;br /&gt;
==Features==&lt;br /&gt;
Its features are:&lt;br /&gt;
* support for double entry accounting&lt;br /&gt;
* grouping transactions in journals&lt;br /&gt;
* support for exports (which formats?)&lt;br /&gt;
&lt;br /&gt;
===Chart of accounts===&lt;br /&gt;
Dolibarr support multiple countries&lt;br /&gt;
* Africa (Benin, Burkina Faso, Cameroon, Central African Republic, Comoros, Congo (Brazzaville), Congo (Kinshasa), Equatorial Guinea, Ghana, Marocco, Niger, Senegal, Tunisia)&lt;br /&gt;
* Europe (Belgium, Denmark, Luxembourg, France, Germany, Great Britain, Netherlands, Romania, Switzerland, Spain, Sweden ([https://github.com/Dolibarr/dolibarr/pull/10907 pull request pending fix]))&lt;br /&gt;
* South America (Chile)&lt;br /&gt;
([https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/install/mysql/data/llx_accounting_abc.sql see full list])&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
{{NoInstallModuleEn}}&lt;br /&gt;
&lt;br /&gt;
=Setup=&lt;br /&gt;
{{ActivationModuleEn}}&lt;br /&gt;
== Default accounts ==&lt;br /&gt;
After setting up your chart of accounts you have to tell Dolibarr to use them.&lt;br /&gt;
&lt;br /&gt;
[[File:Accountancy-defaultaccounts.png|600px]]&lt;br /&gt;
&lt;br /&gt;
=Use=&lt;br /&gt;
This module contain a ledger that enable you to manually add transactions. However this is not recommended for most transactions.&lt;br /&gt;
&lt;br /&gt;
Transactions from the standard sell and purchase journals can easily be committed to the ledger after they have been assigned valid accounts.&lt;br /&gt;
&lt;br /&gt;
The module also contains a balance sheet for you to see the total income and expense of you company.&lt;br /&gt;
&lt;br /&gt;
=Life cycle / Business rules=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
&lt;br /&gt;
=Examples of use cases=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
{{ExamplesCaseEn&lt;br /&gt;
|name=UCAC01: &lt;br /&gt;
|situation=&lt;br /&gt;
|actions=&lt;br /&gt;
}}&amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44211</id>
		<title>Module Accounting Simplified</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44211"/>
		<updated>2019-09-07T08:50:23Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* Default accounts */&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:Module_Comptabilité]]&lt;br /&gt;
[[es:Módulo_Contabilidad]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Accounting]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
{{TemplateModEN}}&lt;br /&gt;
{{BasculeDevUser|&lt;br /&gt;
nom=Accountancy| &lt;br /&gt;
num=10|&lt;br /&gt;
devdoc=[[Module Accounting (developer)]]|&lt;br /&gt;
userdoc=This page|}}&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
This module allows you to set up accounting with a suitable chart of accounts. &lt;br /&gt;
&lt;br /&gt;
==Features==&lt;br /&gt;
Its features are:&lt;br /&gt;
* support for double entry accounting&lt;br /&gt;
* grouping transactions in journals&lt;br /&gt;
* support for exports (which formats?)&lt;br /&gt;
&lt;br /&gt;
===Chart of accounts===&lt;br /&gt;
Dolibarr support multiple countries&lt;br /&gt;
* Africa (Benin, Burkina Faso, Cameroon, Central African Republic, Comoros, Congo (Brazzaville), Congo (Kinshasa), Equatorial Guinea, Ghana, Marocco, Niger, Senegal, Tunisia)&lt;br /&gt;
* Europe (Belgium, Denmark, Luxembourg, France, Germany, Great Britain, Netherlands, Romania, Switzerland, Spain, Sweden ([https://github.com/Dolibarr/dolibarr/pull/10907 pull request pending fix]))&lt;br /&gt;
* South America (Chile)&lt;br /&gt;
([https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/install/mysql/data/llx_accounting_abc.sql see full list])&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
{{NoInstallModuleEn}}&lt;br /&gt;
&lt;br /&gt;
=Setup=&lt;br /&gt;
{{ActivationModuleEn}}&lt;br /&gt;
== Default accounts ==&lt;br /&gt;
After setting up your chart of accounts you have to tell Dolibarr to use them.&lt;br /&gt;
[[File:Accountancy-defaultaccounts.png|400px]]&lt;br /&gt;
&lt;br /&gt;
=Use=&lt;br /&gt;
This module contain a ledger that enable you to manually add transactions. However this is not recommended for most transactions.&lt;br /&gt;
&lt;br /&gt;
Transactions from the standard sell and purchase journals can easily be committed to the ledger after they have been assigned valid accounts.&lt;br /&gt;
&lt;br /&gt;
The module also contains a balance sheet for you to see the total income and expense of you company.&lt;br /&gt;
&lt;br /&gt;
=Life cycle / Business rules=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
&lt;br /&gt;
=Examples of use cases=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
{{ExamplesCaseEn&lt;br /&gt;
|name=UCAC01: &lt;br /&gt;
|situation=&lt;br /&gt;
|actions=&lt;br /&gt;
}}&amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44210</id>
		<title>Module Accounting Simplified</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44210"/>
		<updated>2019-09-07T08:47:56Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* Setup */&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:Module_Comptabilité]]&lt;br /&gt;
[[es:Módulo_Contabilidad]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Accounting]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
{{TemplateModEN}}&lt;br /&gt;
{{BasculeDevUser|&lt;br /&gt;
nom=Accountancy| &lt;br /&gt;
num=10|&lt;br /&gt;
devdoc=[[Module Accounting (developer)]]|&lt;br /&gt;
userdoc=This page|}}&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
This module allows you to set up accounting with a suitable chart of accounts. &lt;br /&gt;
&lt;br /&gt;
==Features==&lt;br /&gt;
Its features are:&lt;br /&gt;
* support for double entry accounting&lt;br /&gt;
* grouping transactions in journals&lt;br /&gt;
* support for exports (which formats?)&lt;br /&gt;
&lt;br /&gt;
===Chart of accounts===&lt;br /&gt;
Dolibarr support multiple countries&lt;br /&gt;
* Africa (Benin, Burkina Faso, Cameroon, Central African Republic, Comoros, Congo (Brazzaville), Congo (Kinshasa), Equatorial Guinea, Ghana, Marocco, Niger, Senegal, Tunisia)&lt;br /&gt;
* Europe (Belgium, Denmark, Luxembourg, France, Germany, Great Britain, Netherlands, Romania, Switzerland, Spain, Sweden ([https://github.com/Dolibarr/dolibarr/pull/10907 pull request pending fix]))&lt;br /&gt;
* South America (Chile)&lt;br /&gt;
([https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/install/mysql/data/llx_accounting_abc.sql see full list])&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
{{NoInstallModuleEn}}&lt;br /&gt;
&lt;br /&gt;
=Setup=&lt;br /&gt;
{{ActivationModuleEn}}&lt;br /&gt;
== Default accounts ==&lt;br /&gt;
[[:File:Accountancy-defaultaccounts.png|File:Accountancy-defaultaccounts.png]]&lt;br /&gt;
&lt;br /&gt;
=Use=&lt;br /&gt;
This module contain a ledger that enable you to manually add transactions. However this is not recommended for most transactions.&lt;br /&gt;
&lt;br /&gt;
Transactions from the standard sell and purchase journals can easily be committed to the ledger after they have been assigned valid accounts.&lt;br /&gt;
&lt;br /&gt;
The module also contains a balance sheet for you to see the total income and expense of you company.&lt;br /&gt;
&lt;br /&gt;
=Life cycle / Business rules=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
&lt;br /&gt;
=Examples of use cases=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
{{ExamplesCaseEn&lt;br /&gt;
|name=UCAC01: &lt;br /&gt;
|situation=&lt;br /&gt;
|actions=&lt;br /&gt;
}}&amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:Accountancy-defaultaccounts.png&amp;diff=44209</id>
		<title>File:Accountancy-defaultaccounts.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:Accountancy-defaultaccounts.png&amp;diff=44209"/>
		<updated>2019-09-07T08:31:51Z</updated>

		<summary type="html">&lt;p&gt;Egils: Example with swedish account numbers.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Example with swedish account numbers.&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44072</id>
		<title>Module Accounting Simplified</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44072"/>
		<updated>2019-08-23T21:04:45Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* Chart of accounts */&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:Module_Comptabilité]]&lt;br /&gt;
[[es:Módulo_Contabilidad]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Accounting]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
{{TemplateModEN}}&lt;br /&gt;
{{BasculeDevUser|&lt;br /&gt;
nom=Accountancy| &lt;br /&gt;
num=10|&lt;br /&gt;
devdoc=[[Module Accounting (developer)]]|&lt;br /&gt;
userdoc=This page|}}&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
This module allows you to set up accounting with a suitable chart of accounts. &lt;br /&gt;
&lt;br /&gt;
==Features==&lt;br /&gt;
Its features are:&lt;br /&gt;
* support for double entry accounting&lt;br /&gt;
* grouping transactions in journals&lt;br /&gt;
* support for exports (which formats?)&lt;br /&gt;
&lt;br /&gt;
===Chart of accounts===&lt;br /&gt;
Dolibarr support multiple countries&lt;br /&gt;
* Africa (Benin, Burkina Faso, Cameroon, Central African Republic, Comoros, Congo (Brazzaville), Congo (Kinshasa), Equatorial Guinea, Ghana, Marocco, Niger, Senegal, Tunisia)&lt;br /&gt;
* Europe (Belgium, Denmark, Luxembourg, France, Germany, Great Britain, Netherlands, Romania, Switzerland, Spain, Sweden ([https://github.com/Dolibarr/dolibarr/pull/10907 pull request pending fix]))&lt;br /&gt;
* South America (Chile)&lt;br /&gt;
([https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/install/mysql/data/llx_accounting_abc.sql see full list])&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
{{NoInstallModuleEn}}&lt;br /&gt;
&lt;br /&gt;
=Setup=&lt;br /&gt;
{{ActivationModuleEn}}&lt;br /&gt;
&lt;br /&gt;
=Use=&lt;br /&gt;
This module contain a ledger that enable you to manually add transactions. However this is not recommended for most transactions.&lt;br /&gt;
&lt;br /&gt;
Transactions from the standard sell and purchase journals can easily be committed to the ledger after they have been assigned valid accounts.&lt;br /&gt;
&lt;br /&gt;
The module also contains a balance sheet for you to see the total income and expense of you company.&lt;br /&gt;
&lt;br /&gt;
=Life cycle / Business rules=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
&lt;br /&gt;
=Examples of use cases=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
{{ExamplesCaseEn&lt;br /&gt;
|name=UCAC01: &lt;br /&gt;
|situation=&lt;br /&gt;
|actions=&lt;br /&gt;
}}&amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44071</id>
		<title>Module Accounting Simplified</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44071"/>
		<updated>2019-08-23T21:01:33Z</updated>

		<summary type="html">&lt;p&gt;Egils: &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:Module_Comptabilité]]&lt;br /&gt;
[[es:Módulo_Contabilidad]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Accounting]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
{{TemplateModEN}}&lt;br /&gt;
{{BasculeDevUser|&lt;br /&gt;
nom=Accountancy| &lt;br /&gt;
num=10|&lt;br /&gt;
devdoc=[[Module Accounting (developer)]]|&lt;br /&gt;
userdoc=This page|}}&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
This module allows you to set up accounting with a suitable chart of accounts. &lt;br /&gt;
&lt;br /&gt;
==Features==&lt;br /&gt;
Its features are:&lt;br /&gt;
* support for double entry accounting&lt;br /&gt;
* grouping transactions in journals&lt;br /&gt;
* support for exports (which formats?)&lt;br /&gt;
&lt;br /&gt;
===Chart of accounts===&lt;br /&gt;
Dolibarr support multiple countries&lt;br /&gt;
* Africa&lt;br /&gt;
** Benin&lt;br /&gt;
** Burkina Faso&lt;br /&gt;
** Cameroon&lt;br /&gt;
** Central African Republic&lt;br /&gt;
** Comoros&lt;br /&gt;
** Congo (Brazzaville)&lt;br /&gt;
** Congo (Kinshasa)&lt;br /&gt;
** Equatorial Guinea&lt;br /&gt;
** Ghana&lt;br /&gt;
** Marocco&lt;br /&gt;
** Niger&lt;br /&gt;
** Senegal&lt;br /&gt;
** Tunisia&lt;br /&gt;
* EU&lt;br /&gt;
** Belgium&lt;br /&gt;
** Denmark&lt;br /&gt;
** Luxembourg&lt;br /&gt;
** France&lt;br /&gt;
** Germany&lt;br /&gt;
** Great Britain&lt;br /&gt;
** Netherlands&lt;br /&gt;
** Romania&lt;br /&gt;
** Switzerland&lt;br /&gt;
** Spain&lt;br /&gt;
** Sweden ([https://github.com/Dolibarr/dolibarr/pull/10907 pull request pending fix])&lt;br /&gt;
* South America&lt;br /&gt;
** Chile&lt;br /&gt;
([https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/install/mysql/data/llx_accounting_abc.sql see full list])&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
{{NoInstallModuleEn}}&lt;br /&gt;
&lt;br /&gt;
=Setup=&lt;br /&gt;
{{ActivationModuleEn}}&lt;br /&gt;
&lt;br /&gt;
=Use=&lt;br /&gt;
This module contain a ledger that enable you to manually add transactions. However this is not recommended for most transactions.&lt;br /&gt;
&lt;br /&gt;
Transactions from the standard sell and purchase journals can easily be committed to the ledger after they have been assigned valid accounts.&lt;br /&gt;
&lt;br /&gt;
The module also contains a balance sheet for you to see the total income and expense of you company.&lt;br /&gt;
&lt;br /&gt;
=Life cycle / Business rules=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
&lt;br /&gt;
=Examples of use cases=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
{{ExamplesCaseEn&lt;br /&gt;
|name=UCAC01: &lt;br /&gt;
|situation=&lt;br /&gt;
|actions=&lt;br /&gt;
}}&amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44070</id>
		<title>Module Accounting Simplified</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Accounting_Simplified&amp;diff=44070"/>
		<updated>2019-08-23T20:56:31Z</updated>

		<summary type="html">&lt;p&gt;Egils: /* Chart of accounts */&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:Module_Comptabilité]]&lt;br /&gt;
[[es:Módulo_Contabilidad]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Accounting]]&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
{{TemplateModEN}}&lt;br /&gt;
{{BasculeDevUser|&lt;br /&gt;
nom=Accountancy| &lt;br /&gt;
num=10|&lt;br /&gt;
devdoc=[[Module Accounting (developer)]]|&lt;br /&gt;
userdoc=This page|}}&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
This module allows you to set up accounting with a suitable chart of accounts. &lt;br /&gt;
&lt;br /&gt;
==Features==&lt;br /&gt;
Its features are:&lt;br /&gt;
* support for double entry accounting&lt;br /&gt;
* grouping transactions in journals&lt;br /&gt;
* support for exports (which formats?)&lt;br /&gt;
&lt;br /&gt;
===Chart of accounts===&lt;br /&gt;
Dolibarr support multiple countries&lt;br /&gt;
* Africa&lt;br /&gt;
** Benin&lt;br /&gt;
** Burkina Faso&lt;br /&gt;
** Cameroon&lt;br /&gt;
** Central African Republic&lt;br /&gt;
** Comoros&lt;br /&gt;
** Congo (Brazzaville)&lt;br /&gt;
** Congo (Kinshasa)&lt;br /&gt;
** Equatorial Guinea&lt;br /&gt;
** Ghana&lt;br /&gt;
** Marocco&lt;br /&gt;
** Niger&lt;br /&gt;
** Senegal&lt;br /&gt;
** Tunisia&lt;br /&gt;
* EU&lt;br /&gt;
** Belgium&lt;br /&gt;
** Denmark&lt;br /&gt;
** Luxembourg&lt;br /&gt;
** France&lt;br /&gt;
** Germany&lt;br /&gt;
** Great Britain&lt;br /&gt;
** Netherlands&lt;br /&gt;
** Romania&lt;br /&gt;
** Switzerland&lt;br /&gt;
** Spain&lt;br /&gt;
** Sweden ([https://github.com/Dolibarr/dolibarr/pull/10907 pull request pending fix])&lt;br /&gt;
* South America&lt;br /&gt;
** Chile&lt;br /&gt;
([https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/install/mysql/data/llx_accounting_abc.sql see full list])&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
{{NoInstallModuleEn}}&lt;br /&gt;
&lt;br /&gt;
=Setup=&lt;br /&gt;
{{ActivationModuleEn}}&lt;br /&gt;
&lt;br /&gt;
=Life cycle / Business rules=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
&lt;br /&gt;
=Examples of use cases=&lt;br /&gt;
{{ToComplete}}&lt;br /&gt;
{{ExamplesCaseEn&lt;br /&gt;
|name=UCAC01: &lt;br /&gt;
|situation=&lt;br /&gt;
|actions=&lt;br /&gt;
}}&amp;amp;nbsp;&lt;/div&gt;</summary>
		<author><name>Egils</name></author>
	</entry>
</feed>