Skip to content

Commit 3353c9a

Browse files
committed
Extend GLOBAL invoice sequence scope with null year and month fields
1 parent 92fa666 commit 3353c9a

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

UPGRADE-2.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# UPGRADE FROM 2.0.2 TO 2.0.3
1+
# UPGRADE FROM 2.0 TO 2.1
22

33
## Changes
44

src/Generator/SequentialInvoiceNumberGenerator.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ private function getSequence(): InvoiceSequenceInterface
7878
InvoiceSequenceScopeEnum::ANNUALLY => [
7979
'year' => (int) $now->format('Y'),
8080
],
81-
InvoiceSequenceScopeEnum::GLOBAL => [],
81+
InvoiceSequenceScopeEnum::GLOBAL => [
82+
'year' => null,
83+
'month' => null,
84+
],
8285
};
8386

8487
/** @var InvoiceSequenceInterface|null $sequence */

tests/TestApplication/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ WKHTMLTOPDF_PATH=/usr/local/bin/wkhtmltopdf
1010

1111
TEST_SYLIUS_INVOICING_PDF_GENERATION_DISABLED=false
1212
TEST_SYLIUS_INVOICING_PDF_GENERATION_DISABLED=false
13+
1314
SYLIUS_INVOICING_SEQUENCE_SCOPE='monthly'

0 commit comments

Comments
 (0)