From c3bbffe9c0847fe1af1f9741abb916d7f5c9fffa Mon Sep 17 00:00:00 2001 From: Konrad du Plessis Date: Wed, 25 Mar 2026 10:00:39 +0200 Subject: [PATCH] Update CLAUDE.md with Pay Immediately loan documentation Co-Authored-By: Claude Opus 4.6 --- CLAUDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index 43256ae..d536b35 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -63,7 +63,7 @@ Defined at top of views.py — used in dashboard calculations and payment proces ## PayrollAdjustment Type Handling - **Bonus / Deduction** — standalone, require a linked Project -- **New Loan** — creates a `Loan` record (`loan_type='loan'`); editing syncs loan amount/balance/reason; deleting cascades to Loan + unpaid repayments +- **New Loan** — creates a `Loan` record (`loan_type='loan'`); has a "Pay Immediately" checkbox (checked by default) that auto-processes the loan (creates PayrollRecord, sends payslip to Spark, marks as paid). When unchecked, the loan sits in Pending Payments for the next pay cycle. Editing syncs loan amount/balance/reason; deleting cascades to Loan + unpaid repayments - **Advance Payment** — **auto-processed immediately** (never sits in Pending): creates `Loan` (`loan_type='advance'`), creates PayrollRecord, sends payslip email, and auto-creates an "Advance Repayment" for the next salary. Requires a Project (for cost tracking) and at least one unpaid work log (otherwise use New Loan). - **Overtime** — links to `WorkLog` via `adj.work_log` FK; managed by `price_overtime()` view - **Loan Repayment** — links to `Loan` (loan_type='loan') via `adj.loan` FK; loan balance changes during payment processing