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) :
|
* 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
|
||||||
|
|||||||
Reference in New Issue
Block a user