Skip to content

IA-975: `feat: Card last 4 digits on EReceipt screen and fix cent-to-euro amount formatting`

khadija.elbachouri a demandé de fusionner feature/IA-975 vers develop

Closes IA-975### MR Description

Summary

Surfaces the card last 4 digits on the e-receipt screen by threading the new fields through the type system, the transaction list navigation, and the receipt component. Also fixes a display bug where amounts were rendered as raw cents instead of euros.

Changes

types.ts

  • Added gatewayCustomerId: string | null and cardLast4: string | null to the Invoice interface
  • Added cardLast4 to customerInfo param type in EReceiptRouteProp
  • Added optional cardLast4 prop to TransactionCardProps EReceipt screen
  • Added cardLast4 and gatewayCustomerId to the default invoice fallback object
  • Added a conditional "Carte bancaire" row showing •••• •••• •••• XXXX with a credit card icon — only rendered when cardLast4 is available from customerInfo or invoiceData
  • Added formatAmount(value) helper to divide cents by 100 and call .toFixed(2), applied to subtotal, tax, discount, and total
  • Added cardContainer style for the card row layout Transactions screen
  • Navigation to ereceipt now passes customerInfo: { cardLast4: item.paymentDetails?.lastFourDigits || null } TransactionCard component
  • Accepts optional cardLast4 prop
  • Passes customerInfo: { cardLast4 } when navigating to the e-receipt screen
  • Navigation typed with NavigationProp<any> for type safety

Rapports de requête de fusion