<?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=Imasdeweb</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=Imasdeweb"/>
	<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php/Special:Contributions/Imasdeweb"/>
	<updated>2026-10-27T17:11:36Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Modulo_NotePlus&amp;diff=65111</id>
		<title>Modulo NotePlus</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Modulo_NotePlus&amp;diff=65111"/>
		<updated>2025-12-28T02:36:14Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: Fixed translation links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Do NOT edit this section&lt;br /&gt;
     Links below are automatically managed by PolyglotBot&lt;br /&gt;
     You can edit links on the English source page : Modulo_NotePlus --&amp;gt;&lt;br /&gt;
[[en:Module_NotePlus]]&lt;br /&gt;
[[fr:Module_NotePlus_fr]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{DISPLAYTITLE:Módulo NotePlus}}&lt;br /&gt;
&lt;br /&gt;
==Características de NotePlus==&lt;br /&gt;
Este módulo amplía la función nativa de notas en Dolibarr permitiendo agregar notas ilimitadas y altamente seguras a casi cualquier elemento del ERP, con cifrado AES de 256 bits y claves personales o compartidas, gestión de contraseñas mediante PBKDF2 y compatibilidad multi-company.&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/NotePlus_features_es.jpg&lt;br /&gt;
&lt;br /&gt;
==Notas ilimitadas para cada elemento==&lt;br /&gt;
&lt;br /&gt;
*Puedes agregar ilimitadas notas a cada elemento.&lt;br /&gt;
*Cada una con su título y contenido.&lt;br /&gt;
*El sistema recordará la fecha y el usuario que hizo la última modificación:&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/001-unlimited-notes_es.png&lt;br /&gt;
&lt;br /&gt;
==Elementos que admiten notas de NotePlus==&lt;br /&gt;
&lt;br /&gt;
*Verás la pestaña &amp;quot;Note+&amp;quot; en estos elementos de Dolibarr: Productos, servicios, clientes, proveedores, contactos, miembros, usuarios, proyectos, contratos, cotizaciones, pedidos de cliente, pedidos a proveedor, facturas a clientes, facturas de proveedor, eventos de calendario, &amp;quot;Bill of Materials&amp;quot; (listas de materiales, órdenes de manufactura, workstations, tickets.&lt;br /&gt;
*Algunos de los anteriores incluso no tienen la opción nativa de Dolibarr de agregar una &amp;quot;Nota Privada&amp;quot; y una &amp;quot;Nota pública&amp;quot;, como por ejemplo los eventos de la Agenda:&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/002-notes-on-agenda-event_es.png&lt;br /&gt;
&lt;br /&gt;
==Notas encriptadas, opcionalmente==&lt;br /&gt;
&lt;br /&gt;
*Opcionalmente puedes encriptar el contenido de las notas.&lt;br /&gt;
*Para ello el módulo genera una clave aleatoria de 256bits.&lt;br /&gt;
*El sistema solicita al usuario una &amp;quot;clave de desbloqueo&amp;quot;.&lt;br /&gt;
*Esta clave no se guarda en la base de datos.&lt;br /&gt;
*Así que si se pierde/olvida perderás el acceso a los datos cifrados.&lt;br /&gt;
*Agregar notas encriptadas es muy sencillo:&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/003-encrypted-notes_es.gif&lt;br /&gt;
&lt;br /&gt;
*Para acceder al contenido de una nota encriptada tan solo es necesario conocer la clave de desbloqueo:&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/004-decrypt-note_es.png&lt;br /&gt;
&lt;br /&gt;
==Claves personales vs. claves compartidas==&lt;br /&gt;
&lt;br /&gt;
*Cada usuario puede crear tantas claves de encriptación como necesite.&lt;br /&gt;
*Pero también puede crear claves para compartir.&lt;br /&gt;
*Las notas encriptadas con claves personales solo serán desencriptables por el usuario que las creó, mientras que las encriptadas con claves compartidas están al acceso de cualquiera que conozca la clave.&lt;br /&gt;
*Cada usuario gestiona sus propias claves:&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/005-manage_encryption-keys_es.gif&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Consideraciones de notas compartidas:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Cuando un usuario marca una clave creada por él como COMPARTIDA entonces otros usuarios pueden usarla para crear notas encriptadas, usando siempre la misma clave de desbloqueo. De este modo se puede tener información encriptada por diferentes equipos de la empresa.&lt;br /&gt;
*El usuario que creó esa clave es el único que puede modificarla o eliminarla (!!).&lt;br /&gt;
&lt;br /&gt;
==Consideraciones técnicas==&lt;br /&gt;
&#039;&#039;&#039;Guardado robusto de las claves de cifrado&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Las claves de cifrado de las notas son de 256 bits (64 carácteres hexadecimales) generadas aleatoriamente usando el algoritmo openssl_random_pseudo_bytes() de PHP, usando una &amp;quot;salt&amp;quot; única. Se ven como esta de ejemplo: &amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855&amp;lt;/code&amp;gt;&lt;br /&gt;
*Esta clave de cifrado se guarda en la base de datos encriptándola con el algoritmo AES de 256bits, de grado militar, usando como clave de encriptación la &amp;quot;clave de desbloqueo&amp;quot; proporcionada por el usuario, que normalmente es bastante débil, y por esta razón el sistema la hace más poderosa aplicando el algoritmo PBKDF2 con 600 mil iteraciones y un &amp;quot;salt&amp;quot; aleatorio único. Esto dobla la recomendación OWASP para 2025 (!!). &#039;&#039;&#039;Nota:&#039;&#039;&#039; por esta razón podrás notar que al encriptar/desencriptar una clave o una nota, tu Dolibarr puede tardar aprox. 0.5 segundos de más (depende de la potencia de tu servidor).&lt;br /&gt;
*Por último, las notas se encriptan usando esta clave de 256bits del primer punto, de nuevo usando el algoritmo AES de 256 bits.&lt;br /&gt;
*Así que aunque alguien pudiera acceder a un backup de tu base de datos requeriría demasiado esfuerzo computacional para un ataque de fuerza bruta. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Recomendaciones en cuanto al cifrado&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Este sistema usando una versión &amp;quot;hardenizada con PBKDF2&amp;quot; hace muy díficil el éxito de un ataque de fuerza bruta, pero se recomienda:&lt;br /&gt;
&lt;br /&gt;
#No pongas todas las manzanas en la misma cesta. Usa diferentes claves para diferentes &amp;quot;asuntos&amp;quot;. Eso siempre aumentará la dificultad para un atacante, ya sea que intente un ataque de fuerza bruta o ya sea que una de tus claves se vea comprometida por técnicas de &amp;quot;hacking social&amp;quot;.&amp;lt;br /&amp;gt;&lt;br /&gt;
#Usa claves de bloqueo robustas. No uses claves de desbloqueo ni muy cortas ni con palabras de diccionario... Más bien: mezcla mayúsculas y minúsculas, incluye signos de puntuación y números. Y si prefieres usar palabras &amp;quot;de diccionario&amp;quot;, entonces que sea una frase larga de palabras &amp;quot;sin sentido&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Trazabilidad mínima de cambios&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
De momento solamente se guarda el minuto y el usuario que hizo el último cambio en una nota. A futuro podría agregarse un LOG de cambios, si hay interés de una funcionalidad así.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Compatibilidad con multi-company&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
las notas que se agregan a un elemento de una compañía quedan visibles únicamente para esa compañía. Y las claves que un usuario crea en una compañía también solamente son accesibles cuando opera en esa compañía.&lt;br /&gt;
&lt;br /&gt;
==Proceso de instalación==&lt;br /&gt;
Primeramente lo de costumbre en la instalación de cualquier módulo de Dolibarr:&lt;br /&gt;
&lt;br /&gt;
#Ir a la sección Configuración&lt;br /&gt;
#Ir a Módulos&lt;br /&gt;
#Ir a pestaña Instalar módulo externo, y ahí subes el ZIP del módulo o su actualización&lt;br /&gt;
#Volvemos a la pestaña Módulos disponibles&lt;br /&gt;
#Filtramos por Origen: &amp;quot;Externo - IMASDEWEB&amp;quot;&lt;br /&gt;
#Activamos el módulo&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/NotePlus_install_es.jpg&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Category:Módulos complementarios]]&lt;br /&gt;
{{DEFAULTSORT:Módulo_NotePlus}}&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_NotePlus_fr&amp;diff=65110</id>
		<title>Module NotePlus fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_NotePlus_fr&amp;diff=65110"/>
		<updated>2025-12-28T02:34:33Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: Fixed translation links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Do NOT edit this section&lt;br /&gt;
     Links below are automatically managed by PolyglotBot&lt;br /&gt;
     You can edit links on the English source page : Modulo_NotePlus --&amp;gt;&lt;br /&gt;
[[en:Module_NotePlus]]&lt;br /&gt;
[[es:Modulo_NotePlus]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{DISPLAYTITLE:Module NotePlus}}&lt;br /&gt;
&lt;br /&gt;
==Fonctionnalités de NotePlus==&lt;br /&gt;
Ce module étend la fonctionnalité native de notes dans &#039;&#039;Dolibarr&#039;&#039; en permettant d’ajouter des &#039;&#039;notes illimitées et hautement sécurisées&#039;&#039; à presque n’importe quel élément de l’ERP. Il intègre un &#039;&#039;chiffrement AES 256 bits&#039;&#039;, des &#039;&#039;clés personnelles ou partagées&#039;&#039;, une &#039;&#039;gestion des mots de passe via PBKDF2&#039;&#039; et une &#039;&#039;compatibilité multi-entreprise&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus - Fonctionnalités.png]]&lt;br /&gt;
&lt;br /&gt;
==Notes illimitées pour chaque élément==&lt;br /&gt;
&lt;br /&gt;
*Vous pouvez ajouter un nombre illimité de notes à chaque élément.&lt;br /&gt;
*Chaque note dispose de son propre titre et contenu.&lt;br /&gt;
*Le système enregistre la date et l’utilisateur ayant effectué la dernière modification&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus - Notes illimitées.png]]&lt;br /&gt;
&lt;br /&gt;
==Éléments compatibles avec NotePlus==&lt;br /&gt;
&lt;br /&gt;
*Vous trouverez l’onglet « &#039;&#039;Note+&#039;&#039; » sur les éléments suivants de Dolibarr&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: Produits, Services, Clients, Fournisseurs, Contacts, Membres, Utilisateurs, Projets, Contrats, Devis, Commandes clients, Commandes fournisseurs, Factures clients, Factures fournisseurs, Événements du calendrier (Agenda), Nomenclatures (Bill of Materials), Ordres de fabrication, Postes de travail, Tickets.&amp;lt;br /&amp;gt;&lt;br /&gt;
*Certains de ces éléments (comme les &#039;&#039;événements de l’Agenda&#039;&#039;) n’ont pas la fonctionnalité native de Dolibarr permettant d’ajouter une « &#039;&#039;Note privée&#039;&#039; » ou une « &#039;&#039;Note publique&#039;&#039; ». NotePlus comble cette lacune !&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
[[File:Noteplus - événements de l’Agenda.png]]&lt;br /&gt;
&lt;br /&gt;
==Notes chiffrées (optionnel)==&lt;br /&gt;
Vous avez la possibilité de **chiffrer le contenu des notes** pour une sécurité renforcée.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Comment ça marche ?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Le module génère une clé aléatoire de 256 bits (64 caractères hexadécimaux).&lt;br /&gt;
#Le système vous demande une « clé de déverrouillage » (mot de passe). &amp;lt;br /&amp;gt;⚠️ Cette clé n’est jamais stockée en base de données.  ⚠️ Si vous la perdez ou l’oubliez, vous perdrez l’accès aux données chiffrées ! &amp;lt;br /&amp;gt;&lt;br /&gt;
#Pour accéder au contenu d’une note chiffrée, il suffit de connaître la clé de déverrouillage.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Exemple d’utilisation&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Vous créez une note sensible sur un client et la chiffrez avec une clé personnelle&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/003-encrypted-notes_fr.gif&lt;br /&gt;
&lt;br /&gt;
*Seul vous (ou ceux avec qui vous partagez la clé) pourrez la lire&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
[[File:Noteplus - Déchiffrer la note.png]]&lt;br /&gt;
&lt;br /&gt;
==Clés personnelles vs. clés partagées==&lt;br /&gt;
&#039;&#039;&#039;Clés personnelles&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Chaque utilisateur peut créer autant de clés de chiffrement qu’il le souhaite.&lt;br /&gt;
*Les notes chiffrées avec une clé personnelle ne sont déverrouillables que par leur créateur.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Clés partagées&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Un utilisateur peut aussi créer des clés partagées pour permettre à d’autres utilisateurs d’accéder aux notes chiffrées.&lt;br /&gt;
*Les notes chiffrées avec une clé partagée sont accessibles à tous ceux qui connaissent la clé de déverrouillage.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gestion des clés&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Chaque utilisateur gère **ses propres clés** (personnelles et partagées).&lt;br /&gt;
*Seul le créateur d’une clé partagée peut la modifier ou la supprimer.&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/005-manage_encryption-keys_fr.gif&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cas d’usage des clés partagées&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Un utilisateur crée une clé partagée et la marque comme « PARTAGÉE ».&lt;br /&gt;
*D’autres utilisateurs peuvent alors l’utiliser pour chiffrer des notes, en utilisant toujours la même clé de déverrouillage.&lt;br /&gt;
*Cela permet de **partager des informations chiffrées entre différentes équipes** de l’entreprise.&lt;br /&gt;
&lt;br /&gt;
⚠️ &#039;&#039;&#039;Attention&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Seul le créateur de la clé peut la modifier ou la supprimer.&lt;br /&gt;
*Si un utilisateur quitte l’entreprise, il faut **changer la clé partagée** pour éviter tout accès non autorisé.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Considérations techniques==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Stockage robuste des clés de chiffrement&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
*Les clés de chiffrement des notes sont de 256 bits (64 caractères hexadécimaux) générées aléatoirement à l’aide de l’algorithme openssl_random_pseudo_bytes() de PHP, en utilisant un &amp;quot;salt&amp;quot; unique. Elles ressemblent à cet exemple&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: &amp;lt;code&amp;gt;e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855&amp;lt;/code&amp;gt;&lt;br /&gt;
*Cette clé de chiffrement est stockée dans la base de données après avoir été chiffrée avec l’algorithme AES 256 bits, de niveau militaire, en utilisant comme clé de chiffrement la &amp;quot;clé de déverrouillage&amp;quot; fournie par l’utilisateur, qui est généralement assez faible. Pour cette raison, le système la renforce en appliquant l’algorithme PBKDF2 avec 600 000 itérations et un &amp;quot;salt&amp;quot; aléatoire unique. Cela dépasse largement les recommandations OWASP pour 2025 (!!).&amp;lt;br /&amp;gt;&#039;&#039;&#039;Note&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&#039;&#039;&#039; pour cette raison, vous remarquerez peut-être que lors du chiffrement/déchiffrement d’une clé ou d’une note, votre Dolibarr peut prendre environ &#039;&#039;0,5 seconde de plus&#039;&#039; (selon la puissance de votre serveur).&amp;lt;br /&amp;gt;&lt;br /&gt;
*Enfin, les notes sont chiffrées à l’aide de cette clé de 256 bits mentionnée au premier point, en utilisant à nouveau l’algorithme AES 256 bits.  &lt;br /&gt;
*Ainsi, même si quelqu’un pouvait accéder à une sauvegarde de votre base de données, il lui faudrait un effort computationnel considérable pour mener une attaque par force brute.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Recommandations concernant le chiffrement&#039;&#039;&#039;===&lt;br /&gt;
Ce système, qui utilise une version &amp;quot;renforcée avec PBKDF2&amp;quot;, rend très difficile la réussite d’une attaque par force brute. Cependant, il est recommandé&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
#Ne mettez pas tous vos œufs dans le même panier. Utilisez des clés différentes pour différents &amp;quot;sujets&amp;quot;. Cela augmentera toujours la difficulté pour un attaquant, qu’il tente une attaque par force brute ou que l’une de vos clés soit compromise via des techniques d&#039;&amp;quot;ingénierie sociale&amp;quot;.&amp;lt;br /&amp;gt;&lt;br /&gt;
#Utilisez des clés de verrouillage robustes. Évitez les clés de déverrouillage trop courtes ou basées sur des mots du dictionnaire. À la place&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: combinez majuscules et minuscules, incluez des signes de ponctuation et des chiffres. Si vous préférez utiliser des mots &amp;quot;du dictionnaire&amp;quot;, optez pour une phrase longue composée de mots &amp;quot;sans lien apparent&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Traçabilité minimale des modifications&#039;&#039;&#039;===&lt;br /&gt;
Pour le moment, seule la minute et l’utilisateur ayant effectué la dernière modification sur une note sont enregistrés. À l’avenir, un journal des changements (LOG) pourrait être ajouté, s’il existe un intérêt pour une fonctionnalité de ce type.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Compatibilité avec la multi-société&#039;&#039;&#039;===&lt;br /&gt;
Les notes ajoutées à un élément d’une société ne sont visibles que pour cette société. De plus, les clés qu’un utilisateur crée dans une société ne sont accessibles que lorsqu’il opère au sein de cette même société.&lt;br /&gt;
&lt;br /&gt;
==Processus d’installation==&lt;br /&gt;
Comme pour tout module Dolibarr, suivez ces étapes&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
#Allez dans Configuration → Modules.&lt;br /&gt;
#Sélectionnez l’onglet « Installer un module externe ».&lt;br /&gt;
#Téléchargez le fichier ZIP du module (ou son update).&lt;br /&gt;
#Retournez dans l’onglet « Modules disponibles ».&lt;br /&gt;
#Filtrez par Origine&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: « Externe - IMASDEWEB ».&lt;br /&gt;
#Activez le module NotePlus&lt;br /&gt;
&lt;br /&gt;
[[Category:Modules complémentaires]]&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_NotePlus&amp;diff=65109</id>
		<title>Module NotePlus</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_NotePlus&amp;diff=65109"/>
		<updated>2025-12-28T02:33:34Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: Fixed translation links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- BEGIN interlang links --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Do NOT edit this section&lt;br /&gt;
     Links below are automatically managed by PolyglotBot&lt;br /&gt;
     You can edit links on the English source page : Modulo_NotePlus --&amp;gt;&lt;br /&gt;
[[fr:Module_NotePlus_fr]]&lt;br /&gt;
[[es:Modulo_NotePlus]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Features==&lt;br /&gt;
This module enhances Dolibarr’s native notes functionality by allowing unlimited, highly secure notes to be added to nearly any ERP element. It features &#039;&#039;AES-256 encryption&#039;&#039;, personal or shared keys, &#039;&#039;PBKDF2 password management&#039;&#039;, and &#039;&#039;multi-company compatibility&#039;&#039;.&lt;br /&gt;
[[File:NotePlus features en.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Unlimited Notes for Every Element==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Add an &#039;&#039;unlimited&#039;&#039; number of notes to each element.&lt;br /&gt;
*Each note includes a &#039;&#039;title and content&#039;&#039;.&lt;br /&gt;
*The system logs the &#039;&#039;date and user&#039;&#039; of the last modification:&lt;br /&gt;
&lt;br /&gt;
[[File:Noteplus 001 - Unlimited notes.png]]&lt;br /&gt;
&lt;br /&gt;
==Elements Supporting NotePlus Notes==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;Note+&amp;quot; tab will appear in the following Dolibarr elements: &#039;&#039;Products, services, customers, suppliers, contacts, members, users, projects, contracts, quotes, customer orders, supplier orders, customer invoices, supplier invoices, calendar events, Bills of Materials (BOM), manufacturing orders, workstations, and tickets.&#039;&#039;&lt;br /&gt;
*Some of these elements (e.g., calendar events) do not have Dolibarr’s native &amp;quot;Private Note&amp;quot; or &amp;quot;Public Note&amp;quot; options:&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus 002 - Notes on Agenda event.png]]&lt;br /&gt;
&lt;br /&gt;
==Optional Note Encryption==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*You can optionally encrypt note content.&lt;br /&gt;
*The module generates a random 256-bit key.&lt;br /&gt;
*The system prompts the user for an &amp;quot;&#039;&#039;unlock key&#039;&#039;&amp;quot;.&lt;br /&gt;
*This key is not stored in the database.&lt;br /&gt;
*&#039;&#039;&#039;If lost or forgotten, encrypted data cannot be recovered.&#039;&#039;&#039;&lt;br /&gt;
*Adding encrypted notes is simple:&lt;br /&gt;
&lt;br /&gt;
(https://imasdeweb.com/UserFiles/Image/2025/003-encrypted-notes_en.gif)&lt;br /&gt;
&lt;br /&gt;
*To access encrypted note content, only the unlock key is required:&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus 004 - Decrypting note.png]]&lt;br /&gt;
&lt;br /&gt;
==Personal Keys vs. Shared Keys==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Each user can create as many encryption keys as needed.&lt;br /&gt;
*Users can also create shared keys for team access.&lt;br /&gt;
*When using personal keys: Only the creator can decrypt notes&lt;br /&gt;
*When using shared keys: Any user with the key can decrypt notes.&lt;br /&gt;
*Each user manages their own keys:&lt;br /&gt;
&lt;br /&gt;
(https://imasdeweb.com/UserFiles/Image/2025/005-manage_encryption-keys_en.gif)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Shared Note Considerations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*When a user marks a key as SHARED, others can use it to encrypt notes with the same unlock key, enabling secure collaboration.&lt;br /&gt;
*Only the key creator can modify or delete it (!!).&lt;br /&gt;
&lt;br /&gt;
==Technical Considerations==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Secure Key Storage&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Encryption keys are 256-bit (64 hex characters), generated using PHP’s `openssl_random_pseudo_bytes()` with a unique salt. Example: &amp;lt;code&amp;gt;e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855&amp;lt;/code&amp;gt; &amp;lt;br /&amp;gt;&lt;br /&gt;
*The key is stored in the database encrypted with AES-256, using the user’s unlock key (which is typically weak). To strengthen it, the system applies PBKDF2 with 600,000 iterations and a unique salt—double the OWASP 2025 recommendation (!!).&amp;lt;br /&amp;gt;&lt;br /&gt;
*Notes are encrypted using the 256-bit key also via AES-256. &amp;lt;br /&amp;gt;⚠️ &#039;&#039;&#039;Performance Note:&#039;&#039;&#039; Encryption/decryption may add &#039;&#039;~0.5 seconds&#039;&#039; (depends on server power). &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Encryption Recommendations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While PBKDF2 hardening makes brute-force attacks difficult, we recommend:&lt;br /&gt;
&lt;br /&gt;
#Avoid reusing keys—use different keys for different purposes to limit exposure.&lt;br /&gt;
#Use strong unlock keys—avoid short or dictionary-based passwords. Instead, use &#039;&#039;mixed case, numbers, and symbols&#039;&#039;. If using words, make them a &#039;&#039;long, nonsensical phrase&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Change Tracking&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Currently, only the **last modification time and user** are logged. A full **change log** may be added in the future if demand exists.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Multi-Company Compatibility&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Notes added to a company’s elements are **only visible within that company**.&lt;br /&gt;
*Keys created by a user are **only accessible when working in that company**.&lt;br /&gt;
&lt;br /&gt;
==Installation Process==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#Go to Configuration → Modules.&lt;br /&gt;
#Navigate to the &amp;quot;Install External Module&amp;quot; tab and upload the module’s ZIP file.&lt;br /&gt;
#Return to the &amp;quot;Available Modules&amp;quot; tab.&lt;br /&gt;
#Filter by Origin: &amp;quot;External - IMASDEWEB&amp;quot;.&lt;br /&gt;
#Activate the module.&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus - Activate module.png]]&lt;br /&gt;
[[Category:Complementary modules]]&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Modulo_NotePlus&amp;diff=65104</id>
		<title>Modulo NotePlus</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Modulo_NotePlus&amp;diff=65104"/>
		<updated>2025-12-28T02:31:29Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: Added translation links&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_NotePlus fr]]&lt;br /&gt;
[[es:Modulo_NotePlus]]&lt;br /&gt;
[[en:Module_NotePlus]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{DISPLAYTITLE:Módulo NotePlus}}&lt;br /&gt;
&lt;br /&gt;
==Características de NotePlus==&lt;br /&gt;
Este módulo amplía la función nativa de notas en Dolibarr permitiendo agregar notas ilimitadas y altamente seguras a casi cualquier elemento del ERP, con cifrado AES de 256 bits y claves personales o compartidas, gestión de contraseñas mediante PBKDF2 y compatibilidad multi-company.&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/NotePlus_features_es.jpg&lt;br /&gt;
&lt;br /&gt;
==Notas ilimitadas para cada elemento==&lt;br /&gt;
&lt;br /&gt;
*Puedes agregar ilimitadas notas a cada elemento.&lt;br /&gt;
*Cada una con su título y contenido.&lt;br /&gt;
*El sistema recordará la fecha y el usuario que hizo la última modificación:&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/001-unlimited-notes_es.png&lt;br /&gt;
&lt;br /&gt;
==Elementos que admiten notas de NotePlus==&lt;br /&gt;
&lt;br /&gt;
*Verás la pestaña &amp;quot;Note+&amp;quot; en estos elementos de Dolibarr: Productos, servicios, clientes, proveedores, contactos, miembros, usuarios, proyectos, contratos, cotizaciones, pedidos de cliente, pedidos a proveedor, facturas a clientes, facturas de proveedor, eventos de calendario, &amp;quot;Bill of Materials&amp;quot; (listas de materiales, órdenes de manufactura, workstations, tickets.&lt;br /&gt;
*Algunos de los anteriores incluso no tienen la opción nativa de Dolibarr de agregar una &amp;quot;Nota Privada&amp;quot; y una &amp;quot;Nota pública&amp;quot;, como por ejemplo los eventos de la Agenda:&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/002-notes-on-agenda-event_es.png&lt;br /&gt;
&lt;br /&gt;
==Notas encriptadas, opcionalmente==&lt;br /&gt;
&lt;br /&gt;
*Opcionalmente puedes encriptar el contenido de las notas.&lt;br /&gt;
*Para ello el módulo genera una clave aleatoria de 256bits.&lt;br /&gt;
*El sistema solicita al usuario una &amp;quot;clave de desbloqueo&amp;quot;.&lt;br /&gt;
*Esta clave no se guarda en la base de datos.&lt;br /&gt;
*Así que si se pierde/olvida perderás el acceso a los datos cifrados.&lt;br /&gt;
*Agregar notas encriptadas es muy sencillo:&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/003-encrypted-notes_es.gif&lt;br /&gt;
&lt;br /&gt;
*Para acceder al contenido de una nota encriptada tan solo es necesario conocer la clave de desbloqueo:&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/004-decrypt-note_es.png&lt;br /&gt;
&lt;br /&gt;
==Claves personales vs. claves compartidas==&lt;br /&gt;
&lt;br /&gt;
*Cada usuario puede crear tantas claves de encriptación como necesite.&lt;br /&gt;
*Pero también puede crear claves para compartir.&lt;br /&gt;
*Las notas encriptadas con claves personales solo serán desencriptables por el usuario que las creó, mientras que las encriptadas con claves compartidas están al acceso de cualquiera que conozca la clave.&lt;br /&gt;
*Cada usuario gestiona sus propias claves:&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/005-manage_encryption-keys_es.gif&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Consideraciones de notas compartidas:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Cuando un usuario marca una clave creada por él como COMPARTIDA entonces otros usuarios pueden usarla para crear notas encriptadas, usando siempre la misma clave de desbloqueo. De este modo se puede tener información encriptada por diferentes equipos de la empresa.&lt;br /&gt;
*El usuario que creó esa clave es el único que puede modificarla o eliminarla (!!).&lt;br /&gt;
&lt;br /&gt;
==Consideraciones técnicas==&lt;br /&gt;
&#039;&#039;&#039;Guardado robusto de las claves de cifrado&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Las claves de cifrado de las notas son de 256 bits (64 carácteres hexadecimales) generadas aleatoriamente usando el algoritmo openssl_random_pseudo_bytes() de PHP, usando una &amp;quot;salt&amp;quot; única. Se ven como esta de ejemplo: &amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855&amp;lt;/code&amp;gt;&lt;br /&gt;
*Esta clave de cifrado se guarda en la base de datos encriptándola con el algoritmo AES de 256bits, de grado militar, usando como clave de encriptación la &amp;quot;clave de desbloqueo&amp;quot; proporcionada por el usuario, que normalmente es bastante débil, y por esta razón el sistema la hace más poderosa aplicando el algoritmo PBKDF2 con 600 mil iteraciones y un &amp;quot;salt&amp;quot; aleatorio único. Esto dobla la recomendación OWASP para 2025 (!!). &#039;&#039;&#039;Nota:&#039;&#039;&#039; por esta razón podrás notar que al encriptar/desencriptar una clave o una nota, tu Dolibarr puede tardar aprox. 0.5 segundos de más (depende de la potencia de tu servidor).&lt;br /&gt;
*Por último, las notas se encriptan usando esta clave de 256bits del primer punto, de nuevo usando el algoritmo AES de 256 bits.&lt;br /&gt;
*Así que aunque alguien pudiera acceder a un backup de tu base de datos requeriría demasiado esfuerzo computacional para un ataque de fuerza bruta. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Recomendaciones en cuanto al cifrado&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Este sistema usando una versión &amp;quot;hardenizada con PBKDF2&amp;quot; hace muy díficil el éxito de un ataque de fuerza bruta, pero se recomienda:&lt;br /&gt;
&lt;br /&gt;
#No pongas todas las manzanas en la misma cesta. Usa diferentes claves para diferentes &amp;quot;asuntos&amp;quot;. Eso siempre aumentará la dificultad para un atacante, ya sea que intente un ataque de fuerza bruta o ya sea que una de tus claves se vea comprometida por técnicas de &amp;quot;hacking social&amp;quot;.&amp;lt;br /&amp;gt;&lt;br /&gt;
#Usa claves de bloqueo robustas. No uses claves de desbloqueo ni muy cortas ni con palabras de diccionario... Más bien: mezcla mayúsculas y minúsculas, incluye signos de puntuación y números. Y si prefieres usar palabras &amp;quot;de diccionario&amp;quot;, entonces que sea una frase larga de palabras &amp;quot;sin sentido&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Trazabilidad mínima de cambios&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
De momento solamente se guarda el minuto y el usuario que hizo el último cambio en una nota. A futuro podría agregarse un LOG de cambios, si hay interés de una funcionalidad así.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Compatibilidad con multi-company&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
las notas que se agregan a un elemento de una compañía quedan visibles únicamente para esa compañía. Y las claves que un usuario crea en una compañía también solamente son accesibles cuando opera en esa compañía.&lt;br /&gt;
&lt;br /&gt;
==Proceso de instalación==&lt;br /&gt;
Primeramente lo de costumbre en la instalación de cualquier módulo de Dolibarr:&lt;br /&gt;
&lt;br /&gt;
#Ir a la sección Configuración&lt;br /&gt;
#Ir a Módulos&lt;br /&gt;
#Ir a pestaña Instalar módulo externo, y ahí subes el ZIP del módulo o su actualización&lt;br /&gt;
#Volvemos a la pestaña Módulos disponibles&lt;br /&gt;
#Filtramos por Origen: &amp;quot;Externo - IMASDEWEB&amp;quot;&lt;br /&gt;
#Activamos el módulo&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/NotePlus_install_es.jpg&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Category:Módulos complementarios]]&lt;br /&gt;
{{DEFAULTSORT:Módulo_NotePlus}}&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_NotePlus&amp;diff=65100</id>
		<title>Module NotePlus</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_NotePlus&amp;diff=65100"/>
		<updated>2025-12-28T02:29:01Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: Added translation links&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_NotePlus fr]]&lt;br /&gt;
