Add support for configurable invoice sequence scopes#395
Open
tomkalon wants to merge 5 commits intoSylius:2.1from
Open
Add support for configurable invoice sequence scopes#395tomkalon wants to merge 5 commits intoSylius:2.1from
tomkalon wants to merge 5 commits intoSylius:2.1from
Conversation
3404493 to
3ca816e
Compare
3ca816e to
3353c9a
Compare
jacquesbh
reviewed
Oct 21, 2025
Comment on lines
14
to
16
| <field name="year" type="integer" nullable="true"/> | ||
| <field name="month" type="integer"/> | ||
|
|
There was a problem hiding this comment.
Why not having a sequence_type and an enum of possibilities? If we want to improve this or change the behavior we would be obliged to add one or more columns.
WDYT?
| sylius_invoicing.invoice_save_path: "%kernel.project_dir%/private/invoices/" | ||
| sylius_invoicing.filesystem_adapter.invoice: "sylius_invoicing_invoice" | ||
| sylius_invoicing.sequence_scope: '%env(default::SYLIUS_INVOICING_SEQUENCE_SCOPE)%' | ||
| env(SYLIUS_INVOICING_SEQUENCE_SCOPE): 'global' |
There was a problem hiding this comment.
I disagree with the (anything else or empty): one global sequence.
Either it's global or empty, but "anything else" could lead to future issues with custom developments.
Comment on lines
+75
to
+76
| 'year' => (int) $now->format('Y'), | ||
| 'month' => (int) $now->format('m'), |
There was a problem hiding this comment.
I don't get why you have values here.
You wrote "monthly" or "yearly". You didn't specify that we could chose when it happens precisely.
I feel strange about this.
3982118 to
2f4c991
Compare
2f4c991 to
efd462a
Compare
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.
Introduced InvoiceSequenceScopeEnum (monthly, annually, global)
Modified SequentialInvoiceNumberGenerator to support:
Added ENV parameter:
SYLIUS_INVOICING_SEQUENCE_SCOPE=monthlyKept backward compatibility — global behavior is preserved unless explicitly configured