This commit is contained in:
2026-05-25 08:18:59 +02:00
parent aed68ba6f4
commit 1e5611f726
4 changed files with 711 additions and 128 deletions

View File

@@ -1,67 +1,436 @@
<!-- Generated from docs_source/business by docs/tools/render_business_docs.py. -->
# Pricing, basis, premium
# Pricing, basis et fixing
Statut: `migration partielle`
Langue : `fr`
Statut : `migration partielle`
Derniere verification code : `2026-05-25`
## BR-PT-PRI-001 - Le premium fait partie du prix economique
Cette page consolide les regles de pricing trade autour des composants, des
periodes de prix, des periodes d'application, du fixing manuel et du prix final
des lignes achat / vente.
## A retenir
<div style="border-left:0.28rem solid #4051b5; background:#f5f7ff; padding:0.85rem 1rem; margin:1rem 0 1.4rem 0; border-radius:0.35rem;"><strong style="display:block; margin-bottom:0.35rem;">Resume operationnel</strong><span>Une ligne trade peut etre en prix fixe, basis ou EFP. En basis, le prix de base vient d&#x27;un ou plusieurs composants de fixing. Chaque composant lit une courbe de prix, construit des dates de prix, applique ces prix sur des dates d&#x27;application, puis alimente le prix de la ligne via un summary.</span></div>
<table style="width:100%; border-collapse:collapse; margin:1rem 0 1.5rem 0; font-size:0.95rem;">
<thead>
<tr style="background:#eef3ff;">
<th style="text-align:left; padding:0.55rem 0.7rem; border-bottom:2px solid #4051b5;">Sujet</th>
<th style="text-align:left; padding:0.55rem 0.7rem; border-bottom:2px solid #4051b5;">Regle courte</th>
</tr>
</thead>
<tbody>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Composant</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Un <code>pricing.component</code> appartient a une ligne achat ou vente.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Courbe</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">La courbe principale est <code>price_index</code>.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Matrix</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">La matrix existe dans le modele mais n&#x27;est pas encore le moteur principal du fixing automatique.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Pricing period</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Definit les dates ou lire les prix sur la courbe.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Application period</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Definit les dates ou appliquer les tranches de fixing.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">AVG</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Utilise la moyenne progressive des prix lus.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">LAST</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Autorise la courbe a reprendre le dernier prix connu si la date n&#x27;a pas de prix.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Pricing rows</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Les lignes <code>pricing.pricing</code> portent quantite fixee, non fixee et prix EOD.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Summary</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Le summary remonte la derniere ligne de pricing du groupe.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Prix ligne</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">En <code>basis</code>, <code>unit_price</code> est le prix base hors premium.</td>
</tr>
</tbody>
</table>
<pre style="background:#263238; color:#eef7ff; padding:1rem; border-radius:0.35rem; overflow:auto;"><code>pricing.component
|
v
pricing.trigger
|
+--&gt; pricing period --&gt; dates de lecture curve
|
+--&gt; application period --&gt; dates de fixing
|
v
pricing.pricing
|
v
purchase/sale pricing summary
|
v
line.unit_price</code></pre>
## Regles consultant
### BR-PT-PRI-001 - Le premium fait partie du prix economique
Source: `BR-PT-008`
### Regle consultant
<table style="width:100%; border-collapse:collapse; margin:1rem 0 1.5rem 0; font-size:0.95rem;">
<thead>
<tr style="background:#eef3ff;">
<th style="text-align:left; padding:0.55rem 0.7rem; border-bottom:2px solid #4051b5;">Point</th>
<th style="text-align:left; padding:0.55rem 0.7rem; border-bottom:2px solid #4051b5;">Regle</th>
</tr>
</thead>
<tbody>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Prix visible</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;"><code>unit_price</code> reste le prix de base hors premium.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Prix economique</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Le montant utilise <code>unit_price + premium</code>.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Basis</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Le premium s&#x27;ajoute aussi quand le prix base vient du fixing.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Documents commerciaux</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Une ligne <code>basis</code> peut afficher le premium comme prix visible selon le contexte document.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Valuation</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Le premium doit etre pris en compte dans les lignes valorisees.</td>
</tr>
</tbody>
</table>
Le premium ou discount saisi sur une ligne fait partie du prix economique, que
la ligne soit en prix fixe ou en basis.
<div style="border-left:0.28rem solid #4051b5; background:#f5f7ff; padding:0.85rem 1rem; margin:1rem 0 1.4rem 0; border-radius:0.35rem;"><strong style="display:block; margin-bottom:0.35rem;">Point cle</strong><span>Le premium n&#x27;est pas un composant de fixing. Il reste porte par la ligne commerciale, mais il fait partie du prix economique utilise pour les montants.</span></div>
### Notes developpeur
<ul style="margin:0.65rem 0 1rem 1.1rem; padding-left:1rem; list-style-type:disc;">
<li style="margin:0.38rem 0;"><code>unit_price</code> reste le prix de base hors premium.
</li>
<li style="margin:0.38rem 0;">Montant economique: <code>unit_price + premium converti si necessaire</code>.
</li>
<li style="margin:0.38rem 0;">En basis, le premium s&#x27;applique aussi aux blocs valorises.
</li>
</ul>
## BR-PT-PRI-002 - Linked currency
### BR-PT-PRI-002 - Linked currency
Source: `BR-PT-009` et `BR-PT-010`
### Regle consultant
<table style="width:100%; border-collapse:collapse; margin:1rem 0 1.5rem 0; font-size:0.95rem;">
<thead>
<tr style="background:#eef3ff;">
<th style="text-align:left; padding:0.55rem 0.7rem; border-bottom:2px solid #4051b5;">Point</th>
<th style="text-align:left; padding:0.55rem 0.7rem; border-bottom:2px solid #4051b5;">Regle</th>
</tr>
</thead>
<tbody>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Activation</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;"><code>linked_price</code>, <code>linked_currency</code> et <code>linked_unit</code> deviennent obligatoires.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Saisie</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Le prix et le premium peuvent etre saisis dans le repere lie.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Conversion</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Les calculs internes convertissent vers la devise / unite de la ligne.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Basis</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">En <code>basis + linked currency</code>, <code>linked_price</code> represente le basis brut hors premium.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Amount</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Le montant ajoute le premium converti.</td>
</tr>
</tbody>
</table>
Quand le prix est saisi dans une devise ou unite liee, le premium est exprime
dans ce meme repere puis converti pour les calculs internes.
### Notes developpeur
<ul style="margin:0.65rem 0 1rem 1.1rem; padding-left:1rem; list-style-type:disc;">
<li style="margin:0.38rem 0;">Champs obligatoires si active: <code>linked_price</code>, <code>linked_currency</code>, <code>linked_unit</code>.
</li>
<li style="margin:0.38rem 0;">En <code>basis + linked currency</code>, <code>linked_price</code> represente le basis brut hors premium.
</li>
<li style="margin:0.38rem 0;"><code>amount</code> ajoute le premium converti.
</li>
</ul>
## BR-PT-PRI-003 - Pricing manuel
### BR-PT-PRI-003 - Pricing manuel
Source: `BR-PT-016` et doublon historique `BR-PT-015`
### Regle consultant
<table style="width:100%; border-collapse:collapse; margin:1rem 0 1.5rem 0; font-size:0.95rem;">
<thead>
<tr style="background:#eef3ff;">
<th style="text-align:left; padding:0.55rem 0.7rem; border-bottom:2px solid #4051b5;">Colonne</th>
<th style="text-align:left; padding:0.55rem 0.7rem; border-bottom:2px solid #4051b5;">Role</th>
</tr>
</thead>
<tbody>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;"><code>pricing_date</code></td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Date de saisie du fixing.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;"><code>quantity</code></td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Quantite fixee ce jour.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;"><code>settl_price</code></td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Prix de marche saisi.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;"><code>fixed_qt</code></td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Cumul des quantites fixees.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;"><code>fixed_qt_price</code></td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Prix moyen pondere du cumul fixe.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;"><code>unfixed_qt</code></td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Solde restant a fixer.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;"><code>unfixed_qt_price</code></td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Prix de fallback du solde non fixe.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;"><code>eod_price</code></td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Prix economique courant de la ligne de fixing.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;"><code>last</code></td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Derniere ligne du groupe, utilisee par le summary.</td>
</tr>
</tbody>
</table>
En pricing manuel, l'utilisateur saisit uniquement la quantite fixee du jour et
le prix de marche. Les cumuls et prix moyens sont calcules automatiquement.
<div style="border-left:0.28rem solid #4051b5; background:#f5f7ff; padding:0.85rem 1rem; margin:1rem 0 1.4rem 0; border-radius:0.35rem;"><strong style="display:block; margin-bottom:0.35rem;">Saisie utilisateur</strong><span>En manuel, l&#x27;utilisateur renseigne seulement <code>quantity</code> et <code>settl_price</code>. Les cumuls, le prix moyen, le solde non fixe et <code>last</code> sont recalcules par le systeme.</span></div>
### Notes developpeur
### BR-PT-PRI-004 - Pricing automatique par composant
<table style="width:100%; border-collapse:collapse; margin:1rem 0 1.5rem 0; font-size:0.95rem;">
<thead>
<tr style="background:#eef3ff;">
<th style="text-align:left; padding:0.55rem 0.7rem; border-bottom:2px solid #4051b5;">Etape</th>
<th style="text-align:left; padding:0.55rem 0.7rem; border-bottom:2px solid #4051b5;">Effet metier</th>
</tr>
</thead>
<tbody>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Composant</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">L&#x27;utilisateur choisit une courbe, un calendrier et active <code>Auto</code>.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Trigger</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">L&#x27;utilisateur definit une periode de prix et une periode d&#x27;application.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Lecture prix</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Le systeme lit les prix de la courbe sur les dates de pricing.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Application</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Le systeme cree une ligne de pricing par date d&#x27;application.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Quota</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">La quantite fixee par date correspond a la quantite de ligne divisee par le nombre de dates d&#x27;application.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Moyenne</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Si <code>AVG</code> est coche, le prix fixe utilise la moyenne progressive.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Fallback prix</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Si <code>LAST</code> est coche, la courbe peut reprendre le dernier prix disponible.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Cut-off</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;"><code>Pricing date max</code> arrete la generation apres cette date.</td>
</tr>
</tbody>
</table>
<pre style="background:#263238; color:#eef7ff; padding:1rem; border-radius:0.35rem; overflow:auto;"><code>Prix lus: P1 P2 P3 P4
Application: A1 A2 A3 A4
Quantite fixee: Q/4 Q/4 Q/4 Q/4
Summary: derniere ligne marquee last</code></pre>
### BR-PT-PRI-005 - Mode From / To manuel
<table style="width:100%; border-collapse:collapse; margin:1rem 0 1.5rem 0; font-size:0.95rem;">
<thead>
<tr style="background:#eef3ff;">
<th style="text-align:left; padding:0.55rem 0.7rem; border-bottom:2px solid #4051b5;">Cas</th>
<th style="text-align:left; padding:0.55rem 0.7rem; border-bottom:2px solid #4051b5;">Regle</th>
</tr>
</thead>
<tbody>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Pas de <code>pricing_period</code></td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">L&#x27;utilisateur peut saisir <code>From</code> / <code>To</code> cote pricing.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Pas de <code>application_period</code></td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">L&#x27;utilisateur peut saisir <code>From</code> / <code>To</code> cote application.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Application vide</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Par defaut, l&#x27;application reprend la meme fourchette que le pricing manuel.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Calendrier present</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Les jours fermes du calendrier sont exclus.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Calendrier absent</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Tous les jours calendaires de la fourchette sont utilises.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Lecture curve</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Les prix sont lus sur les dates de la fourchette pricing.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Application fixing</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Les lignes de fixing sont creees sur les dates de la fourchette application.</td>
</tr>
</tbody>
</table>
<div style="border-left:0.28rem solid #4051b5; background:#f5f7ff; padding:0.85rem 1rem; margin:1rem 0 1.4rem 0; border-radius:0.35rem;"><strong style="display:block; margin-bottom:0.35rem;">Exemple simple</strong><span>Pricing <code>01/04 -&gt; 05/04</code>, Application vide. Le systeme lit les prix du 1 au 5 avril et cree les applications sur ces memes dates, sauf jours exclus par le calendrier si un calendrier est renseigne.</span></div>
## Section developpeur
### Modeles pivots
<ul style="margin:0.65rem 0 1rem 1.1rem; padding-left:1rem; list-style-type:disc;">
<li style="margin:0.38rem 0;">Champs saisis: <code>quantity</code>, <code>settl_price</code>.
<li style="margin:0.38rem 0;">Composant : <code>pricing.component</code>
</li>
<li style="margin:0.38rem 0;">Champs derives: <code>fixed_qt</code>, <code>fixed_qt_price</code>, <code>unfixed_qt</code>, <code>unfixed_qt_price</code>, <code>eod_price</code>, <code>last</code>.
<li style="margin:0.38rem 0;">Trigger : <code>pricing.trigger</code>
</li>
<li style="margin:0.38rem 0;">Groupe metier: <code>line + component</code> ou <code>sale_line + component</code>.
<li style="margin:0.38rem 0;">Periode relative : <code>pricing.period</code>
</li>
<li style="margin:0.38rem 0;">Le composant choisi doit appartenir a la ligne courante.
<li style="margin:0.38rem 0;">Ligne de fixing : <code>pricing.pricing</code>
</li>
<li style="margin:0.38rem 0;">Summary achat : <code>purchase.pricing.summary</code>
</li>
<li style="margin:0.38rem 0;">Summary vente : <code>sale.pricing.summary</code>
</li>
<li style="margin:0.38rem 0;">Ligne achat : <code>purchase.line</code>
</li>
<li style="margin:0.38rem 0;">Ligne vente : <code>sale.line</code>
</li>
<li style="margin:0.38rem 0;">Courbe : <code>price.price</code>
</li>
<li style="margin:0.38rem 0;">Valeur de courbe : <code>price.price_value</code>
</li>
<li style="margin:0.38rem 0;">Calendrier : <code>price.calendar</code>
</li>
</ul>
### Methodes principales
<ul style="margin:0.65rem 0 1rem 1.1rem; padding-left:1rem; list-style-type:disc;">
<li style="margin:0.38rem 0;"><code>pricing.trigger.getPricingListDates()</code>
</li>
<li style="margin:0.38rem 0;"><code>pricing.trigger.getApplicationListDates()</code>
</li>
<li style="margin:0.38rem 0;"><code>pricing.trigger.getListDates()</code>
</li>
<li style="margin:0.38rem 0;"><code>pricing.trigger.getprice()</code>
</li>
<li style="margin:0.38rem 0;"><code>purchase.line.check_pricing()</code>
</li>
<li style="margin:0.38rem 0;"><code>sale.line.check_pricing()</code>
</li>
<li style="margin:0.38rem 0;"><code>purchase.line.generate_pricing()</code>
</li>
<li style="margin:0.38rem 0;"><code>sale.line.generate_pricing()</code>
</li>
<li style="margin:0.38rem 0;"><code>pricing.pricing._sync_manual_values()</code>
</li>
<li style="margin:0.38rem 0;"><code>pricing.pricing._sync_manual_last()</code>
</li>
<li style="margin:0.38rem 0;"><code>purchase.pricing.summary.table_query()</code>
</li>
<li style="margin:0.38rem 0;"><code>sale.pricing.summary.table_query()</code>
</li>
</ul>
### Points d'attention actuels
<table style="width:100%; border-collapse:collapse; margin:1rem 0 1.5rem 0; font-size:0.95rem;">
<thead>
<tr style="background:#eef3ff;">
<th style="text-align:left; padding:0.55rem 0.7rem; border-bottom:2px solid #4051b5;">Sujet</th>
<th style="text-align:left; padding:0.55rem 0.7rem; border-bottom:2px solid #4051b5;">Etat</th>
</tr>
</thead>
<tbody>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;"><code>fallback</code> composant</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Champ present, logique metier encore portee par <code>trigger.last</code>.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;"><code>last</code> trigger</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Signifie dernier prix disponible sur la curve.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;"><code>last</code> pricing</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Signifie derniere ligne du groupe pour le summary.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Matrix</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Disponible dans le modele et le MTM, pas encore completement integree au fixing auto.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;"><code>prDate</code> / <code>apPrice</code></td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Variables intermediaires historiques peu exploitees.</td>
</tr>
<tr style="border-bottom:1px solid #e0e0e0;">
<td style="vertical-align:top; padding:0.5rem 0.7rem;">AVG</td>
<td style="vertical-align:top; padding:0.5rem 0.7rem;">Moyenne progressive calculee sur la liste des prix lus.</td>
</tr>
</tbody>
</table>
## Tests proches
<ul style="margin:0.65rem 0 1rem 1.1rem; padding-left:1rem; list-style-type:disc;">
<li style="margin:0.38rem 0;"><code>modules/purchase_trade/tests/test_module.py</code>
</li>
<li style="margin:0.38rem 0;">Couverture existante :
<ul style="margin:0.65rem 0 1rem 1.35rem; padding-left:1rem; list-style-type:circle;">
<li style="margin:0.38rem 0;">champs manuels readonly / editable ;
</li>
<li style="margin:0.38rem 0;">recalcul du pricing manuel ;
</li>
<li style="margin:0.38rem 0;">unicite logique du <code>last</code> par groupe ;
</li>
<li style="margin:0.38rem 0;">fallback <code>quantity</code> si <code>quantity_theorical</code> est vide ;
</li>
<li style="margin:0.38rem 0;">controle que le composant appartient a la ligne courante.
</li>
</ul>
</li>
<li style="margin:0.38rem 0;">Tests a maintenir :
<ul style="margin:0.65rem 0 1rem 1.35rem; padding-left:1rem; list-style-type:circle;">
<li style="margin:0.38rem 0;">From / To manuel sans calendrier ;
</li>
<li style="margin:0.38rem 0;">From / To manuel avec calendrier ;
</li>
<li style="margin:0.38rem 0;">application vide qui reprend la fourchette pricing ;
</li>
<li style="margin:0.38rem 0;">comportement AVG / LAST.
</li>
</ul>
</li>
</ul>