[[es:Módulo_NotePlus]]&lt;br /&gt;
[[en:Module_NotePlus]]&lt;br /&gt;
&amp;lt;!-- END interlang links --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Features==&lt;br /&gt;
This module enhances Dolibarr’s native notes functionality by allowing unlimited, highly secure notes to be added to nearly any ERP element. It features &#039;&#039;AES-256 encryption&#039;&#039;, personal or shared keys, &#039;&#039;PBKDF2 password management&#039;&#039;, and &#039;&#039;multi-company compatibility&#039;&#039;.&lt;br /&gt;
[[File:NotePlus features en.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Unlimited Notes for Every Element==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Add an &#039;&#039;unlimited&#039;&#039; number of notes to each element.&lt;br /&gt;
*Each note includes a &#039;&#039;title and content&#039;&#039;.&lt;br /&gt;
*The system logs the &#039;&#039;date and user&#039;&#039; of the last modification:&lt;br /&gt;
&lt;br /&gt;
[[File:Noteplus 001 - Unlimited notes.png]]&lt;br /&gt;
&lt;br /&gt;
==Elements Supporting NotePlus Notes==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;Note+&amp;quot; tab will appear in the following Dolibarr elements: &#039;&#039;Products, services, customers, suppliers, contacts, members, users, projects, contracts, quotes, customer orders, supplier orders, customer invoices, supplier invoices, calendar events, Bills of Materials (BOM), manufacturing orders, workstations, and tickets.&#039;&#039;&lt;br /&gt;
*Some of these elements (e.g., calendar events) do not have Dolibarr’s native &amp;quot;Private Note&amp;quot; or &amp;quot;Public Note&amp;quot; options:&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus 002 - Notes on Agenda event.png]]&lt;br /&gt;
&lt;br /&gt;
==Optional Note Encryption==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*You can optionally encrypt note content.&lt;br /&gt;
*The module generates a random 256-bit key.&lt;br /&gt;
*The system prompts the user for an &amp;quot;&#039;&#039;unlock key&#039;&#039;&amp;quot;.&lt;br /&gt;
*This key is not stored in the database.&lt;br /&gt;
*&#039;&#039;&#039;If lost or forgotten, encrypted data cannot be recovered.&#039;&#039;&#039;&lt;br /&gt;
*Adding encrypted notes is simple:&lt;br /&gt;
&lt;br /&gt;
(https://imasdeweb.com/UserFiles/Image/2025/003-encrypted-notes_en.gif)&lt;br /&gt;
&lt;br /&gt;
*To access encrypted note content, only the unlock key is required:&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus 004 - Decrypting note.png]]&lt;br /&gt;
&lt;br /&gt;
==Personal Keys vs. Shared Keys==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Each user can create as many encryption keys as needed.&lt;br /&gt;
*Users can also create shared keys for team access.&lt;br /&gt;
*When using personal keys: Only the creator can decrypt notes&lt;br /&gt;
*When using shared keys: Any user with the key can decrypt notes.&lt;br /&gt;
*Each user manages their own keys:&lt;br /&gt;
&lt;br /&gt;
(https://imasdeweb.com/UserFiles/Image/2025/005-manage_encryption-keys_en.gif)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Shared Note Considerations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*When a user marks a key as SHARED, others can use it to encrypt notes with the same unlock key, enabling secure collaboration.&lt;br /&gt;
*Only the key creator can modify or delete it (!!).&lt;br /&gt;
&lt;br /&gt;
==Technical Considerations==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Secure Key Storage&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Encryption keys are 256-bit (64 hex characters), generated using PHP’s `openssl_random_pseudo_bytes()` with a unique salt. Example: &amp;lt;code&amp;gt;e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855&amp;lt;/code&amp;gt; &amp;lt;br /&amp;gt;&lt;br /&gt;
*The key is stored in the database encrypted with AES-256, using the user’s unlock key (which is typically weak). To strengthen it, the system applies PBKDF2 with 600,000 iterations and a unique salt—double the OWASP 2025 recommendation (!!).&amp;lt;br /&amp;gt;&lt;br /&gt;
*Notes are encrypted using the 256-bit key also via AES-256. &amp;lt;br /&amp;gt;⚠️ &#039;&#039;&#039;Performance Note:&#039;&#039;&#039; Encryption/decryption may add &#039;&#039;~0.5 seconds&#039;&#039; (depends on server power). &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Encryption Recommendations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While PBKDF2 hardening makes brute-force attacks difficult, we recommend:&lt;br /&gt;
&lt;br /&gt;
#Avoid reusing keys—use different keys for different purposes to limit exposure.&lt;br /&gt;
#Use strong unlock keys—avoid short or dictionary-based passwords. Instead, use &#039;&#039;mixed case, numbers, and symbols&#039;&#039;. If using words, make them a &#039;&#039;long, nonsensical phrase&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Change Tracking&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Currently, only the **last modification time and user** are logged. A full **change log** may be added in the future if demand exists.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Multi-Company Compatibility&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Notes added to a company’s elements are **only visible within that company**.&lt;br /&gt;
*Keys created by a user are **only accessible when working in that company**.&lt;br /&gt;
&lt;br /&gt;
==Installation Process==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#Go to Configuration → Modules.&lt;br /&gt;
#Navigate to the &amp;quot;Install External Module&amp;quot; tab and upload the module’s ZIP file.&lt;br /&gt;
#Return to the &amp;quot;Available Modules&amp;quot; tab.&lt;br /&gt;
#Filter by Origin: &amp;quot;External - IMASDEWEB&amp;quot;.&lt;br /&gt;
#Activate the module.&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus - Activate module.png]]&lt;br /&gt;
[[Category:Complementary modules]]&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_NotePlus&amp;diff=65099</id>
		<title>Module NotePlus</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_NotePlus&amp;diff=65099"/>
		<updated>2025-12-28T02:23:04Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: Added to the Complementary Modules category, and quit from List of Modules.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Features==&lt;br /&gt;
This module enhances Dolibarr’s native notes functionality by allowing unlimited, highly secure notes to be added to nearly any ERP element. It features &#039;&#039;AES-256 encryption&#039;&#039;, personal or shared keys, &#039;&#039;PBKDF2 password management&#039;&#039;, and &#039;&#039;multi-company compatibility&#039;&#039;.&lt;br /&gt;
[[File:NotePlus features en.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Unlimited Notes for Every Element==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Add an &#039;&#039;unlimited&#039;&#039; number of notes to each element.&lt;br /&gt;
*Each note includes a &#039;&#039;title and content&#039;&#039;.&lt;br /&gt;
*The system logs the &#039;&#039;date and user&#039;&#039; of the last modification:&lt;br /&gt;
&lt;br /&gt;
[[File:Noteplus 001 - Unlimited notes.png]]&lt;br /&gt;
&lt;br /&gt;
==Elements Supporting NotePlus Notes==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;Note+&amp;quot; tab will appear in the following Dolibarr elements: &#039;&#039;Products, services, customers, suppliers, contacts, members, users, projects, contracts, quotes, customer orders, supplier orders, customer invoices, supplier invoices, calendar events, Bills of Materials (BOM), manufacturing orders, workstations, and tickets.&#039;&#039;&lt;br /&gt;
*Some of these elements (e.g., calendar events) do not have Dolibarr’s native &amp;quot;Private Note&amp;quot; or &amp;quot;Public Note&amp;quot; options:&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus 002 - Notes on Agenda event.png]]&lt;br /&gt;
&lt;br /&gt;
==Optional Note Encryption==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*You can optionally encrypt note content.&lt;br /&gt;
*The module generates a random 256-bit key.&lt;br /&gt;
*The system prompts the user for an &amp;quot;&#039;&#039;unlock key&#039;&#039;&amp;quot;.&lt;br /&gt;
*This key is not stored in the database.&lt;br /&gt;
*&#039;&#039;&#039;If lost or forgotten, encrypted data cannot be recovered.&#039;&#039;&#039;&lt;br /&gt;
*Adding encrypted notes is simple:&lt;br /&gt;
&lt;br /&gt;
(https://imasdeweb.com/UserFiles/Image/2025/003-encrypted-notes_en.gif)&lt;br /&gt;
&lt;br /&gt;
*To access encrypted note content, only the unlock key is required:&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus 004 - Decrypting note.png]]&lt;br /&gt;
&lt;br /&gt;
==Personal Keys vs. Shared Keys==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Each user can create as many encryption keys as needed.&lt;br /&gt;
*Users can also create shared keys for team access.&lt;br /&gt;
*When using personal keys: Only the creator can decrypt notes&lt;br /&gt;
*When using shared keys: Any user with the key can decrypt notes.&lt;br /&gt;
*Each user manages their own keys:&lt;br /&gt;
&lt;br /&gt;
(https://imasdeweb.com/UserFiles/Image/2025/005-manage_encryption-keys_en.gif)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Shared Note Considerations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*When a user marks a key as SHARED, others can use it to encrypt notes with the same unlock key, enabling secure collaboration.&lt;br /&gt;
*Only the key creator can modify or delete it (!!).&lt;br /&gt;
&lt;br /&gt;
==Technical Considerations==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Secure Key Storage&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Encryption keys are 256-bit (64 hex characters), generated using PHP’s `openssl_random_pseudo_bytes()` with a unique salt. Example: &amp;lt;code&amp;gt;e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855&amp;lt;/code&amp;gt; &amp;lt;br /&amp;gt;&lt;br /&gt;
*The key is stored in the database encrypted with AES-256, using the user’s unlock key (which is typically weak). To strengthen it, the system applies PBKDF2 with 600,000 iterations and a unique salt—double the OWASP 2025 recommendation (!!).&amp;lt;br /&amp;gt;&lt;br /&gt;
*Notes are encrypted using the 256-bit key also via AES-256. &amp;lt;br /&amp;gt;⚠️ &#039;&#039;&#039;Performance Note:&#039;&#039;&#039; Encryption/decryption may add &#039;&#039;~0.5 seconds&#039;&#039; (depends on server power). &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Encryption Recommendations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While PBKDF2 hardening makes brute-force attacks difficult, we recommend:&lt;br /&gt;
&lt;br /&gt;
#Avoid reusing keys—use different keys for different purposes to limit exposure.&lt;br /&gt;
#Use strong unlock keys—avoid short or dictionary-based passwords. Instead, use &#039;&#039;mixed case, numbers, and symbols&#039;&#039;. If using words, make them a &#039;&#039;long, nonsensical phrase&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Change Tracking&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Currently, only the **last modification time and user** are logged. A full **change log** may be added in the future if demand exists.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Multi-Company Compatibility&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Notes added to a company’s elements are **only visible within that company**.&lt;br /&gt;
*Keys created by a user are **only accessible when working in that company**.&lt;br /&gt;
&lt;br /&gt;
==Installation Process==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#Go to Configuration → Modules.&lt;br /&gt;
#Navigate to the &amp;quot;Install External Module&amp;quot; tab and upload the module’s ZIP file.&lt;br /&gt;
#Return to the &amp;quot;Available Modules&amp;quot; tab.&lt;br /&gt;
#Filter by Origin: &amp;quot;External - IMASDEWEB&amp;quot;.&lt;br /&gt;
#Activate the module.&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus - Activate module.png]]&lt;br /&gt;
[[Category:Complementary modules]]&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Modulo_NotePlus&amp;diff=65098</id>
		<title>Modulo NotePlus</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Modulo_NotePlus&amp;diff=65098"/>
		<updated>2025-12-28T02:19:16Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: First edition.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Módulo NotePlus}}&lt;br /&gt;
&lt;br /&gt;
==Características de NotePlus==&lt;br /&gt;
Este módulo amplía la función nativa de notas en Dolibarr permitiendo agregar notas ilimitadas y altamente seguras a casi cualquier elemento del ERP, con cifrado AES de 256 bits y claves personales o compartidas, gestión de contraseñas mediante PBKDF2 y compatibilidad multi-company.&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/NotePlus_features_es.jpg&lt;br /&gt;
&lt;br /&gt;
==Notas ilimitadas para cada elemento==&lt;br /&gt;
&lt;br /&gt;
*Puedes agregar ilimitadas notas a cada elemento.&lt;br /&gt;
*Cada una con su título y contenido.&lt;br /&gt;
*El sistema recordará la fecha y el usuario que hizo la última modificación:&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/001-unlimited-notes_es.png&lt;br /&gt;
&lt;br /&gt;
==Elementos que admiten notas de NotePlus==&lt;br /&gt;
&lt;br /&gt;
*Verás la pestaña &amp;quot;Note+&amp;quot; en estos elementos de Dolibarr: Productos, servicios, clientes, proveedores, contactos, miembros, usuarios, proyectos, contratos, cotizaciones, pedidos de cliente, pedidos a proveedor, facturas a clientes, facturas de proveedor, eventos de calendario, &amp;quot;Bill of Materials&amp;quot; (listas de materiales, órdenes de manufactura, workstations, tickets.&lt;br /&gt;
*Algunos de los anteriores incluso no tienen la opción nativa de Dolibarr de agregar una &amp;quot;Nota Privada&amp;quot; y una &amp;quot;Nota pública&amp;quot;, como por ejemplo los eventos de la Agenda:&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/002-notes-on-agenda-event_es.png&lt;br /&gt;
&lt;br /&gt;
==Notas encriptadas, opcionalmente==&lt;br /&gt;
&lt;br /&gt;
*Opcionalmente puedes encriptar el contenido de las notas.&lt;br /&gt;
*Para ello el módulo genera una clave aleatoria de 256bits.&lt;br /&gt;
*El sistema solicita al usuario una &amp;quot;clave de desbloqueo&amp;quot;.&lt;br /&gt;
*Esta clave no se guarda en la base de datos.&lt;br /&gt;
*Así que si se pierde/olvida perderás el acceso a los datos cifrados.&lt;br /&gt;
*Agregar notas encriptadas es muy sencillo:&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/003-encrypted-notes_es.gif&lt;br /&gt;
&lt;br /&gt;
*Para acceder al contenido de una nota encriptada tan solo es necesario conocer la clave de desbloqueo:&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/004-decrypt-note_es.png&lt;br /&gt;
&lt;br /&gt;
==Claves personales vs. claves compartidas==&lt;br /&gt;
&lt;br /&gt;
*Cada usuario puede crear tantas claves de encriptación como necesite.&lt;br /&gt;
*Pero también puede crear claves para compartir.&lt;br /&gt;
*Las notas encriptadas con claves personales solo serán desencriptables por el usuario que las creó, mientras que las encriptadas con claves compartidas están al acceso de cualquiera que conozca la clave.&lt;br /&gt;
*Cada usuario gestiona sus propias claves:&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/005-manage_encryption-keys_es.gif&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Consideraciones de notas compartidas:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Cuando un usuario marca una clave creada por él como COMPARTIDA entonces otros usuarios pueden usarla para crear notas encriptadas, usando siempre la misma clave de desbloqueo. De este modo se puede tener información encriptada por diferentes equipos de la empresa.&lt;br /&gt;
*El usuario que creó esa clave es el único que puede modificarla o eliminarla (!!).&lt;br /&gt;
&lt;br /&gt;
==Consideraciones técnicas==&lt;br /&gt;
&#039;&#039;&#039;Guardado robusto de las claves de cifrado&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Las claves de cifrado de las notas son de 256 bits (64 carácteres hexadecimales) generadas aleatoriamente usando el algoritmo openssl_random_pseudo_bytes() de PHP, usando una &amp;quot;salt&amp;quot; única. Se ven como esta de ejemplo: &amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855&amp;lt;/code&amp;gt;&lt;br /&gt;
*Esta clave de cifrado se guarda en la base de datos encriptándola con el algoritmo AES de 256bits, de grado militar, usando como clave de encriptación la &amp;quot;clave de desbloqueo&amp;quot; proporcionada por el usuario, que normalmente es bastante débil, y por esta razón el sistema la hace más poderosa aplicando el algoritmo PBKDF2 con 600 mil iteraciones y un &amp;quot;salt&amp;quot; aleatorio único. Esto dobla la recomendación OWASP para 2025 (!!). &#039;&#039;&#039;Nota:&#039;&#039;&#039; por esta razón podrás notar que al encriptar/desencriptar una clave o una nota, tu Dolibarr puede tardar aprox. 0.5 segundos de más (depende de la potencia de tu servidor).&lt;br /&gt;
*Por último, las notas se encriptan usando esta clave de 256bits del primer punto, de nuevo usando el algoritmo AES de 256 bits.&lt;br /&gt;
*Así que aunque alguien pudiera acceder a un backup de tu base de datos requeriría demasiado esfuerzo computacional para un ataque de fuerza bruta. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Recomendaciones en cuanto al cifrado&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Este sistema usando una versión &amp;quot;hardenizada con PBKDF2&amp;quot; hace muy díficil el éxito de un ataque de fuerza bruta, pero se recomienda:&lt;br /&gt;
&lt;br /&gt;
#No pongas todas las manzanas en la misma cesta. Usa diferentes claves para diferentes &amp;quot;asuntos&amp;quot;. Eso siempre aumentará la dificultad para un atacante, ya sea que intente un ataque de fuerza bruta o ya sea que una de tus claves se vea comprometida por técnicas de &amp;quot;hacking social&amp;quot;.&amp;lt;br /&amp;gt;&lt;br /&gt;
#Usa claves de bloqueo robustas. No uses claves de desbloqueo ni muy cortas ni con palabras de diccionario... Más bien: mezcla mayúsculas y minúsculas, incluye signos de puntuación y números. Y si prefieres usar palabras &amp;quot;de diccionario&amp;quot;, entonces que sea una frase larga de palabras &amp;quot;sin sentido&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Trazabilidad mínima de cambios&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
De momento solamente se guarda el minuto y el usuario que hizo el último cambio en una nota. A futuro podría agregarse un LOG de cambios, si hay interés de una funcionalidad así.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Compatibilidad con multi-company&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
las notas que se agregan a un elemento de una compañía quedan visibles únicamente para esa compañía. Y las claves que un usuario crea en una compañía también solamente son accesibles cuando opera en esa compañía.&lt;br /&gt;
&lt;br /&gt;
==Proceso de instalación==&lt;br /&gt;
Primeramente lo de costumbre en la instalación de cualquier módulo de Dolibarr:&lt;br /&gt;
&lt;br /&gt;
#Ir a la sección Configuración&lt;br /&gt;
#Ir a Módulos&lt;br /&gt;
#Ir a pestaña Instalar módulo externo, y ahí subes el ZIP del módulo o su actualización&lt;br /&gt;
#Volvemos a la pestaña Módulos disponibles&lt;br /&gt;
#Filtramos por Origen: &amp;quot;Externo - IMASDEWEB&amp;quot;&lt;br /&gt;
#Activamos el módulo&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/NotePlus_install_es.jpg&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Category:Módulos complementarios]]&lt;br /&gt;
{{DEFAULTSORT:Módulo_NotePlus}}&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_NotePlus_fr&amp;diff=65097</id>
		<title>Module NotePlus fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_NotePlus_fr&amp;diff=65097"/>
		<updated>2025-12-28T02:12:09Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: Changed to the correct categorie Modules Complementaires,&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Module NotePlus}}&lt;br /&gt;
&lt;br /&gt;
==Fonctionnalités de NotePlus==&lt;br /&gt;
Ce module étend la fonctionnalité native de notes dans &#039;&#039;Dolibarr&#039;&#039; en permettant d’ajouter des &#039;&#039;notes illimitées et hautement sécurisées&#039;&#039; à presque n’importe quel élément de l’ERP. Il intègre un &#039;&#039;chiffrement AES 256 bits&#039;&#039;, des &#039;&#039;clés personnelles ou partagées&#039;&#039;, une &#039;&#039;gestion des mots de passe via PBKDF2&#039;&#039; et une &#039;&#039;compatibilité multi-entreprise&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus - Fonctionnalités.png]]&lt;br /&gt;
&lt;br /&gt;
==Notes illimitées pour chaque élément==&lt;br /&gt;
&lt;br /&gt;
*Vous pouvez ajouter un nombre illimité de notes à chaque élément.&lt;br /&gt;
*Chaque note dispose de son propre titre et contenu.&lt;br /&gt;
*Le système enregistre la date et l’utilisateur ayant effectué la dernière modification&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus - Notes illimitées.png]]&lt;br /&gt;
&lt;br /&gt;
==Éléments compatibles avec NotePlus==&lt;br /&gt;
&lt;br /&gt;
*Vous trouverez l’onglet « &#039;&#039;Note+&#039;&#039; » sur les éléments suivants de Dolibarr&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: Produits, Services, Clients, Fournisseurs, Contacts, Membres, Utilisateurs, Projets, Contrats, Devis, Commandes clients, Commandes fournisseurs, Factures clients, Factures fournisseurs, Événements du calendrier (Agenda), Nomenclatures (Bill of Materials), Ordres de fabrication, Postes de travail, Tickets.&amp;lt;br /&amp;gt;&lt;br /&gt;
*Certains de ces éléments (comme les &#039;&#039;événements de l’Agenda&#039;&#039;) n’ont pas la fonctionnalité native de Dolibarr permettant d’ajouter une « &#039;&#039;Note privée&#039;&#039; » ou une « &#039;&#039;Note publique&#039;&#039; ». NotePlus comble cette lacune !&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
[[File:Noteplus - événements de l’Agenda.png]]&lt;br /&gt;
&lt;br /&gt;
==Notes chiffrées (optionnel)==&lt;br /&gt;
Vous avez la possibilité de **chiffrer le contenu des notes** pour une sécurité renforcée.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Comment ça marche ?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Le module génère une clé aléatoire de 256 bits (64 caractères hexadécimaux).&lt;br /&gt;
#Le système vous demande une « clé de déverrouillage » (mot de passe). &amp;lt;br /&amp;gt;⚠️ Cette clé n’est jamais stockée en base de données.  ⚠️ Si vous la perdez ou l’oubliez, vous perdrez l’accès aux données chiffrées ! &amp;lt;br /&amp;gt;&lt;br /&gt;
#Pour accéder au contenu d’une note chiffrée, il suffit de connaître la clé de déverrouillage.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Exemple d’utilisation&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Vous créez une note sensible sur un client et la chiffrez avec une clé personnelle&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/003-encrypted-notes_fr.gif&lt;br /&gt;
&lt;br /&gt;
*Seul vous (ou ceux avec qui vous partagez la clé) pourrez la lire&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
[[File:Noteplus - Déchiffrer la note.png]]&lt;br /&gt;
&lt;br /&gt;
==Clés personnelles vs. clés partagées==&lt;br /&gt;
&#039;&#039;&#039;Clés personnelles&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Chaque utilisateur peut créer autant de clés de chiffrement qu’il le souhaite.&lt;br /&gt;
*Les notes chiffrées avec une clé personnelle ne sont déverrouillables que par leur créateur.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Clés partagées&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Un utilisateur peut aussi créer des clés partagées pour permettre à d’autres utilisateurs d’accéder aux notes chiffrées.&lt;br /&gt;
*Les notes chiffrées avec une clé partagée sont accessibles à tous ceux qui connaissent la clé de déverrouillage.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gestion des clés&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Chaque utilisateur gère **ses propres clés** (personnelles et partagées).&lt;br /&gt;
*Seul le créateur d’une clé partagée peut la modifier ou la supprimer.&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/005-manage_encryption-keys_fr.gif&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cas d’usage des clés partagées&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Un utilisateur crée une clé partagée et la marque comme « PARTAGÉE ».&lt;br /&gt;
*D’autres utilisateurs peuvent alors l’utiliser pour chiffrer des notes, en utilisant toujours la même clé de déverrouillage.&lt;br /&gt;
*Cela permet de **partager des informations chiffrées entre différentes équipes** de l’entreprise.&lt;br /&gt;
&lt;br /&gt;
⚠️ &#039;&#039;&#039;Attention&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Seul le créateur de la clé peut la modifier ou la supprimer.&lt;br /&gt;
*Si un utilisateur quitte l’entreprise, il faut **changer la clé partagée** pour éviter tout accès non autorisé.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Considérations techniques==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Stockage robuste des clés de chiffrement&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
*Les clés de chiffrement des notes sont de 256 bits (64 caractères hexadécimaux) générées aléatoirement à l’aide de l’algorithme openssl_random_pseudo_bytes() de PHP, en utilisant un &amp;quot;salt&amp;quot; unique. Elles ressemblent à cet exemple&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: &amp;lt;code&amp;gt;e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855&amp;lt;/code&amp;gt;&lt;br /&gt;
*Cette clé de chiffrement est stockée dans la base de données après avoir été chiffrée avec l’algorithme AES 256 bits, de niveau militaire, en utilisant comme clé de chiffrement la &amp;quot;clé de déverrouillage&amp;quot; fournie par l’utilisateur, qui est généralement assez faible. Pour cette raison, le système la renforce en appliquant l’algorithme PBKDF2 avec 600 000 itérations et un &amp;quot;salt&amp;quot; aléatoire unique. Cela dépasse largement les recommandations OWASP pour 2025 (!!).&amp;lt;br /&amp;gt;&#039;&#039;&#039;Note&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&#039;&#039;&#039; pour cette raison, vous remarquerez peut-être que lors du chiffrement/déchiffrement d’une clé ou d’une note, votre Dolibarr peut prendre environ &#039;&#039;0,5 seconde de plus&#039;&#039; (selon la puissance de votre serveur).&amp;lt;br /&amp;gt;&lt;br /&gt;
*Enfin, les notes sont chiffrées à l’aide de cette clé de 256 bits mentionnée au premier point, en utilisant à nouveau l’algorithme AES 256 bits.  &lt;br /&gt;
*Ainsi, même si quelqu’un pouvait accéder à une sauvegarde de votre base de données, il lui faudrait un effort computationnel considérable pour mener une attaque par force brute.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Recommandations concernant le chiffrement&#039;&#039;&#039;===&lt;br /&gt;
Ce système, qui utilise une version &amp;quot;renforcée avec PBKDF2&amp;quot;, rend très difficile la réussite d’une attaque par force brute. Cependant, il est recommandé&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
#Ne mettez pas tous vos œufs dans le même panier. Utilisez des clés différentes pour différents &amp;quot;sujets&amp;quot;. Cela augmentera toujours la difficulté pour un attaquant, qu’il tente une attaque par force brute ou que l’une de vos clés soit compromise via des techniques d&#039;&amp;quot;ingénierie sociale&amp;quot;.&amp;lt;br /&amp;gt;&lt;br /&gt;
#Utilisez des clés de verrouillage robustes. Évitez les clés de déverrouillage trop courtes ou basées sur des mots du dictionnaire. À la place&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: combinez majuscules et minuscules, incluez des signes de ponctuation et des chiffres. Si vous préférez utiliser des mots &amp;quot;du dictionnaire&amp;quot;, optez pour une phrase longue composée de mots &amp;quot;sans lien apparent&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Traçabilité minimale des modifications&#039;&#039;&#039;===&lt;br /&gt;
Pour le moment, seule la minute et l’utilisateur ayant effectué la dernière modification sur une note sont enregistrés. À l’avenir, un journal des changements (LOG) pourrait être ajouté, s’il existe un intérêt pour une fonctionnalité de ce type.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Compatibilité avec la multi-société&#039;&#039;&#039;===&lt;br /&gt;
Les notes ajoutées à un élément d’une société ne sont visibles que pour cette société. De plus, les clés qu’un utilisateur crée dans une société ne sont accessibles que lorsqu’il opère au sein de cette même société.&lt;br /&gt;
&lt;br /&gt;
==Processus d’installation==&lt;br /&gt;
Comme pour tout module Dolibarr, suivez ces étapes&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
#Allez dans Configuration → Modules.&lt;br /&gt;
#Sélectionnez l’onglet « Installer un module externe ».&lt;br /&gt;
#Téléchargez le fichier ZIP du module (ou son update).&lt;br /&gt;
#Retournez dans l’onglet « Modules disponibles ».&lt;br /&gt;
#Filtrez par Origine&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: « Externe - IMASDEWEB ».&lt;br /&gt;
#Activez le module NotePlus&lt;br /&gt;
&lt;br /&gt;
[[Category:Modules complémentaires]]&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_NotePlus_fr&amp;diff=65096</id>
		<title>Module NotePlus fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_NotePlus_fr&amp;diff=65096"/>
		<updated>2025-12-28T02:07:43Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: Fixed external images insertion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Module NotePlus}}&lt;br /&gt;
