Skip to content

011 — should handle multiple credit notes on both costs and revenues (branch 2025017)

Description

Complex scenario: multiple credit notes on both received and issued sides, plus unpaid/partial payments. Validates end-to-end aggregation.

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 600 000 Kč, branch 2025017
  • Mock receipts-branch-2025017_credit_notes.json (4 received + 4 issued with credit notes)

Steps

  1. Open Received tab — Expected: 4 rows; net costs = 293 000 Kč
  2. Open Issued tab — Expected: 4 rows; net revenues = 458 000 Kč
  3. Assert final difference — Expected: Correctly aggregated across all credit notes and payment states
  • Spec: tests/e2e/tests/contracts.spec.ts

Media

screenshot

screenshot