# Notes Techniques

#### **HOOKS UTILISÉS**

<table id="bkmrk-hookdescriptionupdat" style="width: 100%; border-collapse: collapse;"><colgroup><col></col><col></col></colgroup><tbody><tr style="background: linear-gradient(135deg, rgb(102, 126, 234) 0%, rgb(118, 75, 162) 100%); color: white;"><th class="align-left" style="padding: 15px; text-align: left; border-radius: 5px 0px 0px;">Hook

</th><th class="align-left" style="padding: 15px; text-align: left; border-radius: 0px 5px 0px 0px;">Description

</th></tr><tr style="background: rgb(248, 249, 250);"><td style="padding: 15px; border-bottom: 1px solid rgb(224, 224, 224);">`<span class="editor-theme-code">updateSession</span>`

</td><td style="padding: 15px; border-bottom: 1px solid rgb(224, 224, 224); color: rgb(85, 85, 85);">Redirection vers pages de substitution

</td></tr><tr style="background: white;"><td style="padding: 15px; border-bottom: 1px solid rgb(224, 224, 224);">`<span class="editor-theme-code">afterLogin</span>`

</td><td style="padding: 15px; border-bottom: 1px solid rgb(224, 224, 224); color: rgb(85, 85, 85);">Contrôle de version, redirection

</td></tr><tr style="background: rgb(248, 249, 250);"><td style="padding: 15px; border-bottom: 1px solid rgb(224, 224, 224);">`<span class="editor-theme-code">addMoreActionsButtons</span>`

</td><td style="padding: 15px; border-bottom: 1px solid rgb(224, 224, 224); color: rgb(85, 85, 85);">Ajout des boutons sur l'onglet Prix client

</td></tr><tr style="background: white;"><td style="padding: 15px;">`<span class="editor-theme-code">doActions</span>`

</td><td style="padding: 15px; color: rgb(85, 85, 85);">Traitement des actions (propagation/suppression)

</td></tr></tbody></table>

#### **PAGES DE SUBSTITUTION**

<span style="white-space: pre-wrap;">Le module remplace la page standard de </span>***Dolibarr***<span style="white-space: pre-wrap;"> pour les prix clients : </span>`<span class="editor-theme-code">/societe/price.php</span>`

***Avantage :***<span style="white-space: pre-wrap;"> Cette substitution permet d'ajouter les boutons de gestion des tarifs tout en conservant toutes les fonctionnalités standard de </span>***Dolibarr***.

***Versions supportées :***

- - 18.x
    - 19.x
    - 20.x
    - 21.x
    - 22.x

#### **BASE DE DONNÉES**

<p class="callout info"> **Information :**<span style="white-space: pre-wrap;"> Le module n'ajoute </span>**aucune table**<span style="white-space: pre-wrap;"> à la base de données.</span></p>

<span style="white-space: pre-wrap;">Il utilise les tables standard de </span>***Dolibarr***<span style="white-space: pre-wrap;"> :</span>

- - `<span class="editor-theme-code">llx_product_customer_price</span>`<span style="white-space: pre-wrap;"> : Stockage des prix clients</span>
    - `<span class="editor-theme-code">llx_const</span>`<span style="white-space: pre-wrap;"> : Constantes de configuration</span>
    - `<span class="editor-theme-code">llx_c_tva</span>`<span style="white-space: pre-wrap;"> : Taux de TVA</span>

#### **PERFORMANCE**

**Considérations :**

- - La propagation peut être longue si la maison mère a de nombreux produits (plusieurs minutes pour &gt;1000 produits)
    - <span style="white-space: pre-wrap;">L'opération est exécutée en </span>**synchrone**
    - Pas de mise en cache des données
    - Chaque ligne est traitée individuellement

**Recommandations :**

- - Éviter les propagations durant les heures de forte activité
    - Pour des volumes très importants, envisager une opération en batch
    - Surveiller les logs en cas de timeout PHP

#### **SÉCURITÉ**

<span style="white-space: pre-wrap;">Le module respecte les standards de sécurité de </span>***Dolibarr***<span style="white-space: pre-wrap;"> :</span>

- - [x] Utilisation de restrictedArea()
    - [x] Vérification des permissions utilisateur
    - [x] Protection CSRF native
    - [x] Échappement des requêtes SQL
    - [x] Validation des paramètres GET/POST

#### **COMPATIBILITÉ**

**Environnement**

<table id="bkmrk-dolibarr-%3A18.0-%C3%A0-22." style="width: 100%;"><colgroup><col></col><col></col></colgroup><tbody><tr><td style="padding: 8px 0px; color: rgb(85, 85, 85); font-weight: bold;">**Dolibarr :**

</td><td style="padding: 8px 0px; color: rgb(46, 125, 50);">18.0 à 22.x

</td></tr><tr><td style="padding: 8px 0px; color: rgb(85, 85, 85); font-weight: bold;">**PHP Min :**

</td><td style="padding: 8px 0px; color: rgb(46, 125, 50);">7.4

</td></tr><tr><td style="padding: 8px 0px; color: rgb(85, 85, 85); font-weight: bold;">**PHP Max :**

</td><td style="padding: 8px 0px; color: rgb(46, 125, 50);">8.3

</td></tr><tr><td style="padding: 8px 0px; color: rgb(85, 85, 85); font-weight: bold;">**Extensions :**

</td><td style="padding: 8px 0px; color: rgb(255, 152, 0);">XML (recommandée)

</td></tr></tbody></table>

**Modules** compatibles

- Module Produits/Services
- Module Tiers
- Module Sociétés
- Module Multidevises
- Module Multi-tarifs

Version du document : 2.0 | Date : Février 2026

**InfraS - Sylvain Legrand**<span style="white-space: pre-wrap;"> | support@infras.fr | wiki.infras.fr</span>