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