Skip to content

fix: set custom invoice number only if available#228

Merged
barredterra merged 1 commit into
developfrom
invoice-number-availability
Feb 17, 2026
Merged

fix: set custom invoice number only if available#228
barredterra merged 1 commit into
developfrom
invoice-number-availability

Conversation

@barredterra
Copy link
Copy Markdown
Member

@barredterra barredterra commented Feb 17, 2026

The custom invoice number might not be generated until submission.
For e-invoice validation to pass during previous draft saves, we need to fall back to doc.name as long as the custom number is not available.

The custom invoice number might not be generated until submission.
For einvoice validation to pass during previous draft saves, we need to
fall back to doc.name as long as the custom number is not available.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an issue where e-invoice validation would fail during draft saves when a custom invoice number is configured but not yet generated. The fix adds a check to ensure the custom invoice number field has a value before using it, falling back to the document name otherwise.

Changes:

  • Modified the invoice number assignment logic to check both the field configuration and value availability using the walrus operator

@barredterra barredterra merged commit 7f79976 into develop Feb 17, 2026
16 checks passed
@barredterra barredterra deleted the invoice-number-availability branch February 17, 2026 14:18
@barredterra
Copy link
Copy Markdown
Member Author

@Mergifyio backport version-16-hotfix version-15-hotfix

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Feb 17, 2026

backport version-16-hotfix version-15-hotfix

✅ Backports have been created

Details

mergify Bot pushed a commit that referenced this pull request Feb 17, 2026
The custom invoice number might not be generated until submission.
For einvoice validation to pass during previous draft saves, we need to
fall back to doc.name as long as the custom number is not available.

(cherry picked from commit 7f79976)
mergify Bot pushed a commit that referenced this pull request Feb 17, 2026
The custom invoice number might not be generated until submission.
For einvoice validation to pass during previous draft saves, we need to
fall back to doc.name as long as the custom number is not available.

(cherry picked from commit 7f79976)
barredterra added a commit that referenced this pull request Feb 17, 2026
The custom invoice number might not be generated until submission.
For einvoice validation to pass during previous draft saves, we need to
fall back to doc.name as long as the custom number is not available.

(cherry picked from commit 7f79976)

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
barredterra added a commit that referenced this pull request Feb 17, 2026
The custom invoice number might not be generated until submission.
For einvoice validation to pass during previous draft saves, we need to
fall back to doc.name as long as the custom number is not available.

(cherry picked from commit 7f79976)

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
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.

2 participants