Skip to content

Add support for configurable invoice sequence scopes#429

Open
tomkalon wants to merge 5 commits into
Sylius:2.2from
tomkalon:feature/configurable-sequence-number
Open

Add support for configurable invoice sequence scopes#429
tomkalon wants to merge 5 commits into
Sylius:2.2from
tomkalon:feature/configurable-sequence-number

Conversation

@tomkalon

Copy link
Copy Markdown
Q A
Branch? 2.2
Bug fix? no
New feature? yes
BC breaks? no
Related tickets #131
License MIT

Introduced InvoiceSequenceScopeEnum (monthly, annually, global)
Modified SequentialInvoiceNumberGenerator to support:

  • monthly invoice number resets
  • annually invoice number resets
  • default global sequence (current behavior)

Added ENV parameter:
SYLIUS_INVOICING_SEQUENCE_SCOPE=monthly

Accepted values:
monthly: separate invoice sequences per month
annually: separate invoice sequences per year
(anything else or empty): one global sequence

Kept backward compatibility — global behavior is preserved unless explicitly configured

@tomkalon
tomkalon force-pushed the feature/configurable-sequence-number branch from 915bccf to cdc2749 Compare June 18, 2026 09:31
@jkindly

jkindly commented Jul 16, 2026

Copy link
Copy Markdown

Overall looks OK, but I wonder if we can make it more "Admin friendly". For example:

  • add select field with period in channel settings
  • catch all defined periods as tagged parameters and display them in the select above
  • create period resolver/generator

If someone wants to extend scope (e.g. quarterly), the only thing to do is to add new scope as parameter + it's resolver/generator.
Also, there should be split for channels, because in channel X it can be monthly, but in channel Y it can be annualy.
Extending entity and making a new migration sounds bad for adding a new period.

It's just nice to have, but I think it's easy to implement.

btw. All builds fail.

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