Skip to content

004 — should calculate costs from standard received invoices (branch 2025009)

Description

Validates that plain received invoices (FP only, no proformas or credit notes) aggregate into costs and produce a negative current/final difference.

Preconditions

  • Clean database (TestControl.cleanDb())
  • User logged in with ADMIN role
  • Contract created via API with branch-specific mock data loaded from receipts-branch-*.json
  • Contract price 100 000 Kč, branch 2025009
  • Mock receipts-branch-2025009_standard.json (2 FP invoices)

Steps

  1. Navigate to contract detail — Expected: Price 100 000,00 Kč; 2 invoice rows
  2. Assert costs without VAT — Expected: Sum of both invoices
  3. Assert revenues and proforma totals — Expected: All zero
  4. Assert differences — Expected: Equal to contract price minus costs (negative)
  • Spec: tests/e2e/tests/contracts.spec.ts

Media

screenshot