Preskoči na sadržaj

E8-F4: Obračuni (Deferred Payment Billing)

Epic: E8: Payment Processing

Size: M (Medium)

Problem / Outcome

Petrol and deferred-payment quota owners take seats and pay HNS later. An Obračun (OBR-…) records what each owes, is billed by HNS's accounting and is marked paid when the money arrives (ADR 0039 in the ticketing repository).

Scope

In-Scope:

  • One Obračun per Petrol quota, for its allocation (every seat it holds, sold or not), and one per priced, deferred, top-level quota, for the tickets claimed from it and its sub-quotas
  • Kept in step with its quota; a cancelled quota or a cancelled match owes nothing
  • Admin portal Naplata ▸ Obračuni: who owes (name, OIB, address), send with the accounting document's number, mark paid; overdue (Dospjelo) 30 days after the match by default
  • The quota portal names who is billed for a deferred quota's claims, and by when

Out-of-Scope:

  • Issuing the document through e-Računi (HNSTIK-419, waiting for HNS)
  • Automatic payment matching and payment reminders

Acceptance Criteria

  • AC1: A Petrol quota opens a draft Obračun for its allocation; a deferred quota one for the tickets claimed from it
  • AC2: An Obračun is sent with the accounting document's number and marked paid; a sent one is not edited, and a later change shows as a difference
  • AC3: A cancelled quota's draft Obračun is cancelled; a cancelled match owes nothing

Data Model Impact

bills replaces payment_offers and debtors: see data-model.md#bills.

Permissions/Roles

  • Match manager: Naplata ▸ Obračuni (the reports role reads the totals in Naplata ▸ Pregled)

How to Verify

make backend-test ARGS="--filter BillTest" in the ticketing repository.

Dependencies

Implementation Tasks

See E8: Payment Processing Tasks

Doc References


Last Updated: January 2026