Skip to content

302 — should create new full filled invoice

Description

Verifies the full happy path of creating an invoice end-to-end: header details, an item that links every available time record and expense, totals on the items grid, exporting the invoice, and the resulting lock on the now-billed expenses.

Preconditions

  • Signed-in tenant with one bank account, the seeded client Client 01, two time records (Private 01 €480.00 and Private 04 €2,880.00), and two seeded expenses (expense1 €500, expense2 €200) — all billable to Client 01.
  • The user is on the Invoices list page.

Steps

  1. Click Create invoice, pick client Client 01, click Next. Fill the header: date of issue (4th visible day), due date (8th), date of taxable supply (10th), and bank account from the seeded bank.
  2. Fill constant symbol, variable symbol, toggle Footer note on, and type the footer note.
  3. Click Add item, type the item name, open the Time records link picker. Expected: 2 unselected and 0 selected time records are listed.
  4. Click Select all. Expected: 2 selected, 0 unselected. Save the picker. Expected: the time-records total on the item modal reads 3,360.00.
  5. Open the Additional items link picker. Expected: 0 selected and 2 unselected expenses. Click Select all, save. Expected: the expenses total reads 700.00.
  6. Save the item. Expected: the items grid row shows time records = 2, additional items = 2, unit name -, units -, price 4,060.00, discount -, total €4,060.00, items total discount €0.00, items total €4,060.00, subtotal €4,060.00, grand total €4,060.00.
  7. Click Create and export, then switch to Additional items. Expected: both expenses are still marked billable, expense2 cannot be moved to trash, and expense2 shows the locked indicator because it has been invoiced.
  • Spec: playwright/tests/integration/invoice.spec.ts (line 114)