Merged
Conversation
* 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automatic Release PR
This PR was automatically created after changes were pushed to develop.
Commits: 1 new commit(s)
Checklist