Skip to content

Conversation

@github-actions
Copy link

Automatic Release PR

This PR was automatically created after changes were pushed to develop.

Commits: 1 new commit(s)

Checklist

  • Review all changes
  • Verify CI passes
  • Approve and merge when ready for production

* Reduce required fields for invoice generation

Only require accountType and name (firstname/surname for personal,
organizationName for organizations) instead of full KYC data for
invoice PDF generation.

* Add separate isInvoiceDataComplete property for invoice validation

Separate KYC data completion from invoice data requirements:
- requiredKycFields: minimal fields for KYC step completion (name + accountType)
- requiredInvoiceFields: full address fields required for valid invoices
- isInvoiceDataComplete: used in invoice generation endpoints

This prevents TypeError when generating invoices with incomplete address
data, while still allowing KYC steps to complete with minimal data.

Affected files:
- user-data.entity.ts: add requiredInvoiceFields and isInvoiceDataComplete
- swiss-qr.service.ts: use isInvoiceDataComplete in getDebtor()
- transaction-helper.ts: use isInvoiceDataComplete for invoice validation
- buy.controller.ts: use isInvoiceDataComplete for invoice endpoint
- transaction.controller.ts: use isInvoiceDataComplete for invoice endpoint

* Fix: keep requiredKycFields unchanged, only add minimal requiredInvoiceFields

- Restore requiredKycFields to original (all KYC fields)
- requiredInvoiceFields now only requires accountType + name
- This ensures invoice PDF can be generated with minimal data
- All other functionality (sell routes, KYC status, etc.) unchanged

* Fix null pointer exception when address is missing in getDebtor

* Fix undefined buildingNumber in invoice PDF debtor address

* Fix SwissQRBill validation error for users without address

- Return undefined debtor when no valid address (country) exists
- SwissQRBill library requires country to be exactly 2 characters
- Add debtorName parameter to always show name on PDF
- Remove "Debtor is required" checks to allow invoice generation
  without full address data
@TaprootFreak TaprootFreak merged commit 444a53d into main Jan 22, 2026
7 checks passed
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