&lt;br /&gt;
==Fonctionnalités de NotePlus==&lt;br /&gt;
Ce module étend la fonctionnalité native de notes dans &#039;&#039;Dolibarr&#039;&#039; en permettant d’ajouter des &#039;&#039;notes illimitées et hautement sécurisées&#039;&#039; à presque n’importe quel élément de l’ERP. Il intègre un &#039;&#039;chiffrement AES 256 bits&#039;&#039;, des &#039;&#039;clés personnelles ou partagées&#039;&#039;, une &#039;&#039;gestion des mots de passe via PBKDF2&#039;&#039; et une &#039;&#039;compatibilité multi-entreprise&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus - Fonctionnalités.png]]&lt;br /&gt;
&lt;br /&gt;
==Notes illimitées pour chaque élément==&lt;br /&gt;
&lt;br /&gt;
*Vous pouvez ajouter un nombre illimité de notes à chaque élément.&lt;br /&gt;
*Chaque note dispose de son propre titre et contenu.&lt;br /&gt;
*Le système enregistre la date et l’utilisateur ayant effectué la dernière modification&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus - Notes illimitées.png]]&lt;br /&gt;
&lt;br /&gt;
==Éléments compatibles avec NotePlus==&lt;br /&gt;
&lt;br /&gt;
*Vous trouverez l’onglet « &#039;&#039;Note+&#039;&#039; » sur les éléments suivants de Dolibarr&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: Produits, Services, Clients, Fournisseurs, Contacts, Membres, Utilisateurs, Projets, Contrats, Devis, Commandes clients, Commandes fournisseurs, Factures clients, Factures fournisseurs, Événements du calendrier (Agenda), Nomenclatures (Bill of Materials), Ordres de fabrication, Postes de travail, Tickets.&amp;lt;br /&amp;gt;&lt;br /&gt;
*Certains de ces éléments (comme les &#039;&#039;événements de l’Agenda&#039;&#039;) n’ont pas la fonctionnalité native de Dolibarr permettant d’ajouter une « &#039;&#039;Note privée&#039;&#039; » ou une « &#039;&#039;Note publique&#039;&#039; ». NotePlus comble cette lacune !&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
[[File:Noteplus - événements de l’Agenda.png]]&lt;br /&gt;
&lt;br /&gt;
==Notes chiffrées (optionnel)==&lt;br /&gt;
Vous avez la possibilité de **chiffrer le contenu des notes** pour une sécurité renforcée.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Comment ça marche ?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Le module génère une clé aléatoire de 256 bits (64 caractères hexadécimaux).&lt;br /&gt;
#Le système vous demande une « clé de déverrouillage » (mot de passe). &amp;lt;br /&amp;gt;⚠️ Cette clé n’est jamais stockée en base de données.  ⚠️ Si vous la perdez ou l’oubliez, vous perdrez l’accès aux données chiffrées ! &amp;lt;br /&amp;gt;&lt;br /&gt;
#Pour accéder au contenu d’une note chiffrée, il suffit de connaître la clé de déverrouillage.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Exemple d’utilisation&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Vous créez une note sensible sur un client et la chiffrez avec une clé personnelle&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/003-encrypted-notes_fr.gif&lt;br /&gt;
&lt;br /&gt;
*Seul vous (ou ceux avec qui vous partagez la clé) pourrez la lire&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
[[File:Noteplus - Déchiffrer la note.png]]&lt;br /&gt;
&lt;br /&gt;
==Clés personnelles vs. clés partagées==&lt;br /&gt;
&#039;&#039;&#039;Clés personnelles&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Chaque utilisateur peut créer autant de clés de chiffrement qu’il le souhaite.&lt;br /&gt;
*Les notes chiffrées avec une clé personnelle ne sont déverrouillables que par leur créateur.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Clés partagées&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Un utilisateur peut aussi créer des clés partagées pour permettre à d’autres utilisateurs d’accéder aux notes chiffrées.&lt;br /&gt;
*Les notes chiffrées avec une clé partagée sont accessibles à tous ceux qui connaissent la clé de déverrouillage.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gestion des clés&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Chaque utilisateur gère **ses propres clés** (personnelles et partagées).&lt;br /&gt;
*Seul le créateur d’une clé partagée peut la modifier ou la supprimer.&lt;br /&gt;
&lt;br /&gt;
https://imasdeweb.com/UserFiles/Image/2025/005-manage_encryption-keys_fr.gif&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cas d’usage des clés partagées&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Un utilisateur crée une clé partagée et la marque comme « PARTAGÉE ».&lt;br /&gt;
*D’autres utilisateurs peuvent alors l’utiliser pour chiffrer des notes, en utilisant toujours la même clé de déverrouillage.&lt;br /&gt;
*Cela permet de **partager des informations chiffrées entre différentes équipes** de l’entreprise.&lt;br /&gt;
&lt;br /&gt;
⚠️ &#039;&#039;&#039;Attention&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Seul le créateur de la clé peut la modifier ou la supprimer.&lt;br /&gt;
*Si un utilisateur quitte l’entreprise, il faut **changer la clé partagée** pour éviter tout accès non autorisé.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Considérations techniques==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Stockage robuste des clés de chiffrement&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
*Les clés de chiffrement des notes sont de 256 bits (64 caractères hexadécimaux) générées aléatoirement à l’aide de l’algorithme openssl_random_pseudo_bytes() de PHP, en utilisant un &amp;quot;salt&amp;quot; unique. Elles ressemblent à cet exemple&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: &amp;lt;code&amp;gt;e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855&amp;lt;/code&amp;gt;&lt;br /&gt;
*Cette clé de chiffrement est stockée dans la base de données après avoir été chiffrée avec l’algorithme AES 256 bits, de niveau militaire, en utilisant comme clé de chiffrement la &amp;quot;clé de déverrouillage&amp;quot; fournie par l’utilisateur, qui est généralement assez faible. Pour cette raison, le système la renforce en appliquant l’algorithme PBKDF2 avec 600 000 itérations et un &amp;quot;salt&amp;quot; aléatoire unique. Cela dépasse largement les recommandations OWASP pour 2025 (!!).&amp;lt;br /&amp;gt;&#039;&#039;&#039;Note&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&#039;&#039;&#039; pour cette raison, vous remarquerez peut-être que lors du chiffrement/déchiffrement d’une clé ou d’une note, votre Dolibarr peut prendre environ &#039;&#039;0,5 seconde de plus&#039;&#039; (selon la puissance de votre serveur).&amp;lt;br /&amp;gt;&lt;br /&gt;
*Enfin, les notes sont chiffrées à l’aide de cette clé de 256 bits mentionnée au premier point, en utilisant à nouveau l’algorithme AES 256 bits.  &lt;br /&gt;
*Ainsi, même si quelqu’un pouvait accéder à une sauvegarde de votre base de données, il lui faudrait un effort computationnel considérable pour mener une attaque par force brute.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Recommandations concernant le chiffrement&#039;&#039;&#039;===&lt;br /&gt;
Ce système, qui utilise une version &amp;quot;renforcée avec PBKDF2&amp;quot;, rend très difficile la réussite d’une attaque par force brute. Cependant, il est recommandé&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
#Ne mettez pas tous vos œufs dans le même panier. Utilisez des clés différentes pour différents &amp;quot;sujets&amp;quot;. Cela augmentera toujours la difficulté pour un attaquant, qu’il tente une attaque par force brute ou que l’une de vos clés soit compromise via des techniques d&#039;&amp;quot;ingénierie sociale&amp;quot;.&amp;lt;br /&amp;gt;&lt;br /&gt;
#Utilisez des clés de verrouillage robustes. Évitez les clés de déverrouillage trop courtes ou basées sur des mots du dictionnaire. À la place&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: combinez majuscules et minuscules, incluez des signes de ponctuation et des chiffres. Si vous préférez utiliser des mots &amp;quot;du dictionnaire&amp;quot;, optez pour une phrase longue composée de mots &amp;quot;sans lien apparent&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Traçabilité minimale des modifications&#039;&#039;&#039;===&lt;br /&gt;
Pour le moment, seule la minute et l’utilisateur ayant effectué la dernière modification sur une note sont enregistrés. À l’avenir, un journal des changements (LOG) pourrait être ajouté, s’il existe un intérêt pour une fonctionnalité de ce type.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Compatibilité avec la multi-société&#039;&#039;&#039;===&lt;br /&gt;
Les notes ajoutées à un élément d’une société ne sont visibles que pour cette société. De plus, les clés qu’un utilisateur crée dans une société ne sont accessibles que lorsqu’il opère au sein de cette même société.&lt;br /&gt;
&lt;br /&gt;
==Processus d’installation==&lt;br /&gt;
Comme pour tout module Dolibarr, suivez ces étapes&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
#Allez dans Configuration → Modules.&lt;br /&gt;
#Sélectionnez l’onglet « Installer un module externe ».&lt;br /&gt;
#Téléchargez le fichier ZIP du module (ou son update).&lt;br /&gt;
#Retournez dans l’onglet « Modules disponibles ».&lt;br /&gt;
#Filtrez par Origine&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: « Externe - IMASDEWEB ».&lt;br /&gt;
#Activez le module NotePlus&lt;br /&gt;
&lt;br /&gt;
[[Category:Liste des Modules]]&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_NotePlus_fr&amp;diff=65095</id>
		<title>Module NotePlus fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_NotePlus_fr&amp;diff=65095"/>
		<updated>2025-12-28T02:02:15Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: Image fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Module NotePlus}}&lt;br /&gt;
&lt;br /&gt;
==Fonctionnalités de NotePlus==&lt;br /&gt;
Ce module étend la fonctionnalité native de notes dans &#039;&#039;Dolibarr&#039;&#039; en permettant d’ajouter des &#039;&#039;notes illimitées et hautement sécurisées&#039;&#039; à presque n’importe quel élément de l’ERP. Il intègre un &#039;&#039;chiffrement AES 256 bits&#039;&#039;, des &#039;&#039;clés personnelles ou partagées&#039;&#039;, une &#039;&#039;gestion des mots de passe via PBKDF2&#039;&#039; et une &#039;&#039;compatibilité multi-entreprise&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus - Fonctionnalités.png]]&lt;br /&gt;
&lt;br /&gt;
==Notes illimitées pour chaque élément==&lt;br /&gt;
&lt;br /&gt;
*Vous pouvez ajouter un nombre illimité de notes à chaque élément.&lt;br /&gt;
*Chaque note dispose de son propre titre et contenu.&lt;br /&gt;
*Le système enregistre la date et l’utilisateur ayant effectué la dernière modification&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus - Notes illimitées.png]]&lt;br /&gt;
&lt;br /&gt;
==Éléments compatibles avec NotePlus==&lt;br /&gt;
&lt;br /&gt;
*Vous trouverez l’onglet « &#039;&#039;Note+&#039;&#039; » sur les éléments suivants de Dolibarr&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: Produits, Services, Clients, Fournisseurs, Contacts, Membres, Utilisateurs, Projets, Contrats, Devis, Commandes clients, Commandes fournisseurs, Factures clients, Factures fournisseurs, Événements du calendrier (Agenda), Nomenclatures (Bill of Materials), Ordres de fabrication, Postes de travail, Tickets.&amp;lt;br /&amp;gt;&lt;br /&gt;
*Certains de ces éléments (comme les &#039;&#039;événements de l’Agenda&#039;&#039;) n’ont pas la fonctionnalité native de Dolibarr permettant d’ajouter une « &#039;&#039;Note privée&#039;&#039; » ou une « &#039;&#039;Note publique&#039;&#039; ». NotePlus comble cette lacune !&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
[[File:Noteplus - événements de l’Agenda.png]]&lt;br /&gt;
&lt;br /&gt;
==Notes chiffrées (optionnel)==&lt;br /&gt;
Vous avez la possibilité de **chiffrer le contenu des notes** pour une sécurité renforcée.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Comment ça marche ?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
#Le module génère une clé aléatoire de 256 bits (64 caractères hexadécimaux).&lt;br /&gt;
#Le système vous demande une « clé de déverrouillage » (mot de passe). &amp;lt;br /&amp;gt;⚠️ Cette clé n’est jamais stockée en base de données.  ⚠️ Si vous la perdez ou l’oubliez, vous perdrez l’accès aux données chiffrées ! &amp;lt;br /&amp;gt;&lt;br /&gt;
#Pour accéder au contenu d’une note chiffrée, il suffit de connaître la clé de déverrouillage.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Exemple d’utilisation&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Vous créez une note sensible sur un client et la chiffrez avec une clé personnelle&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[https://imasdeweb.com/UserFiles/Image/2025/003-encrypted-notes_fr.gif]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Seul vous (ou ceux avec qui vous partagez la clé) pourrez la lire&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
[[File:Noteplus - Déchiffrer la note.png]]&lt;br /&gt;
&lt;br /&gt;
==Clés personnelles vs. clés partagées==&lt;br /&gt;
&#039;&#039;&#039;Clés personnelles&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Chaque utilisateur peut créer autant de clés de chiffrement qu’il le souhaite.&lt;br /&gt;
*Les notes chiffrées avec une clé personnelle ne sont déverrouillables que par leur créateur.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Clés partagées&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Un utilisateur peut aussi créer des clés partagées pour permettre à d’autres utilisateurs d’accéder aux notes chiffrées.&lt;br /&gt;
*Les notes chiffrées avec une clé partagée sont accessibles à tous ceux qui connaissent la clé de déverrouillage.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gestion des clés&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Chaque utilisateur gère **ses propres clés** (personnelles et partagées).&lt;br /&gt;
*Seul le créateur d’une clé partagée peut la modifier ou la supprimer.&lt;br /&gt;
&lt;br /&gt;
[https://imasdeweb.com/UserFiles/Image/2025/005-manage_encryption-keys_fr.gif&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cas d’usage des clés partagées&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Un utilisateur crée une clé partagée et la marque comme « PARTAGÉE ».&lt;br /&gt;
*D’autres utilisateurs peuvent alors l’utiliser pour chiffrer des notes, en utilisant toujours la même clé de déverrouillage.&lt;br /&gt;
*Cela permet de **partager des informations chiffrées entre différentes équipes** de l’entreprise.&lt;br /&gt;
&lt;br /&gt;
⚠️ &#039;&#039;&#039;Attention&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Seul le créateur de la clé peut la modifier ou la supprimer.&lt;br /&gt;
*Si un utilisateur quitte l’entreprise, il faut **changer la clé partagée** pour éviter tout accès non autorisé.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Considérations techniques==&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Stockage robuste des clés de chiffrement&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
*Les clés de chiffrement des notes sont de 256 bits (64 caractères hexadécimaux) générées aléatoirement à l’aide de l’algorithme openssl_random_pseudo_bytes() de PHP, en utilisant un &amp;quot;salt&amp;quot; unique. Elles ressemblent à cet exemple&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: &amp;lt;code&amp;gt;e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855&amp;lt;/code&amp;gt;&lt;br /&gt;
*Cette clé de chiffrement est stockée dans la base de données après avoir été chiffrée avec l’algorithme AES 256 bits, de niveau militaire, en utilisant comme clé de chiffrement la &amp;quot;clé de déverrouillage&amp;quot; fournie par l’utilisateur, qui est généralement assez faible. Pour cette raison, le système la renforce en appliquant l’algorithme PBKDF2 avec 600 000 itérations et un &amp;quot;salt&amp;quot; aléatoire unique. Cela dépasse largement les recommandations OWASP pour 2025 (!!).&amp;lt;br /&amp;gt;&#039;&#039;&#039;Note&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&#039;&#039;&#039; pour cette raison, vous remarquerez peut-être que lors du chiffrement/déchiffrement d’une clé ou d’une note, votre Dolibarr peut prendre environ &#039;&#039;0,5 seconde de plus&#039;&#039; (selon la puissance de votre serveur).&amp;lt;br /&amp;gt;&lt;br /&gt;
*Enfin, les notes sont chiffrées à l’aide de cette clé de 256 bits mentionnée au premier point, en utilisant à nouveau l’algorithme AES 256 bits.  &lt;br /&gt;
*Ainsi, même si quelqu’un pouvait accéder à une sauvegarde de votre base de données, il lui faudrait un effort computationnel considérable pour mener une attaque par force brute.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Recommandations concernant le chiffrement&#039;&#039;&#039;===&lt;br /&gt;
Ce système, qui utilise une version &amp;quot;renforcée avec PBKDF2&amp;quot;, rend très difficile la réussite d’une attaque par force brute. Cependant, il est recommandé&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
#Ne mettez pas tous vos œufs dans le même panier. Utilisez des clés différentes pour différents &amp;quot;sujets&amp;quot;. Cela augmentera toujours la difficulté pour un attaquant, qu’il tente une attaque par force brute ou que l’une de vos clés soit compromise via des techniques d&#039;&amp;quot;ingénierie sociale&amp;quot;.&amp;lt;br /&amp;gt;&lt;br /&gt;
#Utilisez des clés de verrouillage robustes. Évitez les clés de déverrouillage trop courtes ou basées sur des mots du dictionnaire. À la place&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: combinez majuscules et minuscules, incluez des signes de ponctuation et des chiffres. Si vous préférez utiliser des mots &amp;quot;du dictionnaire&amp;quot;, optez pour une phrase longue composée de mots &amp;quot;sans lien apparent&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Traçabilité minimale des modifications&#039;&#039;&#039;===&lt;br /&gt;
Pour le moment, seule la minute et l’utilisateur ayant effectué la dernière modification sur une note sont enregistrés. À l’avenir, un journal des changements (LOG) pourrait être ajouté, s’il existe un intérêt pour une fonctionnalité de ce type.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Compatibilité avec la multi-société&#039;&#039;&#039;===&lt;br /&gt;
Les notes ajoutées à un élément d’une société ne sont visibles que pour cette société. De plus, les clés qu’un utilisateur crée dans une société ne sont accessibles que lorsqu’il opère au sein de cette même société.&lt;br /&gt;
&lt;br /&gt;
==Processus d’installation==&lt;br /&gt;
Comme pour tout module Dolibarr, suivez ces étapes&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
#Allez dans Configuration → Modules.&lt;br /&gt;
#Sélectionnez l’onglet « Installer un module externe ».&lt;br /&gt;
#Téléchargez le fichier ZIP du module (ou son update).&lt;br /&gt;
#Retournez dans l’onglet « Modules disponibles ».&lt;br /&gt;
#Filtrez par Origine&amp;lt;span&amp;gt; &amp;lt;/span&amp;gt;: « Externe - IMASDEWEB ».&lt;br /&gt;
#Activez le module NotePlus&lt;br /&gt;
&lt;br /&gt;
[[Category:Liste des Modules]]&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_NotePlus_fr&amp;diff=65094</id>
		<title>Module NotePlus fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_NotePlus_fr&amp;diff=65094"/>
		<updated>2025-12-28T02:00:25Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: Firs edit.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Module NotePlus}}&lt;br /&gt;
&lt;br /&gt;
== Fonctionnalités de NotePlus ==&lt;br /&gt;
Ce module étend la fonctionnalité native de notes dans &#039;&#039;Dolibarr&#039;&#039; en permettant d’ajouter des &#039;&#039;notes illimitées et hautement sécurisées&#039;&#039; à presque n’importe quel élément de l’ERP. Il intègre un &#039;&#039;chiffrement AES 256 bits&#039;&#039;, des &#039;&#039;clés personnelles ou partagées&#039;&#039;, une &#039;&#039;gestion des mots de passe via PBKDF2&#039;&#039; et une &#039;&#039;compatibilité multi-entreprise&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus - Fonctionnalités.png]]&lt;br /&gt;
&lt;br /&gt;
== Notes illimitées pour chaque élément ==&lt;br /&gt;
&lt;br /&gt;
* Vous pouvez ajouter un nombre illimité de notes à chaque élément.&lt;br /&gt;
* Chaque note dispose de son propre titre et contenu.&lt;br /&gt;
* Le système enregistre la date et l’utilisateur ayant effectué la dernière modification :&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus - Notes illimitées.png]]&lt;br /&gt;
&lt;br /&gt;
== Éléments compatibles avec NotePlus ==&lt;br /&gt;
&lt;br /&gt;
* Vous trouverez l’onglet « &#039;&#039;Note+&#039;&#039; » sur les éléments suivants de Dolibarr : Produits, Services, Clients, Fournisseurs, Contacts, Membres, Utilisateurs, Projets, Contrats, Devis, Commandes clients, Commandes fournisseurs, Factures clients, Factures fournisseurs, Événements du calendrier (Agenda), Nomenclatures (Bill of Materials), Ordres de fabrication, Postes de travail, Tickets.&amp;lt;br /&amp;gt;&lt;br /&gt;
* Certains de ces éléments (comme les &#039;&#039;événements de l’Agenda&#039;&#039;) n’ont pas la fonctionnalité native de Dolibarr permettant d’ajouter une « &#039;&#039;Note privée&#039;&#039; » ou une « &#039;&#039;Note publique&#039;&#039; ». NotePlus comble cette lacune ! :&lt;br /&gt;
&lt;br /&gt;
[[File:Noteplus - événements de l’Agenda.png]]&lt;br /&gt;
&lt;br /&gt;
== Notes chiffrées (optionnel) ==&lt;br /&gt;
Vous avez la possibilité de **chiffrer le contenu des notes** pour une sécurité renforcée.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Comment ça marche ?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# Le module génère une clé aléatoire de 256 bits (64 caractères hexadécimaux).&lt;br /&gt;
# Le système vous demande une « clé de déverrouillage » (mot de passe). &amp;lt;br /&amp;gt;⚠️ Cette clé n’est jamais stockée en base de données.  ⚠️ Si vous la perdez ou l’oubliez, vous perdrez l’accès aux données chiffrées ! &amp;lt;br /&amp;gt;&lt;br /&gt;
# Pour accéder au contenu d’une note chiffrée, il suffit de connaître la clé de déverrouillage.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Exemple d’utilisation :&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Vous créez une note sensible sur un client et la chiffrez avec une clé personnelle :&lt;br /&gt;
&lt;br /&gt;
[https://imasdeweb.com/UserFiles/Image/2025/003-encrypted-notes_fr.gif [https://imasdeweb.com/UserFiles/Image/2025/003-encrypted-notes_fr.gif]]&lt;br /&gt;
&lt;br /&gt;
* Seul vous (ou ceux avec qui vous partagez la clé) pourrez la lire : &lt;br /&gt;
&lt;br /&gt;
[[File:Noteplus - Déchiffrer la note.png]]&lt;br /&gt;
&lt;br /&gt;
== Clés personnelles vs. clés partagées ==&lt;br /&gt;
&#039;&#039;&#039;Clés personnelles&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Chaque utilisateur peut créer autant de clés de chiffrement qu’il le souhaite.&lt;br /&gt;
* Les notes chiffrées avec une clé personnelle ne sont déverrouillables que par leur créateur.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Clés partagées&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Un utilisateur peut aussi créer des clés partagées pour permettre à d’autres utilisateurs d’accéder aux notes chiffrées.&lt;br /&gt;
* Les notes chiffrées avec une clé partagée sont accessibles à tous ceux qui connaissent la clé de déverrouillage.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gestion des clés&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Chaque utilisateur gère **ses propres clés** (personnelles et partagées).&lt;br /&gt;
* Seul le créateur d’une clé partagée peut la modifier ou la supprimer.&lt;br /&gt;
&lt;br /&gt;
[https://imasdeweb.com/UserFiles/Image/2025/005-manage_encryption-keys_fr.gif&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cas d’usage des clés partagées :&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Un utilisateur crée une clé partagée et la marque comme « PARTAGÉE ».&lt;br /&gt;
* D’autres utilisateurs peuvent alors l’utiliser pour chiffrer des notes, en utilisant toujours la même clé de déverrouillage.&lt;br /&gt;
* Cela permet de **partager des informations chiffrées entre différentes équipes** de l’entreprise.&lt;br /&gt;
&lt;br /&gt;
⚠️ &#039;&#039;&#039;Attention :&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Seul le créateur de la clé peut la modifier ou la supprimer.&lt;br /&gt;
* Si un utilisateur quitte l’entreprise, il faut **changer la clé partagée** pour éviter tout accès non autorisé.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Considérations techniques ==&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Stockage robuste des clés de chiffrement&#039;&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
* Les clés de chiffrement des notes sont de 256 bits (64 caractères hexadécimaux) générées aléatoirement à l’aide de l’algorithme openssl_random_pseudo_bytes() de PHP, en utilisant un &amp;quot;salt&amp;quot; unique. Elles ressemblent à cet exemple : &amp;lt;code&amp;gt;e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855&amp;lt;/code&amp;gt;&lt;br /&gt;
* Cette clé de chiffrement est stockée dans la base de données après avoir été chiffrée avec l’algorithme AES 256 bits, de niveau militaire, en utilisant comme clé de chiffrement la &amp;quot;clé de déverrouillage&amp;quot; fournie par l’utilisateur, qui est généralement assez faible. Pour cette raison, le système la renforce en appliquant l’algorithme PBKDF2 avec 600 000 itérations et un &amp;quot;salt&amp;quot; aléatoire unique. Cela dépasse largement les recommandations OWASP pour 2025 (!!).&amp;lt;br /&amp;gt;&#039;&#039;&#039;Note :&#039;&#039;&#039; pour cette raison, vous remarquerez peut-être que lors du chiffrement/déchiffrement d’une clé ou d’une note, votre Dolibarr peut prendre environ &#039;&#039;0,5 seconde de plus&#039;&#039; (selon la puissance de votre serveur).&amp;lt;br /&amp;gt;&lt;br /&gt;
* Enfin, les notes sont chiffrées à l’aide de cette clé de 256 bits mentionnée au premier point, en utilisant à nouveau l’algorithme AES 256 bits.  &lt;br /&gt;
* Ainsi, même si quelqu’un pouvait accéder à une sauvegarde de votre base de données, il lui faudrait un effort computationnel considérable pour mener une attaque par force brute. &lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Recommandations concernant le chiffrement&#039;&#039;&#039; ===&lt;br /&gt;
Ce système, qui utilise une version &amp;quot;renforcée avec PBKDF2&amp;quot;, rend très difficile la réussite d’une attaque par force brute. Cependant, il est recommandé :&lt;br /&gt;
&lt;br /&gt;
# Ne mettez pas tous vos œufs dans le même panier. Utilisez des clés différentes pour différents &amp;quot;sujets&amp;quot;. Cela augmentera toujours la difficulté pour un attaquant, qu’il tente une attaque par force brute ou que l’une de vos clés soit compromise via des techniques d&#039;&amp;quot;ingénierie sociale&amp;quot;.&amp;lt;br /&amp;gt;&lt;br /&gt;
# Utilisez des clés de verrouillage robustes. Évitez les clés de déverrouillage trop courtes ou basées sur des mots du dictionnaire. À la place : combinez majuscules et minuscules, incluez des signes de ponctuation et des chiffres. Si vous préférez utiliser des mots &amp;quot;du dictionnaire&amp;quot;, optez pour une phrase longue composée de mots &amp;quot;sans lien apparent&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Traçabilité minimale des modifications&#039;&#039;&#039; ===&lt;br /&gt;
Pour le moment, seule la minute et l’utilisateur ayant effectué la dernière modification sur une note sont enregistrés. À l’avenir, un journal des changements (LOG) pourrait être ajouté, s’il existe un intérêt pour une fonctionnalité de ce type.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;&#039;Compatibilité avec la multi-société&#039;&#039;&#039; ===&lt;br /&gt;
Les notes ajoutées à un élément d’une société ne sont visibles que pour cette société. De plus, les clés qu’un utilisateur crée dans une société ne sont accessibles que lorsqu’il opère au sein de cette même société.&lt;br /&gt;
&lt;br /&gt;
== Processus d’installation ==&lt;br /&gt;
Comme pour tout module Dolibarr, suivez ces étapes :&lt;br /&gt;
&lt;br /&gt;
# Allez dans Configuration → Modules.&lt;br /&gt;
# Sélectionnez l’onglet « Installer un module externe ».&lt;br /&gt;
# Téléchargez le fichier ZIP du module (ou son update).&lt;br /&gt;
# Retournez dans l’onglet « Modules disponibles ».&lt;br /&gt;
# Filtrez par Origine : « Externe - IMASDEWEB ».&lt;br /&gt;
# Activez le module NotePlus&lt;br /&gt;
&lt;br /&gt;
[[Category:Liste des Modules]]&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:Noteplus_-_D%C3%A9chiffrer_la_note.png&amp;diff=65093</id>
		<title>File:Noteplus - Déchiffrer la note.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:Noteplus_-_D%C3%A9chiffrer_la_note.png&amp;diff=65093"/>
		<updated>2025-12-28T01:58:09Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Déchiffrer la note&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:Noteplus_-_%C3%A9v%C3%A9nements_de_l%E2%80%99Agenda.png&amp;diff=65092</id>
		<title>File:Noteplus - événements de l’Agenda.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:Noteplus_-_%C3%A9v%C3%A9nements_de_l%E2%80%99Agenda.png&amp;diff=65092"/>
		<updated>2025-12-28T01:56:13Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;événements de l’Agenda&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:NotePlus_-_Notes_illimit%C3%A9es.png&amp;diff=65091</id>
		<title>File:NotePlus - Notes illimitées.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:NotePlus_-_Notes_illimit%C3%A9es.png&amp;diff=65091"/>
		<updated>2025-12-28T01:55:00Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Notes illimitées&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:NotePlus_-_Fonctionnalit%C3%A9s.png&amp;diff=65090</id>
		<title>File:NotePlus - Fonctionnalités.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:NotePlus_-_Fonctionnalit%C3%A9s.png&amp;diff=65090"/>
		<updated>2025-12-28T01:53:43Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Fonctionnalités&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_NotePlus&amp;diff=65089</id>
		<title>Module NotePlus</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_NotePlus&amp;diff=65089"/>
		<updated>2025-12-28T01:49:26Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: Added to List of Modules category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Features==&lt;br /&gt;
This module enhances Dolibarr’s native notes functionality by allowing unlimited, highly secure notes to be added to nearly any ERP element. It features &#039;&#039;AES-256 encryption&#039;&#039;, personal or shared keys, &#039;&#039;PBKDF2 password management&#039;&#039;, and &#039;&#039;multi-company compatibility&#039;&#039;.&lt;br /&gt;
[[File:NotePlus features en.jpg]]&lt;br /&gt;
&lt;br /&gt;
==Unlimited Notes for Every Element==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Add an &#039;&#039;unlimited&#039;&#039; number of notes to each element.&lt;br /&gt;
*Each note includes a &#039;&#039;title and content&#039;&#039;.&lt;br /&gt;
*The system logs the &#039;&#039;date and user&#039;&#039; of the last modification:&lt;br /&gt;
&lt;br /&gt;
[[File:Noteplus 001 - Unlimited notes.png]]&lt;br /&gt;
&lt;br /&gt;
==Elements Supporting NotePlus Notes==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;Note+&amp;quot; tab will appear in the following Dolibarr elements: &#039;&#039;Products, services, customers, suppliers, contacts, members, users, projects, contracts, quotes, customer orders, supplier orders, customer invoices, supplier invoices, calendar events, Bills of Materials (BOM), manufacturing orders, workstations, and tickets.&#039;&#039;&lt;br /&gt;
*Some of these elements (e.g., calendar events) do not have Dolibarr’s native &amp;quot;Private Note&amp;quot; or &amp;quot;Public Note&amp;quot; options:&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus 002 - Notes on Agenda event.png]]&lt;br /&gt;
&lt;br /&gt;
==Optional Note Encryption==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*You can optionally encrypt note content.&lt;br /&gt;
*The module generates a random 256-bit key.&lt;br /&gt;
*The system prompts the user for an &amp;quot;&#039;&#039;unlock key&#039;&#039;&amp;quot;.&lt;br /&gt;
*This key is not stored in the database.&lt;br /&gt;
*&#039;&#039;&#039;If lost or forgotten, encrypted data cannot be recovered.&#039;&#039;&#039;&lt;br /&gt;
*Adding encrypted notes is simple:&lt;br /&gt;
&lt;br /&gt;
(https://imasdeweb.com/UserFiles/Image/2025/003-encrypted-notes_en.gif)&lt;br /&gt;
&lt;br /&gt;
*To access encrypted note content, only the unlock key is required:&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus 004 - Decrypting note.png]]&lt;br /&gt;
&lt;br /&gt;
==Personal Keys vs. Shared Keys==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Each user can create as many encryption keys as needed.&lt;br /&gt;
*Users can also create shared keys for team access.&lt;br /&gt;
*When using personal keys: Only the creator can decrypt notes&lt;br /&gt;
*When using shared keys: Any user with the key can decrypt notes.&lt;br /&gt;
*Each user manages their own keys:&lt;br /&gt;
&lt;br /&gt;
(https://imasdeweb.com/UserFiles/Image/2025/005-manage_encryption-keys_en.gif)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Shared Note Considerations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*When a user marks a key as SHARED, others can use it to encrypt notes with the same unlock key, enabling secure collaboration.&lt;br /&gt;
*Only the key creator can modify or delete it (!!).&lt;br /&gt;
&lt;br /&gt;
==Technical Considerations==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Secure Key Storage&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Encryption keys are 256-bit (64 hex characters), generated using PHP’s `openssl_random_pseudo_bytes()` with a unique salt. Example: &amp;lt;code&amp;gt;e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855&amp;lt;/code&amp;gt; &amp;lt;br /&amp;gt;&lt;br /&gt;
*The key is stored in the database encrypted with AES-256, using the user’s unlock key (which is typically weak). To strengthen it, the system applies PBKDF2 with 600,000 iterations and a unique salt—double the OWASP 2025 recommendation (!!).&amp;lt;br /&amp;gt;&lt;br /&gt;
*Notes are encrypted using the 256-bit key also via AES-256. &amp;lt;br /&amp;gt;⚠️ &#039;&#039;&#039;Performance Note:&#039;&#039;&#039; Encryption/decryption may add &#039;&#039;~0.5 seconds&#039;&#039; (depends on server power). &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Encryption Recommendations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While PBKDF2 hardening makes brute-force attacks difficult, we recommend:&lt;br /&gt;
&lt;br /&gt;
#Avoid reusing keys—use different keys for different purposes to limit exposure.&lt;br /&gt;
#Use strong unlock keys—avoid short or dictionary-based passwords. Instead, use &#039;&#039;mixed case, numbers, and symbols&#039;&#039;. If using words, make them a &#039;&#039;long, nonsensical phrase&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Change Tracking&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Currently, only the **last modification time and user** are logged. A full **change log** may be added in the future if demand exists.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Multi-Company Compatibility&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Notes added to a company’s elements are **only visible within that company**.&lt;br /&gt;
*Keys created by a user are **only accessible when working in that company**.&lt;br /&gt;
&lt;br /&gt;
==Installation Process==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#Go to Configuration → Modules.&lt;br /&gt;
#Navigate to the &amp;quot;Install External Module&amp;quot; tab and upload the module’s ZIP file.&lt;br /&gt;
#Return to the &amp;quot;Available Modules&amp;quot; tab.&lt;br /&gt;
#Filter by Origin: &amp;quot;External - IMASDEWEB&amp;quot;.&lt;br /&gt;
#Activate the module.&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus - Activate module.png]]&lt;br /&gt;
[[Category:List of Modules]]&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_NotePlus&amp;diff=65088</id>
		<title>Module NotePlus</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_NotePlus&amp;diff=65088"/>
		<updated>2025-12-28T01:46:25Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: Initial edit.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Features ==&lt;br /&gt;
This module enhances Dolibarr’s native notes functionality by allowing unlimited, highly secure notes to be added to nearly any ERP element. It features &#039;&#039;AES-256 encryption&#039;&#039;, personal or shared keys, &#039;&#039;PBKDF2 password management&#039;&#039;, and &#039;&#039;multi-company compatibility&#039;&#039;.&lt;br /&gt;
[[File:NotePlus features en.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Unlimited Notes for Every Element ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add an &#039;&#039;unlimited&#039;&#039; number of notes to each element.&lt;br /&gt;
* Each note includes a &#039;&#039;title and content&#039;&#039;.&lt;br /&gt;
* The system logs the &#039;&#039;date and user&#039;&#039; of the last modification:&lt;br /&gt;
&lt;br /&gt;
[[File:Noteplus 001 - Unlimited notes.png]]&lt;br /&gt;
&lt;br /&gt;
== Elements Supporting NotePlus Notes ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The &amp;quot;Note+&amp;quot; tab will appear in the following Dolibarr elements: &#039;&#039;Products, services, customers, suppliers, contacts, members, users, projects, contracts, quotes, customer orders, supplier orders, customer invoices, supplier invoices, calendar events, Bills of Materials (BOM), manufacturing orders, workstations, and tickets.&#039;&#039; &lt;br /&gt;
* Some of these elements (e.g., calendar events) do not have Dolibarr’s native &amp;quot;Private Note&amp;quot; or &amp;quot;Public Note&amp;quot; options:&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus 002 - Notes on Agenda event.png]]&lt;br /&gt;
&lt;br /&gt;
== Optional Note Encryption ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* You can optionally encrypt note content.&lt;br /&gt;
* The module generates a random 256-bit key.&lt;br /&gt;
* The system prompts the user for an &amp;quot;&#039;&#039;unlock key&#039;&#039;&amp;quot;.&lt;br /&gt;
* This key is not stored in the database.&lt;br /&gt;
* &#039;&#039;&#039;If lost or forgotten, encrypted data cannot be recovered.&#039;&#039;&#039;&lt;br /&gt;
* Adding encrypted notes is simple:&lt;br /&gt;
&lt;br /&gt;
(https://imasdeweb.com/UserFiles/Image/2025/003-encrypted-notes_en.gif)&lt;br /&gt;
&lt;br /&gt;
* To access encrypted note content, only the unlock key is required:&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus 004 - Decrypting note.png]]&lt;br /&gt;
&lt;br /&gt;
== Personal Keys vs. Shared Keys ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Each user can create as many encryption keys as needed.&lt;br /&gt;
* Users can also create shared keys for team access.&lt;br /&gt;
* When using personal keys: Only the creator can decrypt notes&lt;br /&gt;
* When using shared keys: Any user with the key can decrypt notes.&lt;br /&gt;
* Each user manages their own keys:&lt;br /&gt;
&lt;br /&gt;
(https://imasdeweb.com/UserFiles/Image/2025/005-manage_encryption-keys_en.gif)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Shared Note Considerations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* When a user marks a key as SHARED, others can use it to encrypt notes with the same unlock key, enabling secure collaboration.&lt;br /&gt;
* Only the key creator can modify or delete it (!!).&lt;br /&gt;
&lt;br /&gt;
== Technical Considerations ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Secure Key Storage&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Encryption keys are 256-bit (64 hex characters), generated using PHP’s `openssl_random_pseudo_bytes()` with a unique salt. Example: &amp;lt;code&amp;gt;e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855&amp;lt;/code&amp;gt; &amp;lt;br /&amp;gt;&lt;br /&gt;
* The key is stored in the database encrypted with AES-256, using the user’s unlock key (which is typically weak). To strengthen it, the system applies PBKDF2 with 600,000 iterations and a unique salt—double the OWASP 2025 recommendation (!!).&amp;lt;br /&amp;gt;&lt;br /&gt;
* Notes are encrypted using the 256-bit key also via AES-256. &amp;lt;br /&amp;gt;⚠️ &#039;&#039;&#039;Performance Note:&#039;&#039;&#039; Encryption/decryption may add &#039;&#039;~0.5 seconds&#039;&#039; (depends on server power). &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Encryption Recommendations&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
While PBKDF2 hardening makes brute-force attacks difficult, we recommend:&lt;br /&gt;
&lt;br /&gt;
# Avoid reusing keys—use different keys for different purposes to limit exposure.&lt;br /&gt;
# Use strong unlock keys—avoid short or dictionary-based passwords. Instead, use &#039;&#039;mixed case, numbers, and symbols&#039;&#039;. If using words, make them a &#039;&#039;long, nonsensical phrase&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Change Tracking&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Currently, only the **last modification time and user** are logged. A full **change log** may be added in the future if demand exists.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Multi-Company Compatibility&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Notes added to a company’s elements are **only visible within that company**.&lt;br /&gt;
* Keys created by a user are **only accessible when working in that company**.&lt;br /&gt;
&lt;br /&gt;
== Installation Process ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Go to Configuration → Modules.&lt;br /&gt;
# Navigate to the &amp;quot;Install External Module&amp;quot; tab and upload the module’s ZIP file.&lt;br /&gt;
# Return to the &amp;quot;Available Modules&amp;quot; tab.&lt;br /&gt;
# Filter by Origin: &amp;quot;External - IMASDEWEB&amp;quot;.&lt;br /&gt;
# Activate the module.&lt;br /&gt;
&lt;br /&gt;
[[File:NotePlus - Activate module.png]]&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:NotePlus_-_Activate_module.png&amp;diff=65087</id>
		<title>File:NotePlus - Activate module.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:NotePlus_-_Activate_module.png&amp;diff=65087"/>
		<updated>2025-12-28T01:45:50Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Activate module on settings&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:NotePlus_004_-_Decrypting_note.png&amp;diff=65086</id>
		<title>File:NotePlus 004 - Decrypting note.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:NotePlus_004_-_Decrypting_note.png&amp;diff=65086"/>
		<updated>2025-12-28T01:42:51Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;NotePlus 004 - Decrypting note&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:NotePlus_002_-_Notes_on_Agenda_event.png&amp;diff=65085</id>
		<title>File:NotePlus 002 - Notes on Agenda event.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:NotePlus_002_-_Notes_on_Agenda_event.png&amp;diff=65085"/>
		<updated>2025-12-28T01:38:50Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Adding notes to an event of Agenda module.&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:Noteplus_001_-_Unlimited_notes.png&amp;diff=65084</id>
		<title>File:Noteplus 001 - Unlimited notes.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:Noteplus_001_-_Unlimited_notes.png&amp;diff=65084"/>
		<updated>2025-12-28T01:36:50Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Unlimited notes on each element.&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:NotePlus_features_en.jpg&amp;diff=65083</id>
		<title>File:NotePlus features en.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:NotePlus_features_en.jpg&amp;diff=65083"/>
		<updated>2025-12-28T01:34:33Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;NotePlus module features&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Purchases&amp;diff=65082</id>
		<title>Module Purchases</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Purchases&amp;diff=65082"/>
		<updated>2025-12-28T01:18:17Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: /* Informations */  Update of meta-data after 6 years!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Complementary modules]]&lt;br /&gt;
