Verified BursaPay finance workflow: Explains the atomic period-close workflow and report generation.
1. Overview & Purpose
Closing an open period sets is_closed and closed_at, writes a period_close audit event, then queues the period-close report after commit. Already-closed periods do not create another write or task.
2. Requirements & Setup
Only a Superadmin may close a period.
3. Step-by-Step Workflow
- Open the relevant BursaPay finance dashboard workflow.
- Review the required state, filters, dates or records.
- Complete the permitted finance action or inspection.
- Verify the resulting state and audit trail.
4. Rules & Troubleshooting
The report task is intentionally queued outside the atomic database block so it runs after a successful commit.
5. Verification & Next Steps
Verify closed state and audit entry before relying on the period-close report.