Skip to content

feat(realunit): overhaul transaction receipt PDF#3865

Draft
TaprootFreak wants to merge 1 commit into
developfrom
feat/realunit-receipt-overhaul
Draft

feat(realunit): overhaul transaction receipt PDF#3865
TaprootFreak wants to merge 1 commit into
developfrom
feat/realunit-receipt-overhaul

Conversation

@TaprootFreak

Copy link
Copy Markdown
Collaborator

Summary

  • Language override: Receipt DTOs (RealUnitSingleReceiptPdfDto, RealUnitMultiReceiptPdfDto) now accept an optional language parameter so the app can request receipts in the user's current locale
  • Enhanced RealUnit description: Receipts use the official designation "RealUnit Namenaktie (Aktientoken REALU), ISIN CH1137233305 — Registerwertrecht via Ethereum-Blockchain" (i18n in DE/EN/FR/IT)
  • New receipt fields: Unit price per share, fee disclosure ("spesenfrei"), execution date+time, buyer name, wallet address, full tx hash, and payment method — rendered in a details section below the table
  • Layout improvements: Uses creditor city (Baar) instead of hardcoded "Zug", adds unit price column to table when available

Context

Requested by RealUnit Schweiz AG (Dani Stüssi) to bring transaction receipts in line with their corporate template and Swiss financial standards.

Changed files

File Change
realunit-pdf.dto.ts Add optional language?: PdfLanguage to both receipt DTOs
{de,en,fr,it}/invoice.json Add realunit_receipt i18n section (13 keys each)
swiss-qr.service.ts Extend SwissQRBillTableData, add drawReceiptDetails(), refactor generatePdfInvoice + generateMultiPdfInvoice for REALUNIT brand
realunit.controller.ts Pass dto.language and jwt.address to service methods

Test plan

  • Generate single receipt PDF via POST /v1/realunit/transactions/receipt/single with language: "DE" — verify German description with ISIN, unit price column, details section
  • Generate multi-receipt PDF via POST /v1/realunit/transactions/receipt/multi — verify per-transaction unit prices and shared details section
  • Generate receipt without language param — verify fallback to user profile language
  • Verify non-RealUnit (DFX brand) invoices are unchanged
  • Verify all 4 language variants render correctly (DE/EN/FR/IT)

Add language override parameter to receipt DTOs so the app can request
receipts in the user's current locale instead of the profile language.

Extend the RealUnit receipt with the fields requested by RealUnit
Schweiz AG: ISIN-qualified description ("Namenaktie / Registerwertrecht"),
unit price per share, fee disclosure ("spesenfrei"), execution date+time,
buyer name, wallet address, full tx hash, and payment method.

Add RealUnit-specific i18n keys in all four languages (DE/EN/FR/IT).
Refactor generatePdfInvoice and generateMultiPdfInvoice to conditionally
render the enhanced layout when brand is REALUNIT.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant