Skip to content

325 — should apply default VAT rate to all invoice items and the summary

Description

Verifies that enabling a default VAT rate of 20% in invoice settings applies that VAT rate to every item added to a new invoice, increasing each item's final price by 20% and producing matching VAT totals on the invoice summary.

Preconditions

  • Signed-in tenant with Client 01, time records Private 01 (€480) and Private 04 (€2,880), expense2 (€200), and the user on the Invoice settings page.

Steps

  1. Toggle VAT on, set value 20, save settings. Expected: the "Saved" toast appears.
  2. Switch to Invoices, click Create invoice, pick Client 01, click Next.
  3. Add item 1 with a name; link time record Private 04. Expected: the item modal shows VAT 20, price 2880, final price 3456 (2880 × 1.20). Link expense expense2. Expected: VAT 20, price 3080, final price 3696 (3080 × 1.20). Save item.
  4. Add item 2 with a name; link Private 01; toggle Has unit on, units 3, unit price 100, unit name. Expected: final price 360 (300 × 1.20). Switch item discount type to Amount and value 50. Expected: final price 300 ((300 − 50) × 1.20). Save item.
  5. Expected: the items grid shows 2 items. Item 1 row shows VAT 20 and total €3,696.00. Item 2 row shows VAT 20 and total €300.00.
  6. Expected: items total VAT €666.00, items total discount €50.00, items total €3,996.00, subtotal €3,330.00, excluding VAT €3,330.00, VAT €666.00, grand total €3,996.00.
  • Spec: playwright/tests/integration/invoice.spec.ts (line 703)