Archive paid invoices and departed-student notes to PDF, retain the records for 7 years, then purge them once the retention clock expires. Archiving and deletion are strictly separated — nothing is deleted until you verify the PDF, and the server refuses to purge anything younger than 7 years.
For each student, combines every paid invoice with a payment date on or before the cutoff into a single PDF (named YYYYMMDD-YYYYMMDD_StudentName.pdf). The included invoices are marked as pending review — no data is deleted at this stage.
One PDF per student, combining every paid invoice in the period. Open each PDF, confirm it accurately represents the included invoices, then mark it verified.
Verified archives are kept in the database, hidden from active billing, until their 7-year retention clock expires. Nothing here is deleted yet — use Step 4 once retention has passed.
No verified archives yet.
Only verified archives whose 7-year retention has expired appear here. Each purge deletes the invoice records and their linked session records; the PDF stays in storage. The server refuses anything younger than 7 years.
No archives past their retention date yet.
Resets archival_status, archival_pdf_url, and verification fields to null on every invoice, so the whole run can be re-executed. Does not touch invoice data or delete stored PDFs.
For a departed student (inactive, no future sessions, last session at least 1 year ago), compiles every session's notes plus tutor profile notes into one PDF. The notes stay in the database until the 7-year retention clock expires, then are purged with the invoices.
Open each PDF, confirm it captures the notes, then verify it.
No notes archives awaiting review.
Retained until the 7-year clock expires, then purge-ready below.
No verified notes archives.