001 — should calculate proforma without tax document (branch 2025008)¶
Description¶
Validates that proforma invoices without a tax document (FP + ZP only) are parsed and aggregated correctly into contract costs, revenues, proforma totals, and differences.
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 2025008, dates 2025-02-18 – 2025-12-31
- Mock
receipts-branch-2025008_withoutDok.json(2 documents: FP2025104631, ZP2025300150)
Steps¶
- Navigate to contract detail — Expected: Contract loads with term 18.02.2025 – 31.12.2025, state Aktivní, branch 2025008, price 12 020 886,00 Kč
- Inspect invoice list — Expected: 2 rows displayed (FP2025104631, ZP2025300150)
- Assert costs/revenues without VAT — Expected: Values match payload aggregation
- Assert proforma received and issued totals — Expected: Match payload
- Assert final and current differences — Expected: Correctly computed from contract price minus invoice totals
Related¶
- Spec:
tests/e2e/tests/contracts.spec.ts
Media¶