[[Category:Product]]&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
=Informations=&lt;br /&gt;
{{TemplateModuleInfo&lt;br /&gt;
|modulename=Purchases&lt;br /&gt;
|editor=IMASDEWEB&lt;br /&gt;
|webbuy=[https://www.dolistore.com/product.php?id=1571&amp;amp;title=purchases&amp;amp;l=en Dolistore]&lt;br /&gt;
|status=stable&lt;br /&gt;
|version=1.4&lt;br /&gt;
|minversion=15.x&lt;br /&gt;
|maxversion=21.x&lt;br /&gt;
|note=Last version 21.0.1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=Features=&lt;br /&gt;
&lt;br /&gt;
Interface translated to these languages: &amp;lt;strong&amp;gt;English / French / Catalan / Castillian (spanish) / Polish&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This Purchases module has been developed as an assistant that allows us to quickly and easily make the purchase of X products:&lt;br /&gt;
&lt;br /&gt;
*Being able to &#039;&#039;&#039;compare prices from several suppliers&#039;&#039;&#039;, even in &#039;&#039;&#039;different currencies&#039;&#039;&#039;.&lt;br /&gt;
*Being able to send by mail with a single click &#039;&#039;&#039;invitations to our selected suppliers&#039;&#039;&#039; to visit a link with which they access a simple &#039;&#039;&#039;multi-language form&#039;&#039;&#039; in which they can capture the prices for us, decline or confirm the sale of any of the requested products, and add some extra comment about delivery and/or payment conditions.&lt;br /&gt;
*Being able to &#039;&#039;&#039;modify / add / remove prices&#039;&#039;&#039; from any supplier to any product from that same price table, with just two clicks.&lt;br /&gt;
*Being able to create the corresponding &#039;&#039;&#039;orders also with two clicks&#039;&#039;&#039;, filling automatically with all the information of each supplier and the products.&lt;br /&gt;
&lt;br /&gt;
In short, an interface easier and more agile to use, that allows you to do the same thing that you can already do with the native Dolibarr interface but in a much more comfortable way. Well, in Dolibarr it would be very difficult to compare the prices of each product for each supplier and then assemble the different orders. And obviously there is no way to suppliers capture the prices you need.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: &#039;&#039;&#039;given that Dolibarr has an incomplete treatment and in some points incongrant  handling different currencies (EUR, USD, MXN, MAD, etc ...) for the prices of the products, there has been no choice but to implement a small &#039;&#039;&#039;patching of Dolibarr&#039;&#039;&#039; . At the end of this guide we explain how to do it (it is a simple copy and paste of no more than 20 lines of code in a single PHP file on Dolibarr core). But it is necessary that before you continue reading you know that if you want this &#039;&#039;&#039;Purchases module&#039;&#039;&#039; to work well in a multi-currency environment you will have to do that patching of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
=Install=&lt;br /&gt;
&lt;br /&gt;
To install a module in Dolibar is as simple as:&lt;br /&gt;
&lt;br /&gt;
*Download the archive file of module (.zip file) from web site [https://www.dolistore.com/en/modules/865-Purchases.html DoliStore.com]&lt;br /&gt;
*Create the directory: &#039;&#039;&#039;/htdocs/purchases&#039;&#039;&#039; into the root of Dolibarr.&lt;br /&gt;
*Put the content of the ZIP file into that directory&lt;br /&gt;
*On your Dolibarr panel enable the module: &#039;&#039;&#039;Setup -&amp;amp;gt; Modules&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once you have done it, it will appear in the configuration of the modules, in the Dolibarr panel. In the case of this module, you will see it in the &amp;lt;u&amp;gt;Supplier Relationship Management (SRM)&amp;lt;/u&amp;gt; group, with the name &amp;lt;u&amp;gt;Purchases&amp;lt;/u&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesSetupModules.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&lt;br /&gt;
==Accessing the module==&lt;br /&gt;
&lt;br /&gt;
Once activated, we will reach it in two possible ways:&lt;br /&gt;
&lt;br /&gt;
*Visiting the &amp;lt;u&amp;gt;Commercial&amp;lt;/u&amp;gt; section, and then in the left side menu we will see the two options for this module: &amp;lt;u&amp;gt;New purchase&amp;lt;/u&amp;gt; / &amp;lt;u&amp;gt;List&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesLeftMenu.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Or, from the &amp;lt;u&amp;gt;Dashboard&amp;lt;/u&amp;gt;, where we will have a box with the &amp;lt;u&amp;gt;Last 5 purchases&amp;lt;/u&amp;gt;.&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesBoxLatestPurchases.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Purchase list==&lt;br /&gt;
&lt;br /&gt;
There is not much to say about the list of purchase processes. The most interesting thing is to explain the possible values for the &amp;lt;u&amp;gt;Status&amp;lt;/u&amp;gt; column:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;Draft&amp;lt;/strong&amp;gt;: when we only have a list of products to buy&lt;br /&gt;
*&amp;lt;strong&amp;gt;Quoting&amp;lt;/strong&amp;gt;: when we have prices of one or more suppliers for some of the products to buy&lt;br /&gt;
*&amp;lt;strong&amp;gt;Buying&amp;lt;/strong&amp;gt;: when at least one price has already been selected for some of the products and the corresponding purchase order has been created&lt;br /&gt;
*&amp;lt;strong&amp;gt;Completed&amp;lt;/strong&amp;gt;: when purchase orders have already been created for all products&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesListPurchases.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Editing a purchase==&lt;br /&gt;
&lt;br /&gt;
The card of a not-completed purchase would look like the one shown below (click to open in another tab of the browser and see the detail):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesEditPurchase.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*At the top of the form there is a brief form with only the minimum descriptive information, of which it is worth noting that we can &amp;lt;strong&amp;gt;link the purchase to a project&amp;lt;/strong&amp;gt; that we have created in Dolibarr, if we have activated the &amp;lt;u&amp;gt;Projects module&amp;lt;/u&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
*Below of that short form, there is an action button bar, to change record changes in that form, to send quotation requests by mail to the selected suppliers, to create orders or to eliminate the purchase:&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesEditButtons.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Under these buttons we have the &amp;lt;strong&amp;gt;list of products&amp;lt;/strong&amp;gt;: a table where each row will contain a product to buy and a &amp;lt;strong&amp;gt;table comparing prices&amp;lt;/strong&amp;gt; of one or more suppliers. In the first line we have the &amp;lt;strong&amp;gt;status of this product&amp;lt;/strong&amp;gt;: 1) without prices, 2) with prices but without order, 3) created an order.&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesEditLine.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Also, until we place an order, we can change the amount we need to buy. The buttons at the end of the line allow us to: [[File:DoliPurchasesButton_Del.png]] remove the product from this purchase process, [[File:DoliPurchasesButton_Save.png]] save changes (if we modify any value in any of the text boxes in this row of the table), [[File:DoliPurchasesButton_Stock.png]] access the product stock management page in Dolibarr just for this product and supplier.&lt;br /&gt;
&amp;lt;strong&amp;gt;Note:&amp;lt;/strong&amp;gt; It is important to understand that we can change the values of the text boxes of this price table, that is, change the quantity of the product, the unit price or the minimum number of units that the supplier requires us to buy, and the page will automatically recalculate in real time the final price in the last column, in the currency of our company, but &amp;lt;strong&amp;gt;these changes will not be saved&amp;lt;/strong&amp;gt; in the server (!!). So if we want to save the changes we have to click the button to save changes [[File:DoliPurchasesButton_Save.png]].&lt;br /&gt;
&lt;br /&gt;
*Let&amp;amp;#39;s look in detail at the &amp;lt;strong&amp;gt;price comparison table&amp;lt;/strong&amp;gt;:&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesPriceComparison.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**&amp;lt;strong&amp;gt;Colors&amp;lt;/strong&amp;gt;: the text boxes will appear &amp;lt;u&amp;gt;green&amp;lt;/u&amp;gt; if the supplier in question responded to the quote request (below we will see how to make that request) and confirmed having that product in stock. Instead, they will appear in &amp;lt;u&amp;gt;orange&amp;lt;/u&amp;gt; if the request was already sent to that provider but the provider has not yet responded. Finally, it will appear in &amp;lt;u&amp;gt;red&amp;lt;/u&amp;gt; when the supplier has responded and indicated that this product can not be supplied. In the latter case, the circular control for &amp;lt;u&amp;gt;Create Order&amp;lt;/u&amp;gt; (last column of the price table) will be disabled and an icon will appear in its place that will show the comment left by the supplier.&lt;br /&gt;
&lt;br /&gt;
**&amp;lt;strong&amp;gt;Multi-currency&amp;lt;/strong&amp;gt;: it is important to understand that this module takes &amp;lt;strong&amp;gt;the prices of the different suppliers in the currency of each supplier&amp;lt;/strong&amp;gt;. Beware, at this moment (versions of Dolibarr previous or equal to 6.X) IT IS NOT THAT way on Dolibarr!! On Dolibarr, at this moment, the prices introduced in the system ALWAYS are in the currency that we have defined in the system for our company, not the supplier currency !!!! For that reason it is necessary and convenient that you do the &amp;lt;strong&amp;gt;patching of Dolibarr&amp;lt;/strong&amp;gt; that we suggest at the end of this guide. It will simply affect how the price of a product is added to an order.&lt;br /&gt;
&lt;br /&gt;
**&amp;lt;strong&amp;gt;Calculations&amp;lt;/strong&amp;gt;: having said that, with this module Purchases and the suggested Dolibarr patch we can handle &amp;amp;quot;normally&amp;amp;quot; supplier prices in their own currencies (first column) and at the same time be able to compare the &amp;lt;u&amp;gt;Final price&amp;lt;/u&amp;gt; (penultimate column) in our own currency (MXN in my case). Keep in mind that to calculate the &amp;lt;u&amp;gt;Final Price&amp;lt;/u&amp;gt; the &amp;lt;u&amp;gt;Unit Price&amp;lt;/u&amp;gt; is multiplied by the &amp;lt;u&amp;gt;Minimum quantity&amp;lt;/u&amp;gt; or by the number of &amp;lt;u&amp;gt;Units&amp;lt;/u&amp;gt; (whichever is greater than these two values). For example, in the case of the second supplier of the image (the orange one) we are required to buy a minimum of 5 units, so we multiply the unit price by 5 to obtain the final price. While for the other suppliers we multiply by 4, which is the number of units we need.&lt;br /&gt;
&lt;br /&gt;
**&amp;lt;strong&amp;gt;Currency exchange rates&amp;lt;/strong&amp;gt;: currency exchange rates (ie, how many MXN are a USD) the Purchases module takes them &amp;lt;strong&amp;gt;in real time&amp;lt;/strong&amp;gt; from the &amp;lt;u&amp;gt;International Monetary Fund&amp;lt;/u&amp;gt; website (www.imf.org/external/np/fin/data/rms_rep.aspx). In fact, because we don&amp;amp;#39;t want to call too many times to that external website and not to slow down the loading of this quotation page, a query of the IMF page is made &amp;lt;strong&amp;gt;only every 12 hours&amp;lt;/strong&amp;gt;. In short, we can be quite sure that the calculation between currencies is sufficiently adjusted to reality, and works completely automatically and in the background. By the way, you should also know that once we place an order for a product, the Purchases module registers the currency changes at that moment, and in the future, when you go back to consult the card of this purchase, it will show you the table comparison of prices according to currency exchange rates at the time of placing the order. As long as there is not a created order, the exchange rates will be updated, so today you can see a price of $11USD in Mexican pesos different from the one you saw yesterday in the same table, obviously because every day the currency exchange rates fluctuate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesPriceComparison.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**[[File:DoliPurchasesButton_Del.png]] &amp;lt;strong&amp;gt;Delete button&amp;lt;/strong&amp;gt;: when clicked, it will show us a dialog box asking if we want to only remove this price from this comparison, or if &amp;lt;strong&amp;gt;we also want to eliminate the price of this supplier for this Dolibarr system product&amp;lt;/strong&amp;gt;. If you are sure that the supplier is never going to sell you that product or simply has never given you a price, it is advisable that you choose the second option.&lt;br /&gt;
&lt;br /&gt;
**[[File:DoliPurchasesButton_Edit.png]] &amp;lt;strong&amp;gt;Edit price button&amp;lt;/strong&amp;gt;: will open in a new tab of the browser the usual Dolibarr form for editing the price of this supplier for this product. What is useful for us? Well, because there we have more editing options than in our comparison table. For example, there we can edit the VAT to apply for this product.&lt;br /&gt;
&lt;br /&gt;
**[[File:DoliPurchasesButton_Mail.png]] &amp;lt;strong&amp;gt;Email button&amp;lt;/strong&amp;gt;: is a link of the type &amp;amp;quot;mailto&amp;amp;quot; and therefore will open our mailing program that we have configured on our machine, by filling in the recipient&amp;amp;#39;s box with the email address of the supplier in question. For this reason, this button does not appear when in Dolibarr we have not filled in the email field for the supplier in question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesPriceComparison.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Create order&amp;lt;/strong&amp;gt;: finally, when we already have the prices that we were expecting from the different suppliers, or when we need to make an order, we will mark the circular box in the last column &amp;lt;u&amp;gt;Create order&amp;lt;/u&amp;gt;. Actually, the way of working is like this: for each of the products that we have included in this purchase we will mark the offers of the suppliers that seem most appropriate. And without having to make that choice for all products, click on the button &amp;lt;u&amp;gt;Create orders&amp;lt;/u&amp;gt; that are on top of the product table, and the page will display a new table with the orders to be created for each supplier, if there were several suppliers selected, and the products to ask each one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesOnclickCreateOrders.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we press the &amp;lt;u&amp;gt;Create Orders&amp;lt;/u&amp;gt; button again, the dialog box will hide, and if we do it again it will be displayed again but &amp;lt;strong&amp;gt;updated&amp;lt;/strong&amp;gt;. That is, if between both clicks we have changed our supplier selection for a product, &amp;lt;strong&amp;gt;this list of orders / suppliers will be updated&amp;lt;/strong&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
When we press any of the buttons &amp;lt;u&amp;gt;Create order&amp;lt;/u&amp;gt; in the &amp;lt;u&amp;gt;Action&amp;lt;/u&amp;gt; column, the Purchases module will create the corresponding order in &amp;lt;strong&amp;gt;draft mode&amp;lt;/strong&amp;gt;, filling in the information of the supplier, of the exchange rate of currency (if it was in a currency different from that of our company) and the list of products and quantities that we need to buy. &amp;lt;strong&amp;gt;The new order will open in a new browser tab&amp;lt;/strong&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Once an order has been created in this way, by refreshing this page of the purchase, we will see that &amp;lt;strong&amp;gt;the comparative table of prices of the ordered products has been disabled&amp;lt;/strong&amp;gt; and a button appears that gives us access to the card of that order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesOrderedProduct.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Request quotations to suppliers==&lt;br /&gt;
&lt;br /&gt;
The first thing to note is that this Purchases module does not use the native functionality of &amp;lt;u&amp;gt;Request for quotations from suppliers&amp;lt;/u&amp;gt; that &amp;lt;strong&amp;gt;Dolibarr brings natively&amp;lt;/strong&amp;gt;. It has chosen to build our own solution to avoid problems in Dolibarr related to the multi-currency. So, you will see below that the system we have built is highly functional, multi-currency and multi-language, but does not create any record in Dolibarr for supplier quotes.&lt;br /&gt;
&lt;br /&gt;
Having said that, we must proceed in this way:&lt;br /&gt;
&lt;br /&gt;
*once in our purchase we have built the list of products to buy&lt;br /&gt;
&lt;br /&gt;
*the system will automatically have added the prices of the suppliers that already exist in our system for those products&lt;br /&gt;
&lt;br /&gt;
*optionally, we can add more suppliers to a specific product (you can indicate as price &amp;quot;0&amp;quot; if you still do not have the price of these products)&lt;br /&gt;
&lt;br /&gt;
*then pressing the button &amp;lt;u&amp;gt;Send emails requesting quotation&amp;lt;/u&amp;gt; will display a dialog box, from where with a single click on the new button &amp;lt;u&amp;gt;Send emails requesting quotation&amp;lt;/u&amp;gt; these emails will be sent, at least to the suppliers for whom we have defined an email address. In the case of the picture below, only the first one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesMassiveSendEmailRequests.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*In that email that the suppliers will receive they are specified IN THEIR LANGUAGE (while the Purchases module is translated in that language) the &amp;lt;b&amp;gt;list of products&amp;lt;/b&amp;gt; that we are interested to be quoted to and &amp;lt;b&amp;gt;they are invited to visit a web form&amp;lt;/b&amp;gt; where they can capture the prices themselves and terms.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;strong&amp;gt;We can visit this quotation web form&amp;lt;/strong&amp;gt; by clicking on the &amp;lt;u&amp;gt;Form&amp;lt;/u&amp;gt; buttons in the previous dialog box. &amp;lt;strong&amp;gt;Each form is unique for each purchase and supplier, and the parameters of the URL are encrypted&amp;lt;/strong&amp;gt; to prevent them from manipulating the URL and accessing the prices of other suppliers.&lt;br /&gt;
&lt;br /&gt;
It is recommended that if the provider in question does not have email or send us their prices by other channels (phone, whatsapp, mail, etc ...) &amp;lt;strong&amp;gt;we should use the corresponding capture web form to enter the prices&amp;lt;/strong&amp;gt; of this supplier for this purchase. In this way, we will see them marked in green (or in red, in case you do not have a product) in the price comparison table of this module.&lt;br /&gt;
&lt;br /&gt;
*This is how the web form for capturing prices for the provider looks:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesQuotationForm1.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It does not need many comments, because &amp;lt;strong&amp;gt;it has been intended to be self-explanatory&amp;lt;/strong&amp;gt; so that providers feel as comfortable as possible. If we click on the &amp;lt;u&amp;gt;Extra information&amp;lt;/u&amp;gt; button, the supplier has the option of adding a general comment on this &amp;amp;quot;possible order&amp;amp;quot;, and can also provide us with more complete contact information. But it is an optional step:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesQuotationForm2.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Note:&amp;lt;/strong&amp;gt; At the moment that we place an order that includes any of these products, either for this supplier or for another of our list, &amp;lt;strong&amp;gt;the introduction of prices will be blocked&amp;lt;/strong&amp;gt; in the corresponding rows of this price table, if the supplier is late, or enter later to visit this form.&lt;br /&gt;
&lt;br /&gt;
After the supplier clicks on the &amp;lt;u&amp;gt;Submit&amp;lt;/u&amp;gt; button of that quote form &amp;lt;strong&amp;gt;the system will send an email&amp;lt;/strong&amp;gt; to the Dolibarr user who created that purchase in the system, with the prices and with the comments of the supplier. Information that on the other hand is shown in the comparative price table of the module. &amp;lt;strong&amp;gt;These prices also change the prices we have stored in Dolibarr&amp;lt;/strong&amp;gt; for those products and that supplier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Patching of Dolibarr (5.X to 6.X)==&lt;br /&gt;
&lt;br /&gt;
This small patching of Dolibarr is necessary &amp;lt;strong&amp;gt;if in your Dolibarr you have activated the &amp;amp;quot;multi-currency&amp;amp;quot; module&amp;lt;/strong&amp;gt;, that is, if you are going to have suppliers or clients that handle different currencies to your company:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesMulticurrency.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, you must edit the following file of your Dolibarr:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/htdocs/fourn/class/fournisseur.commande.class.php&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
locate line &#039;&#039;&#039;#1467&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$tabprice = calcul_price_total($qty, $pu, ... ... ... );&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and on top of that line you must paste these others:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// == reverse prices if the supplier currency don&amp;amp;#39;t match the order currency&lt;br /&gt;
	// == get the supplier currency&lt;br /&gt;
		$supplier_currency = &amp;amp;#39;&amp;amp;#39;;&lt;br /&gt;
		$sql = &amp;amp;quot;SELECT * FROM &amp;amp;quot;.MAIN_DB_PREFIX.&amp;amp;quot;product_fournisseur_price as pr &amp;amp;quot;&lt;br /&gt;
			   .&amp;amp;quot; LEFT JOIN &amp;amp;quot;.MAIN_DB_PREFIX.&amp;amp;quot;societe as supp &amp;amp;quot;&lt;br /&gt;
			   .&amp;amp;quot; ON pr.fk_soc = supp.rowid&amp;amp;quot;&lt;br /&gt;
			   .&amp;amp;quot; WHERE pr.rowid=&amp;amp;quot;.$fk_prod_fourn_price;&lt;br /&gt;
		$resql = $this-&amp;amp;gt;db-&amp;amp;gt;query($sql);&lt;br /&gt;
		if ($resql) {&lt;br /&gt;
			while($row = $resql-&amp;amp;gt;fetch_assoc()) &lt;br /&gt;
				$supplier_currency = $row[&amp;amp;#39;multicurrency_code&amp;amp;#39;];&lt;br /&gt;
		}&lt;br /&gt;
	// == decide if to invert prices&lt;br /&gt;
		if ($supplier_currency != $conf-&amp;amp;gt;currency){&lt;br /&gt;
			$pu_ht_devise = $pu;&lt;br /&gt;
			$pu = round($pu_ht_devise / $this-&amp;amp;gt;multicurrency_tx , 4);&lt;br /&gt;
		}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Explanation:&amp;lt;/strong&amp;gt; the supplier&amp;amp;#39;s currency is found, and if it does not match the system&amp;amp;#39;s (our company&amp;amp;#39;s) currency, then we exchange the values ​​of the price in the currency supposedly of the supplier and the currency of the system, to &amp;amp;quot;deceive&amp;amp;quot; Dolibarr. Keep in mind that with this patch &amp;lt;strong&amp;gt;we are hacking the native Dolibarr function that adds a product to an order&amp;lt;/strong&amp;gt;, but believe me, it is the best solution at this time when this issue of the multi-currency is being re-programmed by the official team of Dolibarr. Now just 2 months ago they changed this behavior in versions 5.X and 6.X but they did not do it completed: it is pending to finalize its full implementation. For that reason we are &amp;amp;quot;forced&amp;amp;quot; to make this patch. Try it, you will see that now the prices of the products in other currencies add well to the orders to suppliers. &amp;lt;strong&amp;gt;You must remember only that now the prices of the suppliers you are going to introduce them in the currency of the supplier&amp;lt;/strong&amp;gt; !! (Come on, which is the most logical!).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Development=&lt;br /&gt;
&lt;br /&gt;
Module developed by [https://github.com/caos30/ Sergi Rodrigues] for &#039;&#039;&#039;BIMEX.tech&#039;&#039;&#039; on 2017.&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesMulticurrency_es.png&amp;diff=38010</id>
		<title>File:DoliPurchasesMulticurrency es.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesMulticurrency_es.png&amp;diff=38010"/>
		<updated>2017-12-06T03:09:45Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesQuotationForm2_es.png&amp;diff=38009</id>
		<title>File:DoliPurchasesQuotationForm2 es.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesQuotationForm2_es.png&amp;diff=38009"/>
		<updated>2017-12-06T03:08:29Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesQuotationForm1_es.png&amp;diff=38008</id>
		<title>File:DoliPurchasesQuotationForm1 es.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesQuotationForm1_es.png&amp;diff=38008"/>
		<updated>2017-12-06T03:07:44Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesSendRequestEmail_es.png&amp;diff=38007</id>
		<title>File:DoliPurchasesSendRequestEmail es.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesSendRequestEmail_es.png&amp;diff=38007"/>
		<updated>2017-12-06T03:06:37Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Purchases&amp;diff=38006</id>
		<title>Module Purchases</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Purchases&amp;diff=38006"/>
		<updated>2017-12-06T03:04:13Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: Fixing some paragraphs formatting issues.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Complementary modules]]&lt;br /&gt;
[[Category:Product]]&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
= Informations =&lt;br /&gt;
{{TemplateModuleInfo&lt;br /&gt;
|modulename=Purchases&lt;br /&gt;
|editor=BIMEX.TECH&lt;br /&gt;
|webbuy=[https://www.dolistore.com/en/modules/865-Purchases.html Dolistore]&lt;br /&gt;
|status=stable&lt;br /&gt;
|version=1.4&lt;br /&gt;
|minversion=5.x&lt;br /&gt;
|maxversion=6.x&lt;br /&gt;
|note=Last version 1.4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Features =&lt;br /&gt;
&lt;br /&gt;
Interface translated to these languages: &amp;lt;strong&amp;gt;English / French / Catalan / Castillian (spanish) / Polish&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This Purchases module has been developed as an assistant that allows us to quickly and easily make the purchase of X products:&lt;br /&gt;
&lt;br /&gt;
* Being able to &#039;&#039;&#039;compare prices from several suppliers&#039;&#039;&#039;, even in &#039;&#039;&#039;different currencies&#039;&#039;&#039;.&lt;br /&gt;
* Being able to send by mail with a single click &#039;&#039;&#039;invitations to our selected suppliers&#039;&#039;&#039; to visit a link with which they access a simple &#039;&#039;&#039;multi-language form&#039;&#039;&#039; in which they can capture the prices for us, decline or confirm the sale of any of the requested products, and add some extra comment about delivery and/or payment conditions.&lt;br /&gt;
* Being able to &#039;&#039;&#039;modify / add / remove prices&#039;&#039;&#039; from any supplier to any product from that same price table, with just two clicks.&lt;br /&gt;
* Being able to create the corresponding &#039;&#039;&#039;orders also with two clicks&#039;&#039;&#039;, filling automatically with all the information of each supplier and the products.&lt;br /&gt;
&lt;br /&gt;
In short, an interface easier and more agile to use, that allows you to do the same thing that you can already do with the native Dolibarr interface but in a much more comfortable way. Well, in Dolibarr it would be very difficult to compare the prices of each product for each supplier and then assemble the different orders. And obviously there is no way to suppliers capture the prices you need.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: &#039;&#039;&#039;given that Dolibarr has an incomplete treatment and in some points incongrant  handling different currencies (EUR, USD, MXN, MAD, etc ...) for the prices of the products, there has been no choice but to implement a small &#039;&#039;&#039;patching of Dolibarr&#039;&#039;&#039; . At the end of this guide we explain how to do it (it is a simple copy and paste of no more than 20 lines of code in a single PHP file on Dolibarr core). But it is necessary that before you continue reading you know that if you want this &#039;&#039;&#039;Purchases module&#039;&#039;&#039; to work well in a multi-currency environment you will have to do that patching of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
= Install =&lt;br /&gt;
&lt;br /&gt;
To install a module in Dolibar is as simple as:&lt;br /&gt;
&lt;br /&gt;
* Download the archive file of module (.zip file) from web site [https://www.dolistore.com/en/modules/865-Purchases.html DoliStore.com]&lt;br /&gt;
* Create the directory: &#039;&#039;&#039;/htdocs/purchases&#039;&#039;&#039; into the root of Dolibarr.&lt;br /&gt;
* Put the content of the ZIP file into that directory&lt;br /&gt;
* On your Dolibarr panel enable the module: &#039;&#039;&#039;Setup -&amp;amp;gt; Modules&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once you have done it, it will appear in the configuration of the modules, in the Dolibarr panel. In the case of this module, you will see it in the &amp;lt;u&amp;gt;Supplier Relationship Management (SRM)&amp;lt;/u&amp;gt; group, with the name &amp;lt;u&amp;gt;Purchases&amp;lt;/u&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesSetupModules.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
== Accessing the module ==&lt;br /&gt;
&lt;br /&gt;
Once activated, we will reach it in two possible ways:&lt;br /&gt;
&lt;br /&gt;
* Visiting the &amp;lt;u&amp;gt;Commercial&amp;lt;/u&amp;gt; section, and then in the left side menu we will see the two options for this module: &amp;lt;u&amp;gt;New purchase&amp;lt;/u&amp;gt; / &amp;lt;u&amp;gt;List&amp;lt;/u&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesLeftMenu.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Or, from the &amp;lt;u&amp;gt;Dashboard&amp;lt;/u&amp;gt;, where we will have a box with the &amp;lt;u&amp;gt;Last 5 purchases&amp;lt;/u&amp;gt;.&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesBoxLatestPurchases.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Purchase list ==&lt;br /&gt;
&lt;br /&gt;
There is not much to say about the list of purchase processes. The most interesting thing is to explain the possible values for the &amp;lt;u&amp;gt;Status&amp;lt;/u&amp;gt; column:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;strong&amp;gt;Draft&amp;lt;/strong&amp;gt;: when we only have a list of products to buy&lt;br /&gt;
* &amp;lt;strong&amp;gt;Quoting&amp;lt;/strong&amp;gt;: when we have prices of one or more suppliers for some of the products to buy&lt;br /&gt;
* &amp;lt;strong&amp;gt;Buying&amp;lt;/strong&amp;gt;: when at least one price has already been selected for some of the products and the corresponding purchase order has been created&lt;br /&gt;
* &amp;lt;strong&amp;gt;Completed&amp;lt;/strong&amp;gt;: when purchase orders have already been created for all products&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesListPurchases.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Editing a purchase ==&lt;br /&gt;
&lt;br /&gt;
The card of a not-completed purchase would look like the one shown below (click to open in another tab of the browser and see the detail):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesEditPurchase.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* At the top of the form there is a brief form with only the minimum descriptive information, of which it is worth noting that we can &amp;lt;strong&amp;gt;link the purchase to a project&amp;lt;/strong&amp;gt; that we have created in Dolibarr, if we have activated the &amp;lt;u&amp;gt;Projects module&amp;lt;/u&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* Below of that short form, there is an action button bar, to change record changes in that form, to send quotation requests by mail to the selected suppliers, to create orders or to eliminate the purchase:&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesEditButtons.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Under these buttons we have the &amp;lt;strong&amp;gt;list of products&amp;lt;/strong&amp;gt;: a table where each row will contain a product to buy and a &amp;lt;strong&amp;gt;table comparing prices&amp;lt;/strong&amp;gt; of one or more suppliers. In the first line we have the &amp;lt;strong&amp;gt;status of this product&amp;lt;/strong&amp;gt;: 1) without prices, 2) with prices but without order, 3) created an order.&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesEditLine.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Also, until we place an order, we can change the amount we need to buy. The buttons at the end of the line allow us to: [[File:DoliPurchasesButton_Del.png]] remove the product from this purchase process, [[File:DoliPurchasesButton_Save.png]] save changes (if we modify any value in any of the text boxes in this row of the table), [[File:DoliPurchasesButton_Stock.png]] access the product stock management page in Dolibarr just for this product and supplier.&lt;br /&gt;
&amp;lt;strong&amp;gt;Note:&amp;lt;/strong&amp;gt; It is important to understand that we can change the values of the text boxes of this price table, that is, change the quantity of the product, the unit price or the minimum number of units that the supplier requires us to buy, and the page will automatically recalculate in real time the final price in the last column, in the currency of our company, but &amp;lt;strong&amp;gt;these changes will not be saved&amp;lt;/strong&amp;gt; in the server (!!). So if we want to save the changes we have to click the button to save changes [[File:DoliPurchasesButton_Save.png]].&lt;br /&gt;
&lt;br /&gt;
* Let&amp;amp;#39;s look in detail at the &amp;lt;strong&amp;gt;price comparison table&amp;lt;/strong&amp;gt;:&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesPriceComparison.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;strong&amp;gt;Colors&amp;lt;/strong&amp;gt;: the text boxes will appear &amp;lt;u&amp;gt;green&amp;lt;/u&amp;gt; if the supplier in question responded to the quote request (below we will see how to make that request) and confirmed having that product in stock. Instead, they will appear in &amp;lt;u&amp;gt;orange&amp;lt;/u&amp;gt; if the request was already sent to that provider but the provider has not yet responded. Finally, it will appear in &amp;lt;u&amp;gt;red&amp;lt;/u&amp;gt; when the supplier has responded and indicated that this product can not be supplied. In the latter case, the circular control for &amp;lt;u&amp;gt;Create Order&amp;lt;/u&amp;gt; (last column of the price table) will be disabled and an icon will appear in its place that will show the comment left by the supplier.&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;strong&amp;gt;Multi-currency&amp;lt;/strong&amp;gt;: it is important to understand that this module takes &amp;lt;strong&amp;gt;the prices of the different suppliers in the currency of each supplier&amp;lt;/strong&amp;gt;. Beware, at this moment (versions of Dolibarr previous or equal to 6.X) IT IS NOT THAT way on Dolibarr!! On Dolibarr, at this moment, the prices introduced in the system ALWAYS are in the currency that we have defined in the system for our company, not the supplier currency !!!! For that reason it is necessary and convenient that you do the &amp;lt;strong&amp;gt;patching of Dolibarr&amp;lt;/strong&amp;gt; that we suggest at the end of this guide. It will simply affect how the price of a product is added to an order.&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;strong&amp;gt;Calculations&amp;lt;/strong&amp;gt;: having said that, with this module Purchases and the suggested Dolibarr patch we can handle &amp;amp;quot;normally&amp;amp;quot; supplier prices in their own currencies (first column) and at the same time be able to compare the &amp;lt;u&amp;gt;Final price&amp;lt;/u&amp;gt; (penultimate column) in our own currency (MXN in my case). Keep in mind that to calculate the &amp;lt;u&amp;gt;Final Price&amp;lt;/u&amp;gt; the &amp;lt;u&amp;gt;Unit Price&amp;lt;/u&amp;gt; is multiplied by the &amp;lt;u&amp;gt;Minimum quantity&amp;lt;/u&amp;gt; or by the number of &amp;lt;u&amp;gt;Units&amp;lt;/u&amp;gt; (whichever is greater than these two values). For example, in the case of the second supplier of the image (the orange one) we are required to buy a minimum of 5 units, so we multiply the unit price by 5 to obtain the final price. While for the other suppliers we multiply by 4, which is the number of units we need.&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;strong&amp;gt;Currency exchange rates&amp;lt;/strong&amp;gt;: currency exchange rates (ie, how many MXN are a USD) the Purchases module takes them &amp;lt;strong&amp;gt;in real time&amp;lt;/strong&amp;gt; from the &amp;lt;u&amp;gt;International Monetary Fund&amp;lt;/u&amp;gt; website (www.imf.org/external/np/fin/data/rms_rep.aspx). In fact, because we don&amp;amp;#39;t want to call too many times to that external website and not to slow down the loading of this quotation page, a query of the IMF page is made &amp;lt;strong&amp;gt;only every 12 hours&amp;lt;/strong&amp;gt;. In short, we can be quite sure that the calculation between currencies is sufficiently adjusted to reality, and works completely automatically and in the background. By the way, you should also know that once we place an order for a product, the Purchases module registers the currency changes at that moment, and in the future, when you go back to consult the card of this purchase, it will show you the table comparison of prices according to currency exchange rates at the time of placing the order. As long as there is not a created order, the exchange rates will be updated, so today you can see a price of $11USD in Mexican pesos different from the one you saw yesterday in the same table, obviously because every day the currency exchange rates fluctuate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesPriceComparison.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** [[File:DoliPurchasesButton_Del.png]] &amp;lt;strong&amp;gt;Delete button&amp;lt;/strong&amp;gt;: when clicked, it will show us a dialog box asking if we want to only remove this price from this comparison, or if &amp;lt;strong&amp;gt;we also want to eliminate the price of this supplier for this Dolibarr system product&amp;lt;/strong&amp;gt;. If you are sure that the supplier is never going to sell you that product or simply has never given you a price, it is advisable that you choose the second option.&lt;br /&gt;
&lt;br /&gt;
** [[File:DoliPurchasesButton_Edit.png]] &amp;lt;strong&amp;gt;Edit price button&amp;lt;/strong&amp;gt;: will open in a new tab of the browser the usual Dolibarr form for editing the price of this supplier for this product. What is useful for us? Well, because there we have more editing options than in our comparison table. For example, there we can edit the VAT to apply for this product.&lt;br /&gt;
&lt;br /&gt;
** [[File:DoliPurchasesButton_Mail.png]] &amp;lt;strong&amp;gt;Email button&amp;lt;/strong&amp;gt;: is a link of the type &amp;amp;quot;mailto&amp;amp;quot; and therefore will open our mailing program that we have configured on our machine, by filling in the recipient&amp;amp;#39;s box with the email address of the supplier in question. For this reason, this button does not appear when in Dolibarr we have not filled in the email field for the supplier in question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesPriceComparison.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Create order&amp;lt;/strong&amp;gt;: finally, when we already have the prices that we were expecting from the different suppliers, or when we need to make an order, we will mark the circular box in the last column &amp;lt;u&amp;gt;Create order&amp;lt;/u&amp;gt;. Actually, the way of working is like this: for each of the products that we have included in this purchase we will mark the offers of the suppliers that seem most appropriate. And without having to make that choice for all products, click on the button &amp;lt;u&amp;gt;Create orders&amp;lt;/u&amp;gt; that are on top of the product table, and the page will display a new table with the orders to be created for each supplier, if there were several suppliers selected, and the products to ask each one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesOnclickCreateOrders.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we press the &amp;lt;u&amp;gt;Create Orders&amp;lt;/u&amp;gt; button again, the dialog box will hide, and if we do it again it will be displayed again but &amp;lt;strong&amp;gt;updated&amp;lt;/strong&amp;gt;. That is, if between both clicks we have changed our supplier selection for a product, &amp;lt;strong&amp;gt;this list of orders / suppliers will be updated&amp;lt;/strong&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
When we press any of the buttons &amp;lt;u&amp;gt;Create order&amp;lt;/u&amp;gt; in the &amp;lt;u&amp;gt;Action&amp;lt;/u&amp;gt; column, the Purchases module will create the corresponding order in &amp;lt;strong&amp;gt;draft mode&amp;lt;/strong&amp;gt;, filling in the information of the supplier, of the exchange rate of currency (if it was in a currency different from that of our company) and the list of products and quantities that we need to buy. &amp;lt;strong&amp;gt;The new order will open in a new browser tab&amp;lt;/strong&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Once an order has been created in this way, by refreshing this page of the purchase, we will see that &amp;lt;strong&amp;gt;the comparative table of prices of the ordered products has been disabled&amp;lt;/strong&amp;gt; and a button appears that gives us access to the card of that order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesOrderedProduct.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Request quotations to suppliers ==&lt;br /&gt;
&lt;br /&gt;
The first thing to note is that this Purchases module does not use the native functionality of &amp;lt;u&amp;gt;Request for quotations from suppliers&amp;lt;/u&amp;gt; that &amp;lt;strong&amp;gt;Dolibarr brings natively&amp;lt;/strong&amp;gt;. It has chosen to build our own solution to avoid problems in Dolibarr related to the multi-currency. So, you will see below that the system we have built is highly functional, multi-currency and multi-language, but does not create any record in Dolibarr for supplier quotes.&lt;br /&gt;
&lt;br /&gt;
Having said that, we must proceed in this way:&lt;br /&gt;
&lt;br /&gt;
* once in our purchase we have built the list of products to buy&lt;br /&gt;
&lt;br /&gt;
* the system will automatically have added the prices of the suppliers that already exist in our system for those products&lt;br /&gt;
&lt;br /&gt;
* optionally, we can add more suppliers to a specific product (you can indicate as price &amp;quot;0&amp;quot; if you still do not have the price of these products)&lt;br /&gt;
&lt;br /&gt;
* then pressing the button &amp;lt;u&amp;gt;Send emails requesting quotation&amp;lt;/u&amp;gt; will display a dialog box, from where with a single click on the new button &amp;lt;u&amp;gt;Send emails requesting quotation&amp;lt;/u&amp;gt; these emails will be sent, at least to the suppliers for whom we have defined an email address. In the case of the picture below, only the first one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesMassiveSendEmailRequests.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In that email that the suppliers will receive they are specified IN THEIR LANGUAGE (while the Purchases module is translated in that language) the &amp;lt;b&amp;gt;list of products&amp;lt;/b&amp;gt; that we are interested to be quoted to and &amp;lt;b&amp;gt;they are invited to visit a web form&amp;lt;/b&amp;gt; where they can capture the prices themselves and terms. &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;strong&amp;gt;We can visit this quotation web form&amp;lt;/strong&amp;gt; by clicking on the &amp;lt;u&amp;gt;Form&amp;lt;/u&amp;gt; buttons in the previous dialog box. &amp;lt;strong&amp;gt;Each form is unique for each purchase and supplier, and the parameters of the URL are encrypted&amp;lt;/strong&amp;gt; to prevent them from manipulating the URL and accessing the prices of other suppliers. &lt;br /&gt;
It is recommended that if the provider in question does not have email or send us their prices by other channels (phone, whatsapp, mail, etc ...) &amp;lt;strong&amp;gt;we should use the corresponding capture web form to enter the prices&amp;lt;/strong&amp;gt; of this supplier for this purchase. In this way, we will see them marked in green (or in red, in case you do not have a product) in the price comparison table of this module.&lt;br /&gt;
&lt;br /&gt;
* This is how the web form for capturing prices for the provider looks:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesQuotationForm1.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It does not need many comments, because &amp;lt;strong&amp;gt;it has been intended to be self-explanatory&amp;lt;/strong&amp;gt; so that providers feel as comfortable as possible. If we click on the &amp;lt;u&amp;gt;Extra information&amp;lt;/u&amp;gt; button, the supplier has the option of adding a general comment on this &amp;amp;quot;possible order&amp;amp;quot;, and can also provide us with more complete contact information. But it is an optional step:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesQuotationForm2.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Note:&amp;lt;/strong&amp;gt; At the moment that we place an order that includes any of these products, either for this supplier or for another of our list, &amp;lt;strong&amp;gt;the introduction of prices will be blocked&amp;lt;/strong&amp;gt; in the corresponding rows of this price table, if the supplier is late, or enter later to visit this form.&lt;br /&gt;
&lt;br /&gt;
After the supplier clicks on the &amp;lt;u&amp;gt;Submit&amp;lt;/u&amp;gt; button of that quote form &amp;lt;strong&amp;gt;the system will send an email&amp;lt;/strong&amp;gt; to the Dolibarr user who created that purchase in the system, with the prices and with the comments of the supplier. Information that on the other hand is shown in the comparative price table of the module. &amp;lt;strong&amp;gt;These prices also change the prices we have stored in Dolibarr&amp;lt;/strong&amp;gt; for those products and that supplier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Patching of Dolibarr (5.X to 6.X) ==&lt;br /&gt;
&lt;br /&gt;
This small patching of Dolibarr is necessary &amp;lt;strong&amp;gt;if in your Dolibarr you have activated the &amp;amp;quot;multi-currency&amp;amp;quot; module&amp;lt;/strong&amp;gt;, that is, if you are going to have suppliers or clients that handle different currencies to your company:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesMulticurrency.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, you must edit the following file of your Dolibarr:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/htdocs/fourn/class/fournisseur.commande.class.php&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
locate line &#039;&#039;&#039;#1467&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$tabprice = calcul_price_total($qty, $pu, ... ... ... );&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and on top of that line you must paste these others:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// == reverse prices if the supplier currency don&amp;amp;#39;t match the order currency&lt;br /&gt;
	// == get the supplier currency&lt;br /&gt;
		$supplier_currency = &amp;amp;#39;&amp;amp;#39;;&lt;br /&gt;
		$sql = &amp;amp;quot;SELECT * FROM &amp;amp;quot;.MAIN_DB_PREFIX.&amp;amp;quot;product_fournisseur_price as pr &amp;amp;quot;&lt;br /&gt;
			   .&amp;amp;quot; LEFT JOIN &amp;amp;quot;.MAIN_DB_PREFIX.&amp;amp;quot;societe as supp &amp;amp;quot;&lt;br /&gt;
			   .&amp;amp;quot; ON pr.fk_soc = supp.rowid&amp;amp;quot;&lt;br /&gt;
			   .&amp;amp;quot; WHERE pr.rowid=&amp;amp;quot;.$fk_prod_fourn_price;&lt;br /&gt;
		$resql = $this-&amp;amp;gt;db-&amp;amp;gt;query($sql);&lt;br /&gt;
		if ($resql) {&lt;br /&gt;
			while($row = $resql-&amp;amp;gt;fetch_assoc()) &lt;br /&gt;
				$supplier_currency = $row[&amp;amp;#39;multicurrency_code&amp;amp;#39;];&lt;br /&gt;
		}&lt;br /&gt;
	// == decide if to invert prices&lt;br /&gt;
		if ($supplier_currency != $conf-&amp;amp;gt;currency){&lt;br /&gt;
			$pu_ht_devise = $pu;&lt;br /&gt;
			$pu = round($pu_ht_devise / $this-&amp;amp;gt;multicurrency_tx , 4);&lt;br /&gt;
		}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Explanation:&amp;lt;/strong&amp;gt; the supplier&amp;amp;#39;s currency is found, and if it does not match the system&amp;amp;#39;s (our company&amp;amp;#39;s) currency, then we exchange the values ​​of the price in the currency supposedly of the supplier and the currency of the system, to &amp;amp;quot;deceive&amp;amp;quot; Dolibarr. Keep in mind that with this patch &amp;lt;strong&amp;gt;we are hacking the native Dolibarr function that adds a product to an order&amp;lt;/strong&amp;gt;, but believe me, it is the best solution at this time when this issue of the multi-currency is being re-programmed by the official team of Dolibarr. Now just 2 months ago they changed this behavior in versions 5.X and 6.X but they did not do it completed: it is pending to finalize its full implementation. For that reason we are &amp;amp;quot;forced&amp;amp;quot; to make this patch. Try it, you will see that now the prices of the products in other currencies add well to the orders to suppliers. &amp;lt;strong&amp;gt;You must remember only that now the prices of the suppliers you are going to introduce them in the currency of the supplier&amp;lt;/strong&amp;gt; !! (Come on, which is the most logical!).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Development =&lt;br /&gt;
&lt;br /&gt;
Module developed by [https://github.com/caos30/ Sergi Rodrigues] for &#039;&#039;&#039;BIMEX.tech&#039;&#039;&#039; on 2017.&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Purchases&amp;diff=38005</id>
		<title>Module Purchases</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Purchases&amp;diff=38005"/>
		<updated>2017-12-06T03:00:54Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: There was a mistake on my first publication of this article: i miss some points on Request quotations to suppliers section.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Complementary modules]]&lt;br /&gt;
[[Category:Product]]&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
= Informations =&lt;br /&gt;
{{TemplateModuleInfo&lt;br /&gt;
|modulename=Purchases&lt;br /&gt;
|editor=BIMEX.TECH&lt;br /&gt;
|webbuy=[https://www.dolistore.com/en/modules/865-Purchases.html Dolistore]&lt;br /&gt;
|status=stable&lt;br /&gt;
|version=1.4&lt;br /&gt;
|minversion=5.x&lt;br /&gt;
|maxversion=6.x&lt;br /&gt;
|note=Last version 1.4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Features =&lt;br /&gt;
&lt;br /&gt;
Interface translated to these languages: &amp;lt;strong&amp;gt;English / French / Catalan / Castillian (spanish) / Polish&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This Purchases module has been developed as an assistant that allows us to quickly and easily make the purchase of X products:&lt;br /&gt;
&lt;br /&gt;
* Being able to &#039;&#039;&#039;compare prices from several suppliers&#039;&#039;&#039;, even in &#039;&#039;&#039;different currencies&#039;&#039;&#039;.&lt;br /&gt;
* Being able to send by mail with a single click &#039;&#039;&#039;invitations to our selected suppliers&#039;&#039;&#039; to visit a link with which they access a simple &#039;&#039;&#039;multi-language form&#039;&#039;&#039; in which they can capture the prices for us, decline or confirm the sale of any of the requested products, and add some extra comment about delivery and/or payment conditions.&lt;br /&gt;
* Being able to &#039;&#039;&#039;modify / add / remove prices&#039;&#039;&#039; from any supplier to any product from that same price table, with just two clicks.&lt;br /&gt;
* Being able to create the corresponding &#039;&#039;&#039;orders also with two clicks&#039;&#039;&#039;, filling automatically with all the information of each supplier and the products.&lt;br /&gt;
&lt;br /&gt;
In short, an interface easier and more agile to use, that allows you to do the same thing that you can already do with the native Dolibarr interface but in a much more comfortable way. Well, in Dolibarr it would be very difficult to compare the prices of each product for each supplier and then assemble the different orders. And obviously there is no way to suppliers capture the prices you need.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: &#039;&#039;&#039;given that Dolibarr has an incomplete treatment and in some points incongrant  handling different currencies (EUR, USD, MXN, MAD, etc ...) for the prices of the products, there has been no choice but to implement a small &#039;&#039;&#039;patching of Dolibarr&#039;&#039;&#039; . At the end of this guide we explain how to do it (it is a simple copy and paste of no more than 20 lines of code in a single PHP file on Dolibarr core). But it is necessary that before you continue reading you know that if you want this &#039;&#039;&#039;Purchases module&#039;&#039;&#039; to work well in a multi-currency environment you will have to do that patching of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
= Install =&lt;br /&gt;
&lt;br /&gt;
To install a module in Dolibar is as simple as:&lt;br /&gt;
&lt;br /&gt;
* Download the archive file of module (.zip file) from web site [https://www.dolistore.com/en/modules/865-Purchases.html DoliStore.com]&lt;br /&gt;
* Create the directory: &#039;&#039;&#039;/htdocs/purchases&#039;&#039;&#039; into the root of Dolibarr.&lt;br /&gt;
* Put the content of the ZIP file into that directory&lt;br /&gt;
* On your Dolibarr panel enable the module: &#039;&#039;&#039;Setup -&amp;amp;gt; Modules&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once you have done it, it will appear in the configuration of the modules, in the Dolibarr panel. In the case of this module, you will see it in the &amp;lt;u&amp;gt;Supplier Relationship Management (SRM)&amp;lt;/u&amp;gt; group, with the name &amp;lt;u&amp;gt;Purchases&amp;lt;/u&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesSetupModules.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
== Accessing the module ==&lt;br /&gt;
&lt;br /&gt;
Once activated, we will reach it in two possible ways:&lt;br /&gt;
&lt;br /&gt;
* Visiting the &amp;lt;u&amp;gt;Commercial&amp;lt;/u&amp;gt; section, and then in the left side menu we will see the two options for this module: &amp;lt;u&amp;gt;New purchase&amp;lt;/u&amp;gt; / &amp;lt;u&amp;gt;List&amp;lt;/u&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesLeftMenu.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Or, from the &amp;lt;u&amp;gt;Dashboard&amp;lt;/u&amp;gt;, where we will have a box with the &amp;lt;u&amp;gt;Last 5 purchases&amp;lt;/u&amp;gt;.&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesBoxLatestPurchases.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Purchase list ==&lt;br /&gt;
&lt;br /&gt;
There is not much to say about the list of purchase processes. The most interesting thing is to explain the possible values for the &amp;lt;u&amp;gt;Status&amp;lt;/u&amp;gt; column:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;strong&amp;gt;Draft&amp;lt;/strong&amp;gt;: when we only have a list of products to buy&lt;br /&gt;
* &amp;lt;strong&amp;gt;Quoting&amp;lt;/strong&amp;gt;: when we have prices of one or more suppliers for some of the products to buy&lt;br /&gt;
* &amp;lt;strong&amp;gt;Buying&amp;lt;/strong&amp;gt;: when at least one price has already been selected for some of the products and the corresponding purchase order has been created&lt;br /&gt;
* &amp;lt;strong&amp;gt;Completed&amp;lt;/strong&amp;gt;: when purchase orders have already been created for all products&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesListPurchases.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Editing a purchase ==&lt;br /&gt;
&lt;br /&gt;
The card of a not-completed purchase would look like the one shown below (click to open in another tab of the browser and see the detail):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesEditPurchase.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* At the top of the form there is a brief form with only the minimum descriptive information, of which it is worth noting that we can &amp;lt;strong&amp;gt;link the purchase to a project&amp;lt;/strong&amp;gt; that we have created in Dolibarr, if we have activated the &amp;lt;u&amp;gt;Projects module&amp;lt;/u&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* Below of that short form, there is an action button bar, to change record changes in that form, to send quotation requests by mail to the selected suppliers, to create orders or to eliminate the purchase:&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesEditButtons.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Under these buttons we have the &amp;lt;strong&amp;gt;list of products&amp;lt;/strong&amp;gt;: a table where each row will contain a product to buy and a &amp;lt;strong&amp;gt;table comparing prices&amp;lt;/strong&amp;gt; of one or more suppliers. In the first line we have the &amp;lt;strong&amp;gt;status of this product&amp;lt;/strong&amp;gt;: 1) without prices, 2) with prices but without order, 3) created an order.&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesEditLine.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Also, until we place an order, we can change the amount we need to buy. The buttons at the end of the line allow us to: [[File:DoliPurchasesButton_Del.png]] remove the product from this purchase process, [[File:DoliPurchasesButton_Save.png]] save changes (if we modify any value in any of the text boxes in this row of the table), [[File:DoliPurchasesButton_Stock.png]] access the product stock management page in Dolibarr just for this product and supplier.&lt;br /&gt;
&amp;lt;strong&amp;gt;Note:&amp;lt;/strong&amp;gt; It is important to understand that we can change the values of the text boxes of this price table, that is, change the quantity of the product, the unit price or the minimum number of units that the supplier requires us to buy, and the page will automatically recalculate in real time the final price in the last column, in the currency of our company, but &amp;lt;strong&amp;gt;these changes will not be saved&amp;lt;/strong&amp;gt; in the server (!!). So if we want to save the changes we have to click the button to save changes [[File:DoliPurchasesButton_Save.png]].&lt;br /&gt;
&lt;br /&gt;
* Let&amp;amp;#39;s look in detail at the &amp;lt;strong&amp;gt;price comparison table&amp;lt;/strong&amp;gt;:&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesPriceComparison.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;strong&amp;gt;Colors&amp;lt;/strong&amp;gt;: the text boxes will appear &amp;lt;u&amp;gt;green&amp;lt;/u&amp;gt; if the supplier in question responded to the quote request (below we will see how to make that request) and confirmed having that product in stock. Instead, they will appear in &amp;lt;u&amp;gt;orange&amp;lt;/u&amp;gt; if the request was already sent to that provider but the provider has not yet responded. Finally, it will appear in &amp;lt;u&amp;gt;red&amp;lt;/u&amp;gt; when the supplier has responded and indicated that this product can not be supplied. In the latter case, the circular control for &amp;lt;u&amp;gt;Create Order&amp;lt;/u&amp;gt; (last column of the price table) will be disabled and an icon will appear in its place that will show the comment left by the supplier.&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;strong&amp;gt;Multi-currency&amp;lt;/strong&amp;gt;: it is important to understand that this module takes &amp;lt;strong&amp;gt;the prices of the different suppliers in the currency of each supplier&amp;lt;/strong&amp;gt;. Beware, at this moment (versions of Dolibarr previous or equal to 6.X) IT IS NOT THAT way on Dolibarr!! On Dolibarr, at this moment, the prices introduced in the system ALWAYS are in the currency that we have defined in the system for our company, not the supplier currency !!!! For that reason it is necessary and convenient that you do the &amp;lt;strong&amp;gt;patching of Dolibarr&amp;lt;/strong&amp;gt; that we suggest at the end of this guide. It will simply affect how the price of a product is added to an order.&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;strong&amp;gt;Calculations&amp;lt;/strong&amp;gt;: having said that, with this module Purchases and the suggested Dolibarr patch we can handle &amp;amp;quot;normally&amp;amp;quot; supplier prices in their own currencies (first column) and at the same time be able to compare the &amp;lt;u&amp;gt;Final price&amp;lt;/u&amp;gt; (penultimate column) in our own currency (MXN in my case). Keep in mind that to calculate the &amp;lt;u&amp;gt;Final Price&amp;lt;/u&amp;gt; the &amp;lt;u&amp;gt;Unit Price&amp;lt;/u&amp;gt; is multiplied by the &amp;lt;u&amp;gt;Minimum quantity&amp;lt;/u&amp;gt; or by the number of &amp;lt;u&amp;gt;Units&amp;lt;/u&amp;gt; (whichever is greater than these two values). For example, in the case of the second supplier of the image (the orange one) we are required to buy a minimum of 5 units, so we multiply the unit price by 5 to obtain the final price. While for the other suppliers we multiply by 4, which is the number of units we need.&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;strong&amp;gt;Currency exchange rates&amp;lt;/strong&amp;gt;: currency exchange rates (ie, how many MXN are a USD) the Purchases module takes them &amp;lt;strong&amp;gt;in real time&amp;lt;/strong&amp;gt; from the &amp;lt;u&amp;gt;International Monetary Fund&amp;lt;/u&amp;gt; website (www.imf.org/external/np/fin/data/rms_rep.aspx). In fact, because we don&amp;amp;#39;t want to call too many times to that external website and not to slow down the loading of this quotation page, a query of the IMF page is made &amp;lt;strong&amp;gt;only every 12 hours&amp;lt;/strong&amp;gt;. In short, we can be quite sure that the calculation between currencies is sufficiently adjusted to reality, and works completely automatically and in the background. By the way, you should also know that once we place an order for a product, the Purchases module registers the currency changes at that moment, and in the future, when you go back to consult the card of this purchase, it will show you the table comparison of prices according to currency exchange rates at the time of placing the order. As long as there is not a created order, the exchange rates will be updated, so today you can see a price of $11USD in Mexican pesos different from the one you saw yesterday in the same table, obviously because every day the currency exchange rates fluctuate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesPriceComparison.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** [[File:DoliPurchasesButton_Del.png]] &amp;lt;strong&amp;gt;Delete button&amp;lt;/strong&amp;gt;: when clicked, it will show us a dialog box asking if we want to only remove this price from this comparison, or if &amp;lt;strong&amp;gt;we also want to eliminate the price of this supplier for this Dolibarr system product&amp;lt;/strong&amp;gt;. If you are sure that the supplier is never going to sell you that product or simply has never given you a price, it is advisable that you choose the second option.&lt;br /&gt;
&lt;br /&gt;
** [[File:DoliPurchasesButton_Edit.png]] &amp;lt;strong&amp;gt;Edit price button&amp;lt;/strong&amp;gt;: will open in a new tab of the browser the usual Dolibarr form for editing the price of this supplier for this product. What is useful for us? Well, because there we have more editing options than in our comparison table. For example, there we can edit the VAT to apply for this product.&lt;br /&gt;
&lt;br /&gt;
** [[File:DoliPurchasesButton_Mail.png]] &amp;lt;strong&amp;gt;Email button&amp;lt;/strong&amp;gt;: is a link of the type &amp;amp;quot;mailto&amp;amp;quot; and therefore will open our mailing program that we have configured on our machine, by filling in the recipient&amp;amp;#39;s box with the email address of the supplier in question. For this reason, this button does not appear when in Dolibarr we have not filled in the email field for the supplier in question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesPriceComparison.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Create order&amp;lt;/strong&amp;gt;: finally, when we already have the prices that we were expecting from the different suppliers, or when we need to make an order, we will mark the circular box in the last column &amp;lt;u&amp;gt;Create order&amp;lt;/u&amp;gt;. Actually, the way of working is like this: for each of the products that we have included in this purchase we will mark the offers of the suppliers that seem most appropriate. And without having to make that choice for all products, click on the button &amp;lt;u&amp;gt;Create orders&amp;lt;/u&amp;gt; that are on top of the product table, and the page will display a new table with the orders to be created for each supplier, if there were several suppliers selected, and the products to ask each one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesOnclickCreateOrders.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we press the &amp;lt;u&amp;gt;Create Orders&amp;lt;/u&amp;gt; button again, the dialog box will hide, and if we do it again it will be displayed again but &amp;lt;strong&amp;gt;updated&amp;lt;/strong&amp;gt;. That is, if between both clicks we have changed our supplier selection for a product, &amp;lt;strong&amp;gt;this list of orders / suppliers will be updated&amp;lt;/strong&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
When we press any of the buttons &amp;lt;u&amp;gt;Create order&amp;lt;/u&amp;gt; in the &amp;lt;u&amp;gt;Action&amp;lt;/u&amp;gt; column, the Purchases module will create the corresponding order in &amp;lt;strong&amp;gt;draft mode&amp;lt;/strong&amp;gt;, filling in the information of the supplier, of the exchange rate of currency (if it was in a currency different from that of our company) and the list of products and quantities that we need to buy. &amp;lt;strong&amp;gt;The new order will open in a new browser tab&amp;lt;/strong&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Once an order has been created in this way, by refreshing this page of the purchase, we will see that &amp;lt;strong&amp;gt;the comparative table of prices of the ordered products has been disabled&amp;lt;/strong&amp;gt; and a button appears that gives us access to the card of that order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesOrderedProduct.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Request quotations to suppliers ==&lt;br /&gt;
&lt;br /&gt;
The first thing to note is that this Purchases module does not use the native functionality of &amp;lt;u&amp;gt;Request for quotations from suppliers&amp;lt;/u&amp;gt; that &amp;lt;strong&amp;gt;Dolibarr brings natively&amp;lt;/strong&amp;gt;. It has chosen to build our own solution to avoid problems in Dolibarr related to the multi-currency. So, you will see below that the system we have built is highly functional, multi-currency and multi-language, but does not create any record in Dolibarr for supplier quotes.&lt;br /&gt;
&lt;br /&gt;
Having said that, we must proceed in this way:&lt;br /&gt;
&lt;br /&gt;
* once in our purchase we have built the list of products to buy&lt;br /&gt;
&lt;br /&gt;
* the system will automatically have added the prices of the suppliers that already exist in our system for those products&lt;br /&gt;
&lt;br /&gt;
* optionally, we can add more suppliers to a specific product (you can indicate as price &amp;quot;0&amp;quot; if you still do not have the price of these products)&lt;br /&gt;
&lt;br /&gt;
* then pressing the button &amp;lt;u&amp;gt;Send emails requesting quotation&amp;lt;/u&amp;gt; will display a dialog box, from where with a single click on the new button &amp;lt;u&amp;gt;Send emails requesting quotation&amp;lt;/u&amp;gt; these emails will be sent, at least to the suppliers for whom we have defined an email address. In the case of the picture below, only the first one.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesMassiveSendEmailRequests.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In that email that the suppliers will receive they are specified IN THEIR LANGUAGE (while the Purchases module is translated in that language) the &amp;lt;b&amp;gt;list of products&amp;lt;/b&amp;gt; that we are interested to be quoted to and &amp;lt;b&amp;gt;they are invited to visit a web form&amp;lt;/b&amp;gt; where they can capture the prices themselves and terms. &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;strong&amp;gt;We can visit this quotation web form&amp;lt;/strong&amp;gt; by clicking on the &amp;lt;u&amp;gt;Form&amp;lt;/u&amp;gt; buttons in the previous dialog box. &amp;lt;strong&amp;gt;Each form is unique for each purchase and supplier, and the parameters of the URL are encrypted&amp;lt;/strong&amp;gt; to prevent them from manipulating the URL and accessing the prices of other suppliers. &lt;br /&gt;
 It is recommended that if the provider in question does not have email or send us their prices by other channels (phone, whatsapp, mail, etc ...) &amp;lt;strong&amp;gt;we should use the corresponding capture web form to enter the prices&amp;lt;/strong&amp;gt; of this supplier for this purchase. In this way, we will see them marked in green (or in red, in case you do not have a product) in the price comparison table of this module.&lt;br /&gt;
&lt;br /&gt;
* This is how the web form for capturing prices for the provider looks:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesQuotationForm1.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 It does not need many comments, because &amp;lt;strong&amp;gt;it has been intended to be self-explanatory&amp;lt;/strong&amp;gt; so that providers feel as comfortable as possible. If we click on the &amp;lt;u&amp;gt;Extra information&amp;lt;/u&amp;gt; button, the supplier has the option of adding a general comment on this &amp;amp;quot;possible order&amp;amp;quot;, and can also provide us with more complete contact information. But it is an optional step:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesQuotationForm2.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Note:&amp;lt;/strong&amp;gt; At the moment that we place an order that includes any of these products, either for this supplier or for another of our list, &amp;lt;strong&amp;gt;the introduction of prices will be blocked&amp;lt;/strong&amp;gt; in the corresponding rows of this price table, if the supplier is late, or enter later to visit this form.&lt;br /&gt;
&lt;br /&gt;
After the supplier clicks on the &amp;lt;u&amp;gt;Submit&amp;lt;/u&amp;gt; button of that quote form &amp;lt;strong&amp;gt;the system will send an email&amp;lt;/strong&amp;gt; to the Dolibarr user who created that purchase in the system, with the prices and with the comments of the supplier. Information that on the other hand is shown in the comparative price table of the module. &amp;lt;strong&amp;gt;These prices also change the prices we have stored in Dolibarr&amp;lt;/strong&amp;gt; for those products and that supplier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Patching of Dolibarr (5.X to 6.X) ==&lt;br /&gt;
&lt;br /&gt;
This small patching of Dolibarr is necessary &amp;lt;strong&amp;gt;if in your Dolibarr you have activated the &amp;amp;quot;multi-currency&amp;amp;quot; module&amp;lt;/strong&amp;gt;, that is, if you are going to have suppliers or clients that handle different currencies to your company:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesMulticurrency.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, you must edit the following file of your Dolibarr:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/htdocs/fourn/class/fournisseur.commande.class.php&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
locate line &#039;&#039;&#039;#1467&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$tabprice = calcul_price_total($qty, $pu, ... ... ... );&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and on top of that line you must paste these others:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// == reverse prices if the supplier currency don&amp;amp;#39;t match the order currency&lt;br /&gt;
	// == get the supplier currency&lt;br /&gt;
		$supplier_currency = &amp;amp;#39;&amp;amp;#39;;&lt;br /&gt;
		$sql = &amp;amp;quot;SELECT * FROM &amp;amp;quot;.MAIN_DB_PREFIX.&amp;amp;quot;product_fournisseur_price as pr &amp;amp;quot;&lt;br /&gt;
			   .&amp;amp;quot; LEFT JOIN &amp;amp;quot;.MAIN_DB_PREFIX.&amp;amp;quot;societe as supp &amp;amp;quot;&lt;br /&gt;
			   .&amp;amp;quot; ON pr.fk_soc = supp.rowid&amp;amp;quot;&lt;br /&gt;
			   .&amp;amp;quot; WHERE pr.rowid=&amp;amp;quot;.$fk_prod_fourn_price;&lt;br /&gt;
		$resql = $this-&amp;amp;gt;db-&amp;amp;gt;query($sql);&lt;br /&gt;
		if ($resql) {&lt;br /&gt;
			while($row = $resql-&amp;amp;gt;fetch_assoc()) &lt;br /&gt;
				$supplier_currency = $row[&amp;amp;#39;multicurrency_code&amp;amp;#39;];&lt;br /&gt;
		}&lt;br /&gt;
	// == decide if to invert prices&lt;br /&gt;
		if ($supplier_currency != $conf-&amp;amp;gt;currency){&lt;br /&gt;
			$pu_ht_devise = $pu;&lt;br /&gt;
			$pu = round($pu_ht_devise / $this-&amp;amp;gt;multicurrency_tx , 4);&lt;br /&gt;
		}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Explanation:&amp;lt;/strong&amp;gt; the supplier&amp;amp;#39;s currency is found, and if it does not match the system&amp;amp;#39;s (our company&amp;amp;#39;s) currency, then we exchange the values ​​of the price in the currency supposedly of the supplier and the currency of the system, to &amp;amp;quot;deceive&amp;amp;quot; Dolibarr. Keep in mind that with this patch &amp;lt;strong&amp;gt;we are hacking the native Dolibarr function that adds a product to an order&amp;lt;/strong&amp;gt;, but believe me, it is the best solution at this time when this issue of the multi-currency is being re-programmed by the official team of Dolibarr. Now just 2 months ago they changed this behavior in versions 5.X and 6.X but they did not do it completed: it is pending to finalize its full implementation. For that reason we are &amp;amp;quot;forced&amp;amp;quot; to make this patch. Try it, you will see that now the prices of the products in other currencies add well to the orders to suppliers. &amp;lt;strong&amp;gt;You must remember only that now the prices of the suppliers you are going to introduce them in the currency of the supplier&amp;lt;/strong&amp;gt; !! (Come on, which is the most logical!).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Development =&lt;br /&gt;
&lt;br /&gt;
Module developed by [https://github.com/caos30/ Sergi Rodrigues] for &#039;&#039;&#039;BIMEX.tech&#039;&#039;&#039; on 2017.&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesMassiveSendEmailRequests.png&amp;diff=38004</id>
		<title>File:DoliPurchasesMassiveSendEmailRequests.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesMassiveSendEmailRequests.png&amp;diff=38004"/>
		<updated>2017-12-06T02:56:31Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesOrderedProduct_es.png&amp;diff=38003</id>
		<title>File:DoliPurchasesOrderedProduct es.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesOrderedProduct_es.png&amp;diff=38003"/>
		<updated>2017-12-06T02:30:53Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesOnclickCreateOrders_es.png&amp;diff=38002</id>
		<title>File:DoliPurchasesOnclickCreateOrders es.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesOnclickCreateOrders_es.png&amp;diff=38002"/>
		<updated>2017-12-06T02:30:01Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesPriceComparison_es.png&amp;diff=38001</id>
		<title>File:DoliPurchasesPriceComparison es.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesPriceComparison_es.png&amp;diff=38001"/>
		<updated>2017-12-06T02:26:30Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesEditLine_es.png&amp;diff=38000</id>
		<title>File:DoliPurchasesEditLine es.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesEditLine_es.png&amp;diff=38000"/>
		<updated>2017-12-06T02:25:37Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesEditButtons_es.png&amp;diff=37999</id>
		<title>File:DoliPurchasesEditButtons es.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesEditButtons_es.png&amp;diff=37999"/>
		<updated>2017-12-06T02:25:02Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesEditPurchase_es.png&amp;diff=37998</id>
		<title>File:DoliPurchasesEditPurchase es.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesEditPurchase_es.png&amp;diff=37998"/>
		<updated>2017-12-06T02:24:17Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesListPurchases_es.png&amp;diff=37997</id>
		<title>File:DoliPurchasesListPurchases es.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesListPurchases_es.png&amp;diff=37997"/>
		<updated>2017-12-06T02:23:38Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesBoxLatestPurchases_es.png&amp;diff=37996</id>
		<title>File:DoliPurchasesBoxLatestPurchases es.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesBoxLatestPurchases_es.png&amp;diff=37996"/>
		<updated>2017-12-06T02:22:01Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesLeftMenu_es.png&amp;diff=37995</id>
		<title>File:DoliPurchasesLeftMenu es.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesLeftMenu_es.png&amp;diff=37995"/>
		<updated>2017-12-06T02:21:43Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesSetupModules_es.png&amp;diff=37994</id>
		<title>File:DoliPurchasesSetupModules es.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesSetupModules_es.png&amp;diff=37994"/>
		<updated>2017-12-06T02:20:12Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Purchases&amp;diff=37983</id>
		<title>Module Purchases</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Purchases&amp;diff=37983"/>
		<updated>2017-12-05T06:23:09Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Complementary modules]]&lt;br /&gt;
[[Category:Product]]&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
= Informations =&lt;br /&gt;
{{TemplateModuleInfo&lt;br /&gt;
|modulename=Purchases&lt;br /&gt;
|editor=BIMEX.TECH&lt;br /&gt;
|webbuy=[https://www.dolistore.com/en/modules/865-Purchases.html Dolistore]&lt;br /&gt;
|status=stable&lt;br /&gt;
|version=1.4&lt;br /&gt;
|minversion=5.x&lt;br /&gt;
|maxversion=6.x&lt;br /&gt;
|note=Last version 1.4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Features =&lt;br /&gt;
&lt;br /&gt;
Interface translated to these languages: &amp;lt;strong&amp;gt;English / French / Catalan / Castillian (spanish) / Polish&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This Purchases module has been developed as an assistant that allows us to quickly and easily make the purchase of X products:&lt;br /&gt;
&lt;br /&gt;
* Being able to &#039;&#039;&#039;compare prices from several suppliers&#039;&#039;&#039;, even in &#039;&#039;&#039;different currencies&#039;&#039;&#039;.&lt;br /&gt;
* Being able to send by mail with a single click &#039;&#039;&#039;invitations to our selected suppliers&#039;&#039;&#039; to visit a link with which they access a simple &#039;&#039;&#039;multi-language form&#039;&#039;&#039; in which they can capture the prices for us, decline or confirm the sale of any of the requested products, and add some extra comment about delivery and/or payment conditions.&lt;br /&gt;
* Being able to &#039;&#039;&#039;modify / add / remove prices&#039;&#039;&#039; from any supplier to any product from that same price table, with just two clicks.&lt;br /&gt;
* Being able to create the corresponding &#039;&#039;&#039;orders also with two clicks&#039;&#039;&#039;, filling automatically with all the information of each supplier and the products.&lt;br /&gt;
&lt;br /&gt;
In short, an interface easier and more agile to use, that allows you to do the same thing that you can already do with the native Dolibarr interface but in a much more comfortable way. Well, in Dolibarr it would be very difficult to compare the prices of each product for each supplier and then assemble the different orders. And obviously there is no way to suppliers capture the prices you need.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: &#039;&#039;&#039;given that Dolibarr has an incomplete treatment and in some points incongrant  handling different currencies (EUR, USD, MXN, MAD, etc ...) for the prices of the products, there has been no choice but to implement a small &#039;&#039;&#039;patching of Dolibarr&#039;&#039;&#039; . At the end of this guide we explain how to do it (it is a simple copy and paste of no more than 20 lines of code in a single PHP file on Dolibarr core). But it is necessary that before you continue reading you know that if you want this &#039;&#039;&#039;Purchases module&#039;&#039;&#039; to work well in a multi-currency environment you will have to do that patching of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
= Install =&lt;br /&gt;
&lt;br /&gt;
To install a module in Dolibar is as simple as:&lt;br /&gt;
&lt;br /&gt;
* Download the archive file of module (.zip file) from web site [https://www.dolistore.com/en/modules/865-Purchases.html DoliStore.com]&lt;br /&gt;
* Create the directory: &#039;&#039;&#039;/htdocs/purchases&#039;&#039;&#039; into the root of Dolibarr.&lt;br /&gt;
* Put the content of the ZIP file into that directory&lt;br /&gt;
* On your Dolibarr panel enable the module: &#039;&#039;&#039;Setup -&amp;amp;gt; Modules&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once you have done it, it will appear in the configuration of the modules, in the Dolibarr panel. In the case of this module, you will see it in the &amp;lt;u&amp;gt;Supplier Relationship Management (SRM)&amp;lt;/u&amp;gt; group, with the name &amp;lt;u&amp;gt;Purchases&amp;lt;/u&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesSetupModules.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
== Accessing the module ==&lt;br /&gt;
&lt;br /&gt;
Once activated, we will reach it in two possible ways:&lt;br /&gt;
&lt;br /&gt;
* Visiting the &amp;lt;u&amp;gt;Commercial&amp;lt;/u&amp;gt; section, and then in the left side menu we will see the two options for this module: &amp;lt;u&amp;gt;New purchase&amp;lt;/u&amp;gt; / &amp;lt;u&amp;gt;List&amp;lt;/u&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesLeftMenu.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Or, from the &amp;lt;u&amp;gt;Dashboard&amp;lt;/u&amp;gt;, where we will have a box with the &amp;lt;u&amp;gt;Last 5 purchases&amp;lt;/u&amp;gt;.&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesBoxLatestPurchases.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Purchase list ==&lt;br /&gt;
&lt;br /&gt;
There is not much to say about the list of purchase processes. The most interesting thing is to explain the possible values for the &amp;lt;u&amp;gt;Status&amp;lt;/u&amp;gt; column:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;strong&amp;gt;Draft&amp;lt;/strong&amp;gt;: when we only have a list of products to buy&lt;br /&gt;
* &amp;lt;strong&amp;gt;Quoting&amp;lt;/strong&amp;gt;: when we have prices of one or more suppliers for some of the products to buy&lt;br /&gt;
* &amp;lt;strong&amp;gt;Buying&amp;lt;/strong&amp;gt;: when at least one price has already been selected for some of the products and the corresponding purchase order has been created&lt;br /&gt;
* &amp;lt;strong&amp;gt;Completed&amp;lt;/strong&amp;gt;: when purchase orders have already been created for all products&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesListPurchases.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Editing a purchase ==&lt;br /&gt;
&lt;br /&gt;
The card of a not-completed purchase would look like the one shown below (click to open in another tab of the browser and see the detail):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesEditPurchase.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* At the top of the form there is a brief form with only the minimum descriptive information, of which it is worth noting that we can &amp;lt;strong&amp;gt;link the purchase to a project&amp;lt;/strong&amp;gt; that we have created in Dolibarr, if we have activated the &amp;lt;u&amp;gt;Projects module&amp;lt;/u&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* Below of that short form, there is an action button bar, to change record changes in that form, to send quotation requests by mail to the selected suppliers, to create orders or to eliminate the purchase:&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesEditButtons.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Under these buttons we have the &amp;lt;strong&amp;gt;list of products&amp;lt;/strong&amp;gt;: a table where each row will contain a product to buy and a &amp;lt;strong&amp;gt;table comparing prices&amp;lt;/strong&amp;gt; of one or more suppliers. In the first line we have the &amp;lt;strong&amp;gt;status of this product&amp;lt;/strong&amp;gt;: 1) without prices, 2) with prices but without order, 3) created an order.&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesEditLine.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Also, until we place an order, we can change the amount we need to buy. The buttons at the end of the line allow us to: [[File:DoliPurchasesButton_Del.png]] remove the product from this purchase process, [[File:DoliPurchasesButton_Save.png]] save changes (if we modify any value in any of the text boxes in this row of the table), [[File:DoliPurchasesButton_Stock.png]] access the product stock management page in Dolibarr just for this product and supplier.&lt;br /&gt;
&amp;lt;strong&amp;gt;Note:&amp;lt;/strong&amp;gt; It is important to understand that we can change the values of the text boxes of this price table, that is, change the quantity of the product, the unit price or the minimum number of units that the supplier requires us to buy, and the page will automatically recalculate in real time the final price in the last column, in the currency of our company, but &amp;lt;strong&amp;gt;these changes will not be saved&amp;lt;/strong&amp;gt; in the server (!!). So if we want to save the changes we have to click the button to save changes [[File:DoliPurchasesButton_Save.png]].&lt;br /&gt;
&lt;br /&gt;
* Let&amp;amp;#39;s look in detail at the &amp;lt;strong&amp;gt;price comparison table&amp;lt;/strong&amp;gt;:&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesPriceComparison.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;strong&amp;gt;Colors&amp;lt;/strong&amp;gt;: the text boxes will appear &amp;lt;u&amp;gt;green&amp;lt;/u&amp;gt; if the supplier in question responded to the quote request (below we will see how to make that request) and confirmed having that product in stock. Instead, they will appear in &amp;lt;u&amp;gt;orange&amp;lt;/u&amp;gt; if the request was already sent to that provider but the provider has not yet responded. Finally, it will appear in &amp;lt;u&amp;gt;red&amp;lt;/u&amp;gt; when the supplier has responded and indicated that this product can not be supplied. In the latter case, the circular control for &amp;lt;u&amp;gt;Create Order&amp;lt;/u&amp;gt; (last column of the price table) will be disabled and an icon will appear in its place that will show the comment left by the supplier.&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;strong&amp;gt;Multi-currency&amp;lt;/strong&amp;gt;: it is important to understand that this module takes &amp;lt;strong&amp;gt;the prices of the different suppliers in the currency of each supplier&amp;lt;/strong&amp;gt;. Beware, at this moment (versions of Dolibarr previous or equal to 6.X) IT IS NOT THAT way on Dolibarr!! On Dolibarr, at this moment, the prices introduced in the system ALWAYS are in the currency that we have defined in the system for our company, not the supplier currency !!!! For that reason it is necessary and convenient that you do the &amp;lt;strong&amp;gt;patching of Dolibarr&amp;lt;/strong&amp;gt; that we suggest at the end of this guide. It will simply affect how the price of a product is added to an order.&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;strong&amp;gt;Calculations&amp;lt;/strong&amp;gt;: having said that, with this module Purchases and the suggested Dolibarr patch we can handle &amp;amp;quot;normally&amp;amp;quot; supplier prices in their own currencies (first column) and at the same time be able to compare the &amp;lt;u&amp;gt;Final price&amp;lt;/u&amp;gt; (penultimate column) in our own currency (MXN in my case). Keep in mind that to calculate the &amp;lt;u&amp;gt;Final Price&amp;lt;/u&amp;gt; the &amp;lt;u&amp;gt;Unit Price&amp;lt;/u&amp;gt; is multiplied by the &amp;lt;u&amp;gt;Minimum quantity&amp;lt;/u&amp;gt; or by the number of &amp;lt;u&amp;gt;Units&amp;lt;/u&amp;gt; (whichever is greater than these two values). For example, in the case of the second supplier of the image (the orange one) we are required to buy a minimum of 5 units, so we multiply the unit price by 5 to obtain the final price. While for the other suppliers we multiply by 4, which is the number of units we need.&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;strong&amp;gt;Currency exchange rates&amp;lt;/strong&amp;gt;: currency exchange rates (ie, how many MXN are a USD) the Purchases module takes them &amp;lt;strong&amp;gt;in real time&amp;lt;/strong&amp;gt; from the &amp;lt;u&amp;gt;International Monetary Fund&amp;lt;/u&amp;gt; website (www.imf.org/external/np/fin/data/rms_rep.aspx). In fact, because we don&amp;amp;#39;t want to call too many times to that external website and not to slow down the loading of this quotation page, a query of the IMF page is made &amp;lt;strong&amp;gt;only every 12 hours&amp;lt;/strong&amp;gt;. In short, we can be quite sure that the calculation between currencies is sufficiently adjusted to reality, and works completely automatically and in the background. By the way, you should also know that once we place an order for a product, the Purchases module registers the currency changes at that moment, and in the future, when you go back to consult the card of this purchase, it will show you the table comparison of prices according to currency exchange rates at the time of placing the order. As long as there is not a created order, the exchange rates will be updated, so today you can see a price of $11USD in Mexican pesos different from the one you saw yesterday in the same table, obviously because every day the currency exchange rates fluctuate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesPriceComparison.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** [[File:DoliPurchasesButton_Del.png]] &amp;lt;strong&amp;gt;Delete button&amp;lt;/strong&amp;gt;: when clicked, it will show us a dialog box asking if we want to only remove this price from this comparison, or if &amp;lt;strong&amp;gt;we also want to eliminate the price of this supplier for this Dolibarr system product&amp;lt;/strong&amp;gt;. If you are sure that the supplier is never going to sell you that product or simply has never given you a price, it is advisable that you choose the second option.&lt;br /&gt;
&lt;br /&gt;
** [[File:DoliPurchasesButton_Edit.png]] &amp;lt;strong&amp;gt;Edit price button&amp;lt;/strong&amp;gt;: will open in a new tab of the browser the usual Dolibarr form for editing the price of this supplier for this product. What is useful for us? Well, because there we have more editing options than in our comparison table. For example, there we can edit the VAT to apply for this product.&lt;br /&gt;
&lt;br /&gt;
** [[File:DoliPurchasesButton_Mail.png]] &amp;lt;strong&amp;gt;Email button&amp;lt;/strong&amp;gt;: is a link of the type &amp;amp;quot;mailto&amp;amp;quot; and therefore will open our mailing program that we have configured on our machine, by filling in the recipient&amp;amp;#39;s box with the email address of the supplier in question. For this reason, this button does not appear when in Dolibarr we have not filled in the email field for the supplier in question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesPriceComparison.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Creat order&amp;lt;/strong&amp;gt;: finally, when we already have the prices that we were expecting from the different suppliers, or when we need to make an order, we will mark the circular box in the last column &amp;lt;u&amp;gt;Create order&amp;lt;/u&amp;gt;. Actually, the way of working is like this: for each of the products that we have included in this purchase we will mark the offers of the suppliers that seem most appropriate. And without having to make that choice for all products, click on the button &amp;lt;u&amp;gt;Create orders&amp;lt;/u&amp;gt; that are on top of the product table, and the page will display a new table with the orders to be created for each supplier, if there were several suppliers selected, and the products to ask each one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesOnclickCreateOrders.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we press the &amp;lt;u&amp;gt;Create Orders&amp;lt;/u&amp;gt; button again, the dialog box will hide, and if we do it again it will be displayed again but &amp;lt;strong&amp;gt;updated&amp;lt;/strong&amp;gt;. That is, if between both clicks we have changed our supplier selection for a product, &amp;lt;strong&amp;gt;this list of orders / suppliers will be updated&amp;lt;/strong&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
When we press any of the buttons &amp;lt;u&amp;gt;Create order&amp;lt;/u&amp;gt; in the &amp;lt;u&amp;gt;Action&amp;lt;/u&amp;gt; column, the Purchases module will create the corresponding order in &amp;lt;strong&amp;gt;draft mode&amp;lt;/strong&amp;gt;, filling in the information of the supplier, of the exchange rate of currency (if it was in a currency different from that of our company) and the list of products and quantities that we need to buy. &amp;lt;strong&amp;gt;The new order will open in a new browser tab&amp;lt;/strong&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Once an order has been created in this way, by refreshing this page of the purchase, we will see that &amp;lt;strong&amp;gt;the comparative table of prices of the ordered products has been disabled&amp;lt;/strong&amp;gt; and a button appears that gives us access to the card of that order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesOrderedProduct.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Request quotations to suppliers ==&lt;br /&gt;
&lt;br /&gt;
The first thing to note is that this Purchases module does not use the native functionality of &amp;lt;u&amp;gt;Request for quotations from suppliers&amp;lt;/u&amp;gt; that &amp;lt;strong&amp;gt;Dolibarr brings natively&amp;lt;/strong&amp;gt;. It has chosen to build our own solution to avoid problems in Dolibarr related to the multi-currency. So, you will see below that the system we have built is highly functional, multi-currency and multi-language, but does not create any record in Dolibarr for supplier quotes.&lt;br /&gt;
&lt;br /&gt;
Having said that, we must proceed in this way:&lt;br /&gt;
&lt;br /&gt;
We can visit this web form by clicking on the &amp;lt;u&amp;gt;Form&amp;lt;/u&amp;gt; buttons in the previous dialog box. &amp;lt;strong&amp;gt;Each form is unique for each purchase and supplier, and the parameters of the URL are encrypted&amp;lt;/strong&amp;gt; to prevent them from manipulating the URL and accessing the prices of other suppliers.&lt;br /&gt;
&lt;br /&gt;
It is recommended that if the provider in question does not have email or send us their prices by other channels (phone, whatsapp, mail, etc ...) &amp;lt;strong&amp;gt;we should use the corresponding capture web form to enter the prices&amp;lt;/strong&amp;gt; of this supplier for this purchase. In this way, we will see them marked in green (or in red, in case you do not have a product) in the price comparison table of this module.&lt;br /&gt;
&lt;br /&gt;
This is how the web form for capturing prices for the provider looks:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesQuotationForm1.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It does not need many comments, because &amp;lt;strong&amp;gt;it has been intended to be self-explanatory&amp;lt;/strong&amp;gt; so that providers feel as comfortable as possible. If we click on the &amp;lt;u&amp;gt;Extra information&amp;lt;/u&amp;gt; button, the supplier has the option of adding a general comment on this &amp;amp;quot;possible order&amp;amp;quot;, and can also provide us with more complete contact information. But it is an optional step:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesQuotationForm2.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Note:&amp;lt;/strong&amp;gt; At the moment that we place an order that includes any of these products, either for this supplier or for another of our list, &amp;lt;strong&amp;gt;the introduction of prices will be blocked&amp;lt;/strong&amp;gt; in the corresponding rows of this price table, if the supplier is late, or enter later to visit this form.&lt;br /&gt;
&lt;br /&gt;
After the supplier clicks on the &amp;lt;u&amp;gt;Submit&amp;lt;/u&amp;gt; button of that quote form &amp;lt;strong&amp;gt;the system will send an email&amp;lt;/strong&amp;gt; to the Dolibarr user who created that purchase in the system, with the prices and with the comments of the supplier. Information that on the other hand is shown in the comparative price table of the module. &amp;lt;strong&amp;gt;These prices also change the prices we have stored in Dolibarr&amp;lt;/strong&amp;gt; for those products and that supplier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Patching of Dolibarr (5.X to 6.X) ==&lt;br /&gt;
&lt;br /&gt;
This small patching of Dolibarr is necessary &amp;lt;strong&amp;gt;if in your Dolibarr you have activated the &amp;amp;quot;multi-currency&amp;amp;quot; module&amp;lt;/strong&amp;gt;, that is, if you are going to have suppliers or clients that handle different currencies to your company:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesMulticurrency.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, you must edit the following file of your Dolibarr:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/htdocs/fourn/class/fournisseur.commande.class.php&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
locate line &#039;&#039;&#039;#1467&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$tabprice = calcul_price_total($qty, $pu, ... ... ... );&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and on top of that line you must paste these others:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// == reverse prices if the supplier currency don&amp;amp;#39;t match the order currency&lt;br /&gt;
	// == get the supplier currency&lt;br /&gt;
		$supplier_currency = &amp;amp;#39;&amp;amp;#39;;&lt;br /&gt;
		$sql = &amp;amp;quot;SELECT * FROM &amp;amp;quot;.MAIN_DB_PREFIX.&amp;amp;quot;product_fournisseur_price as pr &amp;amp;quot;&lt;br /&gt;
			   .&amp;amp;quot; LEFT JOIN &amp;amp;quot;.MAIN_DB_PREFIX.&amp;amp;quot;societe as supp &amp;amp;quot;&lt;br /&gt;
			   .&amp;amp;quot; ON pr.fk_soc = supp.rowid&amp;amp;quot;&lt;br /&gt;
			   .&amp;amp;quot; WHERE pr.rowid=&amp;amp;quot;.$fk_prod_fourn_price;&lt;br /&gt;
		$resql = $this-&amp;amp;gt;db-&amp;amp;gt;query($sql);&lt;br /&gt;
		if ($resql) {&lt;br /&gt;
			while($row = $resql-&amp;amp;gt;fetch_assoc()) &lt;br /&gt;
				$supplier_currency = $row[&amp;amp;#39;multicurrency_code&amp;amp;#39;];&lt;br /&gt;
		}&lt;br /&gt;
	// == decide if to invert prices&lt;br /&gt;
		if ($supplier_currency != $conf-&amp;amp;gt;currency){&lt;br /&gt;
			$pu_ht_devise = $pu;&lt;br /&gt;
			$pu = round($pu_ht_devise / $this-&amp;amp;gt;multicurrency_tx , 4);&lt;br /&gt;
		}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Explanation:&amp;lt;/strong&amp;gt; the supplier&amp;amp;#39;s currency is found, and if it does not match the system&amp;amp;#39;s (our company&amp;amp;#39;s) currency, then we exchange the values ​​of the price in the currency supposedly of the supplier and the currency of the system, to &amp;amp;quot;deceive&amp;amp;quot; Dolibarr. Keep in mind that with this patch &amp;lt;strong&amp;gt;we are hacking the native Dolibarr function that adds a product to an order&amp;lt;/strong&amp;gt;, but believe me, it is the best solution at this time when this issue of the multi-currency is being re-programmed by the official team of Dolibarr. Now just 2 months ago they changed this behavior in versions 5.X and 6.X but they did not do it completed: it is pending to finalize its full implementation. For that reason we are &amp;amp;quot;forced&amp;amp;quot; to make this patch. Try it, you will see that now the prices of the products in other currencies add well to the orders to suppliers. &amp;lt;strong&amp;gt;You must remember only that now the prices of the suppliers you are going to introduce them in the currency of the supplier&amp;lt;/strong&amp;gt; !! (Come on, which is the most logical!).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Development =&lt;br /&gt;
&lt;br /&gt;
Module developed by [https://github.com/caos30/ Sergi Rodrigues] for &#039;&#039;&#039;BIMEX.tech&#039;&#039;&#039; on 2017.&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Purchases&amp;diff=37982</id>
		<title>Module Purchases</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Purchases&amp;diff=37982"/>
		<updated>2017-12-05T06:04:09Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Complementary modules]]&lt;br /&gt;
[[Category:Product]]&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
= Informations =&lt;br /&gt;
{{TemplateModuleInfo&lt;br /&gt;
|modulename=Purchases&lt;br /&gt;
|editor=BIMEX.TECH&lt;br /&gt;
|webbuy=[https://www.dolistore.com/en/modules/865-Purchases.html Dolistore]&lt;br /&gt;
|status=stable&lt;br /&gt;
|version=1.4&lt;br /&gt;
|minversion=5.x&lt;br /&gt;
|maxversion=6.x&lt;br /&gt;
|note=Last version 1.4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Features =&lt;br /&gt;
This Purchases module has been developed as an assistant that allows us to quickly and easily make the purchase of X products:&lt;br /&gt;
&lt;br /&gt;
* Being able to &#039;&#039;&#039;compare prices from several suppliers&#039;&#039;&#039;, even in &#039;&#039;&#039;different currencies&#039;&#039;&#039;.&lt;br /&gt;
* Being able to send by mail with a single click &#039;&#039;&#039;invitations to our selected suppliers&#039;&#039;&#039; to visit a link with which they access a simple &#039;&#039;&#039;multi-language form&#039;&#039;&#039; in which they can capture the prices for us, decline or confirm the sale of any of the requested products, and add some extra comment about delivery and/or payment conditions.&lt;br /&gt;
* Being able to &#039;&#039;&#039;modify / add / remove prices&#039;&#039;&#039; from any supplier to any product from that same price table, with just two clicks.&lt;br /&gt;
* Being able to create the corresponding &#039;&#039;&#039;orders also with two clicks&#039;&#039;&#039;, filling automatically with all the information of each supplier and the products.&lt;br /&gt;
&lt;br /&gt;
In short, an interface easier and more agile to use, that allows you to do the same thing that you can already do with the native Dolibarr interface but in a much more comfortable way. Well, in Dolibarr it would be very difficult to compare the prices of each product for each supplier and then assemble the different orders. And obviously there is no way to suppliers capture the prices you need.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: &#039;&#039;&#039;given that Dolibarr has an incomplete treatment and in some points incongrant  handling different currencies (EUR, USD, MXN, MAD, etc ...) for the prices of the products, there has been no choice but to implement a small &#039;&#039;&#039;patching of Dolibarr&#039;&#039;&#039; . At the end of this guide we explain how to do it (it is a simple copy and paste of no more than 20 lines of code in a single PHP file on Dolibarr core). But it is necessary that before you continue reading you know that if you want this &#039;&#039;&#039;Purchases module&#039;&#039;&#039; to work well in a multi-currency environment you will have to do that patching of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
= Install =&lt;br /&gt;
&lt;br /&gt;
To install a module in Dolibar is as simple as:&lt;br /&gt;
&lt;br /&gt;
* Download the archive file of module (.zip file) from web site [https://www.dolistore.com/en/modules/865-Purchases.html DoliStore.com]&lt;br /&gt;
* Create the directory: &#039;&#039;&#039;/htdocs/purchases&#039;&#039;&#039; into the root of Dolibarr.&lt;br /&gt;
* Put the content of the ZIP file into that directory&lt;br /&gt;
* On your Dolibarr panel enable the module: &#039;&#039;&#039;Setup -&amp;amp;gt; Modules&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once you have done it, it will appear in the configuration of the modules, in the Dolibarr panel. In the case of this module, you will see it in the &amp;lt;u&amp;gt;Supplier Relationship Management (SRM)&amp;lt;/u&amp;gt; group, with the name &amp;lt;u&amp;gt;Purchases&amp;lt;/u&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesSetupModules.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
== Accessing the module ==&lt;br /&gt;
&lt;br /&gt;
Once activated, we will reach it in two possible ways:&lt;br /&gt;
&lt;br /&gt;
* Visiting the &amp;lt;u&amp;gt;Commercial&amp;lt;/u&amp;gt; section, and then in the left side menu we will see the two options for this module: &amp;lt;u&amp;gt;New purchase&amp;lt;/u&amp;gt; / &amp;lt;u&amp;gt;List&amp;lt;/u&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesLeftMenu.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Or, from the &amp;lt;u&amp;gt;Dashboard&amp;lt;/u&amp;gt;, where we will have a box with the &amp;lt;u&amp;gt;Last 5 purchases&amp;lt;/u&amp;gt;.&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesBoxLatestPurchases.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Purchase list ==&lt;br /&gt;
&lt;br /&gt;
There is not much to say about the list of purchase processes. The most interesting thing is to explain the possible values for the &amp;lt;u&amp;gt;Status&amp;lt;/u&amp;gt; column:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;strong&amp;gt;Draft&amp;lt;/strong&amp;gt;: when we only have a list of products to buy&lt;br /&gt;
* &amp;lt;strong&amp;gt;Quoting&amp;lt;/strong&amp;gt;: when we have prices of one or more suppliers for some of the products to buy&lt;br /&gt;
* &amp;lt;strong&amp;gt;Buying&amp;lt;/strong&amp;gt;: when at least one price has already been selected for some of the products and the corresponding purchase order has been created&lt;br /&gt;
* &amp;lt;strong&amp;gt;Completed&amp;lt;/strong&amp;gt;: when purchase orders have already been created for all products&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesListPurchases.png|max-width:994px|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Editing a purchase ==&lt;br /&gt;
&lt;br /&gt;
The card of a not-completed purchase would look like the one shown below (click to open in another tab of the browser and see the detail):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesEditPurchase.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* At the top of the form there is a brief form with only the minimum descriptive information, of which it is worth noting that we can &amp;lt;strong&amp;gt;link the purchase to a project&amp;lt;/strong&amp;gt; that we have created in Dolibarr, if we have activated the &amp;lt;u&amp;gt;Projects module&amp;lt;/u&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* Below of that short form, there is an action button bar, to change record changes in that form, to send quotation requests by mail to the selected suppliers, to create orders or to eliminate the purchase:&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesEditButtons.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Under these buttons we have the &amp;lt;strong&amp;gt;list of products&amp;lt;/strong&amp;gt;: a table where each row will contain a product to buy and a &amp;lt;strong&amp;gt;table comparing prices&amp;lt;/strong&amp;gt; of one or more suppliers. In the first line we have the &amp;lt;strong&amp;gt;status of this product&amp;lt;/strong&amp;gt;: 1) without prices, 2) with prices but without order, 3) created an order.&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesEditLine.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Also, until we place an order, we can change the amount we need to buy. The buttons at the end of the line allow us to: [[File:DoliPurchasesButton_Del.png]] remove the product from this purchase process, [[File:DoliPurchasesButton_Save.png]] save changes (if we modify any value in any of the text boxes in this row of the table), [[File:DoliPurchasesButton_Stock.png]] access the product stock management page in Dolibarr just for this product and supplier.&lt;br /&gt;
&amp;lt;strong&amp;gt;Note:&amp;lt;/strong&amp;gt; It is important to understand that we can change the values of the text boxes of this price table, that is, change the quantity of the product, the unit price or the minimum number of units that the supplier requires us to buy, and the page will automatically recalculate in real time the final price in the last column, in the currency of our company, but &amp;lt;strong&amp;gt;these changes will not be saved&amp;lt;/strong&amp;gt; in the server (!!). So if we want to save the changes we have to click the button to save changes [[File:DoliPurchasesButton_Save.png]].&lt;br /&gt;
&lt;br /&gt;
* Let&amp;amp;#39;s look in detail at the &amp;lt;strong&amp;gt;price comparison table&amp;lt;/strong&amp;gt;:&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesPriceComparison.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;strong&amp;gt;Colors&amp;lt;/strong&amp;gt;: the text boxes will appear &amp;lt;u&amp;gt;green&amp;lt;/u&amp;gt; if the supplier in question responded to the quote request (below we will see how to make that request) and confirmed having that product in stock. Instead, they will appear in &amp;lt;u&amp;gt;orange&amp;lt;/u&amp;gt; if the request was already sent to that provider but the provider has not yet responded. Finally, it will appear in &amp;lt;u&amp;gt;red&amp;lt;/u&amp;gt; when the supplier has responded and indicated that this product can not be supplied. In the latter case, the circular control for &amp;lt;u&amp;gt;Create Order&amp;lt;/u&amp;gt; (last column of the price table) will be disabled and an icon will appear in its place that will show the comment left by the supplier.&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;strong&amp;gt;Multi-currency&amp;lt;/strong&amp;gt;: it is important to understand that this module takes &amp;lt;strong&amp;gt;the prices of the different suppliers in the currency of each supplier&amp;lt;/strong&amp;gt;. Beware, at this moment (versions of Dolibarr previous or equal to 6.X) IT IS NOT THAT way on Dolibarr!! On Dolibarr, at this moment, the prices introduced in the system ALWAYS are in the currency that we have defined in the system for our company, not the supplier currency !!!! For that reason it is necessary and convenient that you do the &amp;lt;strong&amp;gt;patching of Dolibarr&amp;lt;/strong&amp;gt; that we suggest at the end of this guide. It will simply affect how the price of a product is added to an order.&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;strong&amp;gt;Calculations&amp;lt;/strong&amp;gt;: having said that, with this module Purchases and the suggested Dolibarr patch we can handle &amp;amp;quot;normally&amp;amp;quot; supplier prices in their own currencies (first column) and at the same time be able to compare the &amp;lt;u&amp;gt;Final price&amp;lt;/u&amp;gt; (penultimate column) in our own currency (MXN in my case). Keep in mind that to calculate the &amp;lt;u&amp;gt;Final Price&amp;lt;/u&amp;gt; the &amp;lt;u&amp;gt;Unit Price&amp;lt;/u&amp;gt; is multiplied by the &amp;lt;u&amp;gt;Minimum quantity&amp;lt;/u&amp;gt; or by the number of &amp;lt;u&amp;gt;Units&amp;lt;/u&amp;gt; (whichever is greater than these two values). For example, in the case of the second supplier of the image (the orange one) we are required to buy a minimum of 5 units, so we multiply the unit price by 5 to obtain the final price. While for the other suppliers we multiply by 4, which is the number of units we need.&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;strong&amp;gt;Currency exchange rates&amp;lt;/strong&amp;gt;: currency exchange rates (ie, how many MXN are a USD) the Purchases module takes them &amp;lt;strong&amp;gt;in real time&amp;lt;/strong&amp;gt; from the &amp;lt;u&amp;gt;International Monetary Fund&amp;lt;/u&amp;gt; website (www.imf.org/external/np/fin/data/rms_rep.aspx). In fact, because we don&amp;amp;#39;t want to call too many times to that external website and not to slow down the loading of this quotation page, a query of the IMF page is made &amp;lt;strong&amp;gt;only every 12 hours&amp;lt;/strong&amp;gt;. In short, we can be quite sure that the calculation between currencies is sufficiently adjusted to reality, and works completely automatically and in the background. By the way, you should also know that once we place an order for a product, the Purchases module registers the currency changes at that moment, and in the future, when you go back to consult the card of this purchase, it will show you the table comparison of prices according to currency exchange rates at the time of placing the order. As long as there is not a created order, the exchange rates will be updated, so today you can see a price of $11USD in Mexican pesos different from the one you saw yesterday in the same table, obviously because every day the currency exchange rates fluctuate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesPriceComparison.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** [[File:DoliPurchasesButton_Del.png]] &amp;lt;strong&amp;gt;Delete button&amp;lt;/strong&amp;gt;: when clicked, it will show us a dialog box asking if we want to only remove this price from this comparison, or if &amp;lt;strong&amp;gt;we also want to eliminate the price of this supplier for this Dolibarr system product&amp;lt;/strong&amp;gt;. If you are sure that the supplier is never going to sell you that product or simply has never given you a price, it is advisable that you choose the second option.&lt;br /&gt;
&lt;br /&gt;
** [[File:DoliPurchasesButton_Edit.png]] &amp;lt;strong&amp;gt;Edit price button&amp;lt;/strong&amp;gt;: will open in a new tab of the browser the usual Dolibarr form for editing the price of this supplier for this product. What is useful for us? Well, because there we have more editing options than in our comparison table. For example, there we can edit the VAT to apply for this product.&lt;br /&gt;
&lt;br /&gt;
** [[File:DoliPurchasesButton_Mail.png]] &amp;lt;strong&amp;gt;Email button&amp;lt;/strong&amp;gt;: is a link of the type &amp;amp;quot;mailto&amp;amp;quot; and therefore will open our mailing program that we have configured on our machine, by filling in the recipient&amp;amp;#39;s box with the email address of the supplier in question. For this reason, this button does not appear when in Dolibarr we have not filled in the email field for the supplier in question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesPriceComparison.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Creat order&amp;lt;/strong&amp;gt;: finally, when we already have the prices that we were expecting from the different suppliers, or when we need to make an order, we will mark the circular box in the last column &amp;lt;u&amp;gt;Create order&amp;lt;/u&amp;gt;. Actually, the way of working is like this: for each of the products that we have included in this purchase we will mark the offers of the suppliers that seem most appropriate. And without having to make that choice for all products, click on the button &amp;lt;u&amp;gt;Create orders&amp;lt;/u&amp;gt; that are on top of the product table, and the page will display a new table with the orders to be created for each supplier, if there were several suppliers selected, and the products to ask each one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesOnclickCreateOrders.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we press the &amp;lt;u&amp;gt;Create Orders&amp;lt;/u&amp;gt; button again, the dialog box will hide, and if we do it again it will be displayed again but &amp;lt;strong&amp;gt;updated&amp;lt;/strong&amp;gt;. That is, if between both clicks we have changed our supplier selection for a product, &amp;lt;strong&amp;gt;this list of orders / suppliers will be updated&amp;lt;/strong&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
When we press any of the buttons &amp;lt;u&amp;gt;Create order&amp;lt;/u&amp;gt; in the &amp;lt;u&amp;gt;Action&amp;lt;/u&amp;gt; column, the Purchases module will create the corresponding order in &amp;lt;strong&amp;gt;draft mode&amp;lt;/strong&amp;gt;, filling in the information of the supplier, of the exchange rate of currency (if it was in a currency different from that of our company) and the list of products and quantities that we need to buy. &amp;lt;strong&amp;gt;The new order will open in a new browser tab&amp;lt;/strong&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Once an order has been created in this way, by refreshing this page of the purchase, we will see that &amp;lt;strong&amp;gt;the comparative table of prices of the ordered products has been disabled&amp;lt;/strong&amp;gt; and a button appears that gives us access to the card of that order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesOrderedProduct.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Request quotations to suppliers ==&lt;br /&gt;
&lt;br /&gt;
The first thing to note is that this Purchases module does not use the native functionality of &amp;lt;u&amp;gt;Request for quotations from suppliers&amp;lt;/u&amp;gt; that &amp;lt;strong&amp;gt;Dolibarr brings natively&amp;lt;/strong&amp;gt;. It has chosen to build our own solution to avoid problems in Dolibarr related to the multi-currency. So, you will see below that the system we have built is highly functional, multi-currency and multi-language, but does not create any record in Dolibarr for supplier quotes.&lt;br /&gt;
&lt;br /&gt;
Having said that, we must proceed in this way:&lt;br /&gt;
&lt;br /&gt;
We can visit this web form by clicking on the &amp;lt;u&amp;gt;Form&amp;lt;/u&amp;gt; buttons in the previous dialog box. &amp;lt;strong&amp;gt;Each form is unique for each purchase and supplier, and the parameters of the URL are encrypted&amp;lt;/strong&amp;gt; to prevent them from manipulating the URL and accessing the prices of other suppliers.&lt;br /&gt;
&lt;br /&gt;
It is recommended that if the provider in question does not have email or send us their prices by other channels (phone, whatsapp, mail, etc ...) &amp;lt;strong&amp;gt;we should use the corresponding capture web form to enter the prices&amp;lt;/strong&amp;gt; of this supplier for this purchase. In this way, we will see them marked in green (or in red, in case you do not have a product) in the price comparison table of this module.&lt;br /&gt;
&lt;br /&gt;
This is how the web form for capturing prices for the provider looks:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesQuotationForm1.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It does not need many comments, because &amp;lt;strong&amp;gt;it has been intended to be self-explanatory&amp;lt;/strong&amp;gt; so that providers feel as comfortable as possible. If we click on the &amp;lt;u&amp;gt;Extra information&amp;lt;/u&amp;gt; button, the supplier has the option of adding a general comment on this &amp;amp;quot;possible order&amp;amp;quot;, and can also provide us with more complete contact information. But it is an optional step:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesQuotationForm2.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Note:&amp;lt;/strong&amp;gt; At the moment that we place an order that includes any of these products, either for this supplier or for another of our list, &amp;lt;strong&amp;gt;the introduction of prices will be blocked&amp;lt;/strong&amp;gt; in the corresponding rows of this price table, if the supplier is late, or enter later to visit this form.&lt;br /&gt;
&lt;br /&gt;
After the supplier clicks on the &amp;lt;u&amp;gt;Submit&amp;lt;/u&amp;gt; button of that quote form &amp;lt;strong&amp;gt;the system will send an email&amp;lt;/strong&amp;gt; to the Dolibarr user who created that purchase in the system, with the prices and with the comments of the supplier. Information that on the other hand is shown in the comparative price table of the module. &amp;lt;strong&amp;gt;These prices also change the prices we have stored in Dolibarr&amp;lt;/strong&amp;gt; for those products and that supplier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Patching of Dolibarr (5.X to 6.X) ==&lt;br /&gt;
&lt;br /&gt;
This small patching of Dolibarr is necessary &amp;lt;strong&amp;gt;if in your Dolibarr you have activated the &amp;amp;quot;multi-currency&amp;amp;quot; module&amp;lt;/strong&amp;gt;, that is, if you are going to have suppliers or clients that handle different currencies to your company:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesMulticurrency.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, you must edit the following file of your Dolibarr:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/htdocs/fourn/class/fournisseur.commande.class.php&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
locate line &#039;&#039;&#039;#1467&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$tabprice = calcul_price_total($qty, $pu, ... ... ... );&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and on top of that line you must paste these others:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// == reverse prices if the supplier currency don&amp;amp;#39;t match the order currency&lt;br /&gt;
	// == get the supplier currency&lt;br /&gt;
		$supplier_currency = &amp;amp;#39;&amp;amp;#39;;&lt;br /&gt;
		$sql = &amp;amp;quot;SELECT * FROM &amp;amp;quot;.MAIN_DB_PREFIX.&amp;amp;quot;product_fournisseur_price as pr &amp;amp;quot;&lt;br /&gt;
			   .&amp;amp;quot; LEFT JOIN &amp;amp;quot;.MAIN_DB_PREFIX.&amp;amp;quot;societe as supp &amp;amp;quot;&lt;br /&gt;
			   .&amp;amp;quot; ON pr.fk_soc = supp.rowid&amp;amp;quot;&lt;br /&gt;
			   .&amp;amp;quot; WHERE pr.rowid=&amp;amp;quot;.$fk_prod_fourn_price;&lt;br /&gt;
		$resql = $this-&amp;amp;gt;db-&amp;amp;gt;query($sql);&lt;br /&gt;
		if ($resql) {&lt;br /&gt;
			while($row = $resql-&amp;amp;gt;fetch_assoc()) &lt;br /&gt;
				$supplier_currency = $row[&amp;amp;#39;multicurrency_code&amp;amp;#39;];&lt;br /&gt;
		}&lt;br /&gt;
	// == decide if to invert prices&lt;br /&gt;
		if ($supplier_currency != $conf-&amp;amp;gt;currency){&lt;br /&gt;
			$pu_ht_devise = $pu;&lt;br /&gt;
			$pu = round($pu_ht_devise / $this-&amp;amp;gt;multicurrency_tx , 4);&lt;br /&gt;
		}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Explanation:&amp;lt;/strong&amp;gt; the supplier&amp;amp;#39;s currency is found, and if it does not match the system&amp;amp;#39;s (our company&amp;amp;#39;s) currency, then we exchange the values ​​of the price in the currency supposedly of the supplier and the currency of the system, to &amp;amp;quot;deceive&amp;amp;quot; Dolibarr. Keep in mind that with this patch &amp;lt;strong&amp;gt;we are hacking the native Dolibarr function that adds a product to an order&amp;lt;/strong&amp;gt;, but believe me, it is the best solution at this time when this issue of the multi-currency is being re-programmed by the official team of Dolibarr. Now just 2 months ago they changed this behavior in versions 5.X and 6.X but they did not do it completed: it is pending to finalize its full implementation. For that reason we are &amp;amp;quot;forced&amp;amp;quot; to make this patch. Try it, you will see that now the prices of the products in other currencies add well to the orders to suppliers. &amp;lt;strong&amp;gt;You must remember only that now the prices of the suppliers you are going to introduce them in the currency of the supplier&amp;lt;/strong&amp;gt; !! (Come on, which is the most logical!).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Development =&lt;br /&gt;
&lt;br /&gt;
Module developed by [https://github.com/caos30/ Sergi Rodrigues] for &#039;&#039;&#039;BIMEX.tech&#039;&#039;&#039; on 2017.&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=Module_Purchases&amp;diff=37981</id>
		<title>Module Purchases</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=Module_Purchases&amp;diff=37981"/>
		<updated>2017-12-05T06:00:01Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: Created page with &amp;quot;Category:Complementary modules Category:Product {{TemplateDocDevEn}} {{TemplateDocUser}} = Informations = {{TemplateModuleInfo |modulename=Purchases |editor=BIMEX.TECH |w...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Complementary modules]]&lt;br /&gt;
[[Category:Product]]&lt;br /&gt;
{{TemplateDocDevEn}}&lt;br /&gt;
{{TemplateDocUser}}&lt;br /&gt;
= Informations =&lt;br /&gt;
{{TemplateModuleInfo&lt;br /&gt;
|modulename=Purchases&lt;br /&gt;
|editor=BIMEX.TECH&lt;br /&gt;
|webbuy=[https://www.dolistore.com/en/modules/865-Purchases.html Dolistore]&lt;br /&gt;
|status=stable&lt;br /&gt;
|version=1.4&lt;br /&gt;
|minversion=5.x&lt;br /&gt;
|maxversion=6.x&lt;br /&gt;
|note=Last version 1.4&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Features =&lt;br /&gt;
This Purchases module has been developed as an assistant that allows us to quickly and easily make the purchase of X products:&lt;br /&gt;
&lt;br /&gt;
* Being able to &#039;&#039;&#039;compare prices from several suppliers&#039;&#039;&#039;, even in &#039;&#039;&#039;different currencies&#039;&#039;&#039;.&lt;br /&gt;
* Being able to send by mail with a single click &#039;&#039;&#039;invitations to our selected suppliers&#039;&#039;&#039; to visit a link with which they access a simple &#039;&#039;&#039;multi-language form&#039;&#039;&#039; in which they can capture the prices for us, decline or confirm the sale of any of the requested products, and add some extra comment about delivery and/or payment conditions.&lt;br /&gt;
* Being able to &#039;&#039;&#039;modify / add / remove prices&#039;&#039;&#039; from any supplier to any product from that same price table, with just two clicks.&lt;br /&gt;
* Being able to create the corresponding &#039;&#039;&#039;orders also with two clicks&#039;&#039;&#039;, filling automatically with all the information of each supplier and the products.&lt;br /&gt;
&lt;br /&gt;
In short, an interface easier and more agile to use, that allows you to do the same thing that you can already do with the native Dolibarr interface but in a much more comfortable way. Well, in Dolibarr it would be very difficult to compare the prices of each product for each supplier and then assemble the different orders. And obviously there is no way to suppliers capture the prices you need.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: &#039;&#039;&#039;given that Dolibarr has an incomplete treatment and in some points incongrant  handling different currencies (EUR, USD, MXN, MAD, etc ...) for the prices of the products, there has been no choice but to implement a small &#039;&#039;&#039;patching of Dolibarr&#039;&#039;&#039; . At the end of this guide we explain how to do it (it is a simple copy and paste of no more than 20 lines of code in a single PHP file on Dolibarr core). But it is necessary that before you continue reading you know that if you want this &#039;&#039;&#039;Purchases module&#039;&#039;&#039; to work well in a multi-currency environment you will have to do that patching of Dolibarr.&lt;br /&gt;
&lt;br /&gt;
= Install =&lt;br /&gt;
&lt;br /&gt;
To install a module in Dolibar is as simple as:&lt;br /&gt;
&lt;br /&gt;
* Download the archive file of module (.zip file) from web site [http://www.dolistore.com DoliStore.com]&lt;br /&gt;
* Create the directory: &#039;&#039;&#039;/htdocs/purchases&#039;&#039;&#039; into the root of Dolibarr.&lt;br /&gt;
* Put the content of the ZIP file into that directory&lt;br /&gt;
* On your Dolibarr panel enable the module: &#039;&#039;&#039;Setup -&amp;amp;gt; Modules&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once you have done it, it will appear in the configuration of the modules, in the Dolibarr panel. In the case of this module, you will see it in the &amp;lt;u&amp;gt;Supplier Relationship Management (SRM)&amp;lt;/u&amp;gt; group, with the name &amp;lt;u&amp;gt;Purchases&amp;lt;/u&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesSetupModules.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
== Accessing the module ==&lt;br /&gt;
&lt;br /&gt;
Once activated, we will reach it in two possible ways:&lt;br /&gt;
&lt;br /&gt;
* Visiting the &amp;lt;u&amp;gt;Commercial&amp;lt;/u&amp;gt; section, and then in the left side menu we will see the two options for this module: &amp;lt;u&amp;gt;New purchase&amp;lt;/u&amp;gt; / &amp;lt;u&amp;gt;List&amp;lt;/u&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesLeftMenu.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Or, from the &amp;lt;u&amp;gt;Dashboard&amp;lt;/u&amp;gt;, where we will have a box with the &amp;lt;u&amp;gt;Last 5 purchases&amp;lt;/u&amp;gt;.&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesBoxLatestPurchases.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Purchase list ==&lt;br /&gt;
&lt;br /&gt;
There is not much to say about the list of purchase processes. The most interesting thing is to explain the possible values for the &amp;lt;u&amp;gt;Status&amp;lt;/u&amp;gt; column:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;strong&amp;gt;Draft&amp;lt;/strong&amp;gt;: when we only have a list of products to buy&lt;br /&gt;
* &amp;lt;strong&amp;gt;Quoting&amp;lt;/strong&amp;gt;: when we have prices of one or more suppliers for some of the products to buy&lt;br /&gt;
* &amp;lt;strong&amp;gt;Buying&amp;lt;/strong&amp;gt;: when at least one price has already been selected for some of the products and the corresponding purchase order has been created&lt;br /&gt;
* &amp;lt;strong&amp;gt;Completed&amp;lt;/strong&amp;gt;: when purchase orders have already been created for all products&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesListPurchases.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Editing a purchase ==&lt;br /&gt;
&lt;br /&gt;
The card of a not-completed purchase would look like the one shown below (click to open in another tab of the browser and see the detail):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesEditPurchase.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* At the top of the form there is a brief form with only the minimum descriptive information, of which it is worth noting that we can &amp;lt;strong&amp;gt;link the purchase to a project&amp;lt;/strong&amp;gt; that we have created in Dolibarr, if we have activated the &amp;lt;u&amp;gt;Projects module&amp;lt;/u&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* Below of that short form, there is an action button bar, to change record changes in that form, to send quotation requests by mail to the selected suppliers, to create orders or to eliminate the purchase:&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesEditButtons.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Under these buttons we have the &amp;lt;strong&amp;gt;list of products&amp;lt;/strong&amp;gt;: a table where each row will contain a product to buy and a &amp;lt;strong&amp;gt;table comparing prices&amp;lt;/strong&amp;gt; of one or more suppliers. In the first line we have the &amp;lt;strong&amp;gt;status of this product&amp;lt;/strong&amp;gt;: 1) without prices, 2) with prices but without order, 3) created an order.&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesEditLine.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Also, until we place an order, we can change the amount we need to buy. The buttons at the end of the line allow us to: [[File:DoliPurchasesButton_Del.png]] remove the product from this purchase process, [[File:DoliPurchasesButton_Save.png]] save changes (if we modify any value in any of the text boxes in this row of the table), [[File:DoliPurchasesButton_Stock.png]] access the product stock management page in Dolibarr just for this product and supplier.&lt;br /&gt;
&amp;lt;strong&amp;gt;Note:&amp;lt;/strong&amp;gt; It is important to understand that we can change the values of the text boxes of this price table, that is, change the quantity of the product, the unit price or the minimum number of units that the supplier requires us to buy, and the page will automatically recalculate in real time the final price in the last column, in the currency of our company, but &amp;lt;strong&amp;gt;these changes will not be saved&amp;lt;/strong&amp;gt; in the server (!!). So if we want to save the changes we have to click the button to save changes [[File:DoliPurchasesButton_Save.png]].&lt;br /&gt;
&lt;br /&gt;
* Let&amp;amp;#39;s look in detail at the &amp;lt;strong&amp;gt;price comparison table&amp;lt;/strong&amp;gt;:&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesPriceComparison.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;strong&amp;gt;Colors&amp;lt;/strong&amp;gt;: the text boxes will appear &amp;lt;u&amp;gt;green&amp;lt;/u&amp;gt; if the supplier in question responded to the quote request (below we will see how to make that request) and confirmed having that product in stock. Instead, they will appear in &amp;lt;u&amp;gt;orange&amp;lt;/u&amp;gt; if the request was already sent to that provider but the provider has not yet responded. Finally, it will appear in &amp;lt;u&amp;gt;red&amp;lt;/u&amp;gt; when the supplier has responded and indicated that this product can not be supplied. In the latter case, the circular control for &amp;lt;u&amp;gt;Create Order&amp;lt;/u&amp;gt; (last column of the price table) will be disabled and an icon will appear in its place that will show the comment left by the supplier.&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;strong&amp;gt;Multi-currency&amp;lt;/strong&amp;gt;: it is important to understand that this module takes &amp;lt;strong&amp;gt;the prices of the different suppliers in the currency of each supplier&amp;lt;/strong&amp;gt;. Beware, at this moment (versions of Dolibarr previous or equal to 6.X) IT IS NOT THAT way on Dolibarr!! On Dolibarr, at this moment, the prices introduced in the system ALWAYS are in the currency that we have defined in the system for our company, not the supplier currency !!!! For that reason it is necessary and convenient that you do the &amp;lt;strong&amp;gt;patching of Dolibarr&amp;lt;/strong&amp;gt; that we suggest at the end of this guide. It will simply affect how the price of a product is added to an order.&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;strong&amp;gt;Calculations&amp;lt;/strong&amp;gt;: having said that, with this module Purchases and the suggested Dolibarr patch we can handle &amp;amp;quot;normally&amp;amp;quot; supplier prices in their own currencies (first column) and at the same time be able to compare the &amp;lt;u&amp;gt;Final price&amp;lt;/u&amp;gt; (penultimate column) in our own currency (MXN in my case). Keep in mind that to calculate the &amp;lt;u&amp;gt;Final Price&amp;lt;/u&amp;gt; the &amp;lt;u&amp;gt;Unit Price&amp;lt;/u&amp;gt; is multiplied by the &amp;lt;u&amp;gt;Minimum quantity&amp;lt;/u&amp;gt; or by the number of &amp;lt;u&amp;gt;Units&amp;lt;/u&amp;gt; (whichever is greater than these two values). For example, in the case of the second supplier of the image (the orange one) we are required to buy a minimum of 5 units, so we multiply the unit price by 5 to obtain the final price. While for the other suppliers we multiply by 4, which is the number of units we need.&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;strong&amp;gt;Currency exchange rates&amp;lt;/strong&amp;gt;: currency exchange rates (ie, how many MXN are a USD) the Purchases module takes them &amp;lt;strong&amp;gt;in real time&amp;lt;/strong&amp;gt; from the &amp;lt;u&amp;gt;International Monetary Fund&amp;lt;/u&amp;gt; website (www.imf.org/external/np/fin/data/rms_rep.aspx). In fact, because we don&amp;amp;#39;t want to call too many times to that external website and not to slow down the loading of this quotation page, a query of the IMF page is made &amp;lt;strong&amp;gt;only every 12 hours&amp;lt;/strong&amp;gt;. In short, we can be quite sure that the calculation between currencies is sufficiently adjusted to reality, and works completely automatically and in the background. By the way, you should also know that once we place an order for a product, the Purchases module registers the currency changes at that moment, and in the future, when you go back to consult the card of this purchase, it will show you the table comparison of prices according to currency exchange rates at the time of placing the order. As long as there is not a created order, the exchange rates will be updated, so today you can see a price of $11USD in Mexican pesos different from the one you saw yesterday in the same table, obviously because every day the currency exchange rates fluctuate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesPriceComparison.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
** [[File:DoliPurchasesButton_Del.png]] &amp;lt;strong&amp;gt;Delete button&amp;lt;/strong&amp;gt;: when clicked, it will show us a dialog box asking if we want to only remove this price from this comparison, or if &amp;lt;strong&amp;gt;we also want to eliminate the price of this supplier for this Dolibarr system product&amp;lt;/strong&amp;gt;. If you are sure that the supplier is never going to sell you that product or simply has never given you a price, it is advisable that you choose the second option.&lt;br /&gt;
&lt;br /&gt;
** [[File:DoliPurchasesButton_Edit.png]] &amp;lt;strong&amp;gt;Edit price button&amp;lt;/strong&amp;gt;: will open in a new tab of the browser the usual Dolibarr form for editing the price of this supplier for this product. What is useful for us? Well, because there we have more editing options than in our comparison table. For example, there we can edit the VAT to apply for this product.&lt;br /&gt;
&lt;br /&gt;
** [[File:DoliPurchasesButton_Mail.png]] &amp;lt;strong&amp;gt;Email button&amp;lt;/strong&amp;gt;: is a link of the type &amp;amp;quot;mailto&amp;amp;quot; and therefore will open our mailing program that we have configured on our machine, by filling in the recipient&amp;amp;#39;s box with the email address of the supplier in question. For this reason, this button does not appear when in Dolibarr we have not filled in the email field for the supplier in question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesPriceComparison.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Creat order&amp;lt;/strong&amp;gt;: finally, when we already have the prices that we were expecting from the different suppliers, or when we need to make an order, we will mark the circular box in the last column &amp;lt;u&amp;gt;Create order&amp;lt;/u&amp;gt;. Actually, the way of working is like this: for each of the products that we have included in this purchase we will mark the offers of the suppliers that seem most appropriate. And without having to make that choice for all products, click on the button &amp;lt;u&amp;gt;Create orders&amp;lt;/u&amp;gt; that are on top of the product table, and the page will display a new table with the orders to be created for each supplier, if there were several suppliers selected, and the products to ask each one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesOnclickCreateOrders.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we press the &amp;lt;u&amp;gt;Create Orders&amp;lt;/u&amp;gt; button again, the dialog box will hide, and if we do it again it will be displayed again but &amp;lt;strong&amp;gt;updated&amp;lt;/strong&amp;gt;. That is, if between both clicks we have changed our supplier selection for a product, &amp;lt;strong&amp;gt;this list of orders / suppliers will be updated&amp;lt;/strong&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
When we press any of the buttons &amp;lt;u&amp;gt;Create order&amp;lt;/u&amp;gt; in the &amp;lt;u&amp;gt;Action&amp;lt;/u&amp;gt; column, the Purchases module will create the corresponding order in &amp;lt;strong&amp;gt;draft mode&amp;lt;/strong&amp;gt;, filling in the information of the supplier, of the exchange rate of currency (if it was in a currency different from that of our company) and the list of products and quantities that we need to buy. &amp;lt;strong&amp;gt;The new order will open in a new browser tab&amp;lt;/strong&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Once an order has been created in this way, by refreshing this page of the purchase, we will see that &amp;lt;strong&amp;gt;the comparative table of prices of the ordered products has been disabled&amp;lt;/strong&amp;gt; and a button appears that gives us access to the card of that order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesOrderedProduct.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Request quotations to suppliers ==&lt;br /&gt;
&lt;br /&gt;
The first thing to note is that this Purchases module does not use the native functionality of &amp;lt;u&amp;gt;Request for quotations from suppliers&amp;lt;/u&amp;gt; that &amp;lt;strong&amp;gt;Dolibarr brings natively&amp;lt;/strong&amp;gt;. It has chosen to build our own solution to avoid problems in Dolibarr related to the multi-currency. So, you will see below that the system we have built is highly functional, multi-currency and multi-language, but does not create any record in Dolibarr for supplier quotes.&lt;br /&gt;
&lt;br /&gt;
Having said that, we must proceed in this way:&lt;br /&gt;
&lt;br /&gt;
We can visit this web form by clicking on the &amp;lt;u&amp;gt;Form&amp;lt;/u&amp;gt; buttons in the previous dialog box. &amp;lt;strong&amp;gt;Each form is unique for each purchase and supplier, and the parameters of the URL are encrypted&amp;lt;/strong&amp;gt; to prevent them from manipulating the URL and accessing the prices of other suppliers.&lt;br /&gt;
&lt;br /&gt;
It is recommended that if the provider in question does not have email or send us their prices by other channels (phone, whatsapp, mail, etc ...) &amp;lt;strong&amp;gt;we should use the corresponding capture web form to enter the prices&amp;lt;/strong&amp;gt; of this supplier for this purchase. In this way, we will see them marked in green (or in red, in case you do not have a product) in the price comparison table of this module.&lt;br /&gt;
&lt;br /&gt;
This is how the web form for capturing prices for the provider looks:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;divforimgcentpercent center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesQuotationForm1.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It does not need many comments, because &amp;lt;strong&amp;gt;it has been intended to be self-explanatory&amp;lt;/strong&amp;gt; so that providers feel as comfortable as possible. If we click on the &amp;lt;u&amp;gt;Extra information&amp;lt;/u&amp;gt; button, the supplier has the option of adding a general comment on this &amp;amp;quot;possible order&amp;amp;quot;, and can also provide us with more complete contact information. But it is an optional step:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesQuotationForm2.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Note:&amp;lt;/strong&amp;gt; At the moment that we place an order that includes any of these products, either for this supplier or for another of our list, &amp;lt;strong&amp;gt;the introduction of prices will be blocked&amp;lt;/strong&amp;gt; in the corresponding rows of this price table, if the supplier is late, or enter later to visit this form.&lt;br /&gt;
&lt;br /&gt;
After the supplier clicks on the &amp;lt;u&amp;gt;Submit&amp;lt;/u&amp;gt; button of that quote form &amp;lt;strong&amp;gt;the system will send an email&amp;lt;/strong&amp;gt; to the Dolibarr user who created that purchase in the system, with the prices and with the comments of the supplier. Information that on the other hand is shown in the comparative price table of the module. &amp;lt;strong&amp;gt;These prices also change the prices we have stored in Dolibarr&amp;lt;/strong&amp;gt; for those products and that supplier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Patching of Dolibarr (5.X to 6.X) ==&lt;br /&gt;
&lt;br /&gt;
This small patching of Dolibarr is necessary &amp;lt;strong&amp;gt;if in your Dolibarr you have activated the &amp;amp;quot;multi-currency&amp;amp;quot; module&amp;lt;/strong&amp;gt;, that is, if you are going to have suppliers or clients that handle different currencies to your company:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
[[File:DoliPurchasesMulticurrency.png|border]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, you must edit the following file of your Dolibarr:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/htdocs/fourn/class/fournisseur.commande.class.php&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
locate line &#039;&#039;&#039;#1467&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$tabprice = calcul_price_total($qty, $pu, ... ... ... );&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and on top of that line you must paste these others:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// == reverse prices if the supplier currency don&amp;amp;#39;t match the order currency&lt;br /&gt;
	// == get the supplier currency&lt;br /&gt;
		$supplier_currency = &amp;amp;#39;&amp;amp;#39;;&lt;br /&gt;
		$sql = &amp;amp;quot;SELECT * FROM &amp;amp;quot;.MAIN_DB_PREFIX.&amp;amp;quot;product_fournisseur_price as pr &amp;amp;quot;&lt;br /&gt;
			   .&amp;amp;quot; LEFT JOIN &amp;amp;quot;.MAIN_DB_PREFIX.&amp;amp;quot;societe as supp &amp;amp;quot;&lt;br /&gt;
			   .&amp;amp;quot; ON pr.fk_soc = supp.rowid&amp;amp;quot;&lt;br /&gt;
			   .&amp;amp;quot; WHERE pr.rowid=&amp;amp;quot;.$fk_prod_fourn_price;&lt;br /&gt;
		$resql = $this-&amp;amp;gt;db-&amp;amp;gt;query($sql);&lt;br /&gt;
		if ($resql) {&lt;br /&gt;
			while($row = $resql-&amp;amp;gt;fetch_assoc()) &lt;br /&gt;
				$supplier_currency = $row[&amp;amp;#39;multicurrency_code&amp;amp;#39;];&lt;br /&gt;
		}&lt;br /&gt;
	// == decide if to invert prices&lt;br /&gt;
		if ($supplier_currency != $conf-&amp;amp;gt;currency){&lt;br /&gt;
			$pu_ht_devise = $pu;&lt;br /&gt;
			$pu = round($pu_ht_devise / $this-&amp;amp;gt;multicurrency_tx , 4);&lt;br /&gt;
		}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Explanation:&amp;lt;/strong&amp;gt; the supplier&amp;amp;#39;s currency is found, and if it does not match the system&amp;amp;#39;s (our company&amp;amp;#39;s) currency, then we exchange the values ​​of the price in the currency supposedly of the supplier and the currency of the system, to &amp;amp;quot;deceive&amp;amp;quot; Dolibarr. Keep in mind that with this patch &amp;lt;strong&amp;gt;we are hacking the native Dolibarr function that adds a product to an order&amp;lt;/strong&amp;gt;, but believe me, it is the best solution at this time when this issue of the multi-currency is being re-programmed by the official team of Dolibarr. Now just 2 months ago they changed this behavior in versions 5.X and 6.X but they did not do it completed: it is pending to finalize its full implementation. For that reason we are &amp;amp;quot;forced&amp;amp;quot; to make this patch. Try it, you will see that now the prices of the products in other currencies add well to the orders to suppliers. &amp;lt;strong&amp;gt;You must remember only that now the prices of the suppliers you are going to introduce them in the currency of the supplier&amp;lt;/strong&amp;gt; !! (Come on, which is the most logical!).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Development =&lt;br /&gt;
&lt;br /&gt;
Module developed by [https://github.com/caos30/ Sergi Rodrigues] for &#039;&#039;&#039;BIMEX.tech&#039;&#039;&#039; on 2017.&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesMulticurrency.png&amp;diff=37980</id>
		<title>File:DoliPurchasesMulticurrency.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesMulticurrency.png&amp;diff=37980"/>
		<updated>2017-12-05T05:42:03Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesQuotationForm2.png&amp;diff=37979</id>
		<title>File:DoliPurchasesQuotationForm2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesQuotationForm2.png&amp;diff=37979"/>
		<updated>2017-12-05T05:40:35Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesQuotationForm1.png&amp;diff=37978</id>
		<title>File:DoliPurchasesQuotationForm1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesQuotationForm1.png&amp;diff=37978"/>
		<updated>2017-12-05T05:39:39Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesOrderedProduct.png&amp;diff=37977</id>
		<title>File:DoliPurchasesOrderedProduct.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesOrderedProduct.png&amp;diff=37977"/>
		<updated>2017-12-05T05:38:02Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesOnclickCreateOrders.png&amp;diff=37976</id>
		<title>File:DoliPurchasesOnclickCreateOrders.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesOnclickCreateOrders.png&amp;diff=37976"/>
		<updated>2017-12-05T05:36:37Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesPriceComparison.png&amp;diff=37975</id>
		<title>File:DoliPurchasesPriceComparison.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesPriceComparison.png&amp;diff=37975"/>
		<updated>2017-12-05T05:26:02Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesButton_Stock.png&amp;diff=37974</id>
		<title>File:DoliPurchasesButton Stock.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.dolibarr.org/index.php?title=File:DoliPurchasesButton_Stock.png&amp;diff=37974"/>
		<updated>2017-12-05T05:23:11Z</updated>

		<summary type="html">&lt;p&gt;Imasdeweb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Imasdeweb</name></author>
	</entry>
</feed>