# Daily operations

## Enrolment → money → class → proof
1. **Enrolment** arrives (learner clicks *Enrol* on a batch, or admin enrols from *Learners → profile*). An invoice is created and e-mailed.
2. **Payment**: learner pays by bank/Easypaisa/JazzCash and uploads proof (*Billing* in their portal or the public invoice link). Admin opens **Payments → Pending proofs**, approves (receipt PDF is e-mailed) or rejects with a reason. Or record a payment directly on the invoice.
3. **Activation**: at ≥ 50 % paid (`INFOTICS_ACTIVATION_MIN_PERCENT`) the enrolment activates automatically and the learner receives the welcome mail. Admin can override in **Enrolments → Activate**.
4. **Schedule**: create a batch, click *Generate sessions*, then *Notify schedule* — learners and the trainer get the timetable with a calendar file. Reminders go out 24 h and 1 h before each class.
5. **Attendance**: trainer opens *Attendance* → the class → marks each learner → *Save*. Trainers can edit for 7 days; admins any time. Learners below 75 % get a warning mail.
6. **Materials**: trainers/admins upload video or PDF (*Materials*), tick *notify learners*.
7. **Exam**: eligible learners (enrolled, paid, attempts left) start from *Exams*. Results, integrity flags and answers are in *Admin → Exams → Attempts*; void an attempt if misconduct is proven.
8. **Credentials**: passing an exam issues the exam badge + certificate; **Complete enrolment** issues the course-completion badge/certificate if attendance ≥ 75 %. Resend, revoke or re-issue in *Certificates* / *Badges*.
9. **Careers**: employers post jobs → admin approves (*Jobs*) → learners apply → employers move candidates through stages; learners control access to their profile.

## Installment plans
*Payment plans → New* (or the wallet icon on an enrollment / invoice): enter the course fee, registration fee, exam fee, extra charges, discount (with reason) and tax, choose the number of installments and dates — the live preview shows the schedule. Saving syncs the invoice and the enrollment fee, allocates money already received, and emails the schedule PDF + invoice.
* **Record payment** on an installment row: a smaller amount is a partial payment; a larger amount flows to the next installments. A receipt is generated and emailed automatically.
* **Reschedule / Waive / Discount / Edit / Cancel** from the plan page. Waivers and discounts need a written reason; your name is recorded as the authoriser. Nothing is deleted: refunds reverse allocations, cancelled plans keep their history. Every change is in the plan's *Financial audit trail* and the global audit log.
* Reminders before due dates and overdue notices (with an admin alert) are automatic. Use *Send reminder* for an immediate one.

## Communications
*Communications → Send*: choose learners, a batch, leads, workshop registrants, meeting participants or email addresses → choose a template → optional personal note → **Preview** → **Send**. Every "Send details" button in the admin opens this page pre-filled. Edit wording in *Email templates* (variables, blocks, attachments, preview with a real learner, test send). *Communication history* shows every message with its status and related record; failed messages can be retried. Learners see their messages under *Messages*.

## Automations
*Automations* lists each event and its steps. Switch steps on/off, change the template or recipient, or add steps (send template, notify admin, log). Core money/credential steps always run. The *Run log* records every step with its outcome.

## Workshops, meetings, alumni
Workshops get a public page (*Events*). Registrations arrive as pending (registrants also become leads); approve or reject one by one or in bulk — approval emails the confirmation, creates the session, sends the meeting link with a calendar file and schedules the 24 h reminder. *Meetings* handles counselling, demos and orientations. Marking an enrollment completed issues the certificate and badge, adds the learner to *Alumni* and emails a feedback form.

## Quotations
*Quotations → New*: choose/enter customer, add line items, optionally pick the batch to enroll into and the number of installments, **Save & send**. The customer opens the public link → Accept/Decline. Accepting raises the invoice and — when a batch is set — creates the learner account, the enrollment and the installment plan, and emails the invoice and schedule.

## Fee on request (no fee shown online)
*Courses → Edit → Fee on website = Fee on request*. Learners click **Apply** and the seat is held. Then *Enrollments → Awaiting fee → Set fee*: single invoice, installment plan, sponsored or waived. After that the normal invoice → payment → receipt flow applies. Full workflow: docs/AUDIT-2026-10.md §4.

## Online payments and video platforms
*Admin → Integrations* shows which gateways (JazzCash, Easypaisa, PayFast) and video platforms (Zoom, Google Meet, Webex; NetAcad and Teams by pasted link) are connected, the callback URLs, the required `.env` keys and recent online transactions.

## Growth operations (run hourly by `infotics:ops`)
* **Waitlist**: full batch → *Join waitlist*. A freed seat is offered to the next learner for 48 h, then rolls on.
* **Exam vouchers**: *Academics → Exam vouchers*. Import codes, assign them (learners marked ✓ are exam-ready), and expiry reminders go out at 30, 14 and 3 days.
* **Content freshness**: *Academics → Content freshness*. Mark a course "checked today" after comparing it with the vendor outline. Overdue courses are emailed to admins every Monday.
* **Quality & NPS**: *Overview → Quality & NPS*, built from the automatic feedback requests.
* **Send course details**: from a course or batch page, to learners, leads or any email address, with an optional privately quoted fee.

## When something goes wrong
* **E-mail not arriving** → *E-mail log*: read the error, fix SMTP, click *Retry*. Check the queue worker is running.
* **Upload fails** → see docs/DEPLOYMENT.md “Upload limits”.
* **Learner cannot open a lesson** → enrolment must be *active* (payment ≥ 50 %) and the resource published for their batch.
* **Wrong certificate** → *Certificates → Revoke* (reason is shown on the public page) then issue a new one.
* **Audit trail** → *Admin → Audit log*.
