fix(transport) : tableau prix — corrige l'inversion Adresse sites / Adresse livraisons (ERP-170)
Pull Request — Quality gate / Frontend (lint + Vitest + build) (pull_request) Has been cancelled
Pull Request — Quality gate / Backend (PHP CS + PHPUnit) (pull_request) Has been cancelled

This commit is contained in:
2026-06-17 15:00:14 +02:00
parent c3aae2e232
commit 5dc852c03e
@@ -357,15 +357,15 @@ function formatAmount(value: string | null | undefined): string {
/** /**
* Construit une ligne d'affichage depuis un prix embarqué (maquette Prix) : * Construit une ligne d'affichage depuis un prix embarqué (maquette Prix) :
* - « Adresse APRO » = adresse (voie) du client/fournisseur ; * - « Adresse sites » = le site (Châtellerault / Saint-Jean / Pommevic…) ;
* - « Adresse livraisons » = le site (86 / 17 / 82) ; * - « Adresse livraisons » = l'adresse (voie) du client/fournisseur ;
* - le prix tombe dans Forfait € OU Tonne € selon `pricingUnit`. * - le prix tombe dans Forfait € OU Tonne € selon `pricingUnit`.
*/ */
function toPriceRow(price: CarrierPriceRead): PriceRowView { function toPriceRow(price: CarrierPriceRead): PriceRowView {
const isClient = price.direction === 'CLIENT' const isClient = price.direction === 'CLIENT'
return { return {
apro: isClient ? labelOfRelation(price.clientDeliveryAddress) : labelOfRelation(price.supplierSupplyAddress), apro: isClient ? labelOfRelation(price.departureSite) : labelOfRelation(price.deliverySite),
delivery: isClient ? labelOfRelation(price.departureSite) : labelOfRelation(price.deliverySite), delivery: isClient ? labelOfRelation(price.clientDeliveryAddress) : labelOfRelation(price.supplierSupplyAddress),
forfait: price.pricingUnit === 'FORFAIT' ? formatAmount(price.price) : '', forfait: price.pricingUnit === 'FORFAIT' ? formatAmount(price.price) : '',
tonne: price.pricingUnit === 'TONNE' ? formatAmount(price.price) : '', tonne: price.pricingUnit === 'TONNE' ? formatAmount(price.price) : '',
// CarrierPrice n'a pas de taux d'indexation propre → on affiche celui du // CarrierPrice n'a pas de taux d'indexation propre → on affiche celui du