Skip to content

Add plafond and remainingAmount to fuel card response

yassine sabir a demandé de fusionner bugFix/CardLimitDetail vers develop

fix(fuel-card): populate plafond and remainingAmount from FuelCard entity

Issue: The mobile app endpoint /api/fleet/driver/{id}/fuel-cards was returning null values for plafond and remainingAmount, while the BO app endpoint correctly showed cardLimit.

Solution:

  • Inject FuelCardOverviewRepository into FuelCardMapper
  • Fetch FuelCard entity by cardNumber to retrieve cardLimit
  • Set plafond to cardLimit value (instead of hardcoded null)
  • Calculate remainingAmount as plafond - amountUsed
  • Apply same fix to toHistoryDto() method

This ensures both endpoints return consistent data.

Rapports de requête de fusion