Skip to content

003 — should calculate invoice with drawn proforma amount (branch 2025006)

Description

Validates that when a proforma is drawn against an invoice, the drawn amount is subtracted from displayed values and reflected in difference calculations.

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 12 020 886 Kč, branch 2025006
  • Mock receipts-branch-2025006_all.json (4 documents with drawn proforma tracking)

Steps

  1. Navigate to contract detail — Expected: 4 rows: FP2025104631, FP2025104902, NP2025400068, ZP2025300150
  2. Assert displayed invoice amounts — Expected: Drawn proforma subtracted
  3. Assert costs, proforma, differences — Expected: Match payload including drawdown logic
  • Spec: tests/e2e/tests/contracts.spec.ts

Media

screenshot