Skip to content

009 — should calculate simple costs without revenues (branch 2025015)

Description

Simple case: only received invoices (costs), no issued invoices. Validates cost aggregation when revenues are zero.

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 2025015
  • Mock receipts-branch-2025015_simple.json (3 FP totalling 66 000 Kč)

Steps

  1. Navigate to contract detail — Expected: 3 FP rows
  2. Assert costs = 66 000 Kč, revenues = 0, proformas = 0 — Expected: Match payload
  3. Assert final/current differences = -66 000 Kč — Expected: Negative = budget surplus remaining
  • Spec: tests/e2e/tests/contracts.spec.ts

Media

screenshot