004 — should calculate costs from standard received invoices (branch 2025009)¶
Description¶
Validates that plain received invoices (FP only, no proformas or credit notes) aggregate into costs and produce a negative current/final difference.
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 2025009
- Mock
receipts-branch-2025009_standard.json(2 FP invoices)
Steps¶
- Navigate to contract detail — Expected: Price 100 000,00 Kč; 2 invoice rows
- Assert costs without VAT — Expected: Sum of both invoices
- Assert revenues and proforma totals — Expected: All zero
- Assert differences — Expected: Equal to contract price minus costs (negative)
Related¶
- Spec:
tests/e2e/tests/contracts.spec.ts
Media¶
