Skip to content

010 — should calculate positive difference when revenues exceed costs (branch 2025016)

Description

Profitable scenario: issued invoices exceed received invoices. Validates positive difference and issued-tab functionality with drawn proforma.

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 800 000 Kč, branch 2025016
  • Mock receipts-branch-2025016_issued_heavy.json (1 received + 6 issued, including fully drawn 200 000 proforma)

Steps

  1. Open Received tab — Expected: 1 row FP2025116001 = 35 000 Kč
  2. Assert revenues = 615 000 Kč net — Expected: Includes drawn proforma adjustments
  3. Assert positive final difference — Expected: Profitable outcome
  4. Switch to Issued tab — Expected: 6 issued rows shown
  • Spec: tests/e2e/tests/contracts.spec.ts

Media

screenshot

screenshot