Skip to content

327 — should apply numbering sequence and use it in a created invoice

Description

Verifies the full numbering-sequence flow end-to-end: configure a custom numbering sequence in settings, confirm the change, then create an invoice and check that the first issued invoice number matches the configured pattern.

Preconditions

  • Signed-in tenant with Client 01, a seeded bank account, and the user on the Invoice settings page.

Steps

  1. Click Edit numbering sequence. Apply: year format YYYY, Show month on, serial placement at the Beginning, 4 serial digits, separator - (hyphen), prefix Test-prefix.
  2. Click Save on the numbering sequence editor. Expected: the numbering-sequence update confirmation prompt appears. Click Confirm. Expected: the "Updated" toast appears.
  3. Switch to Invoices, click Create invoice, pick Client 01, click Next, fill date of issue (4th day), due date (8th), date of taxable supply (10th) and the bank account. Toggle Set as paid on and set date of payment to the 11th day.
  4. Click Create and export, then close the modal.
  5. Expected: the €0.00 row's invoice number matches the preview value produced by buildInvoicePreview for the configured sequence with serial number 1 for today (e.g. 0001-Test-prefix-<MM>-<YYYY>).
  • Spec: playwright/tests/integration/invoice.spec.ts (line 800)