pelagia-portal/App/prisma
Hardik 99c928213b
All checks were successful
PR checks / checks (pull_request) Successful in 43s
PR checks / integration (pull_request) Successful in 30s
feat(po): manager sets advance payment on approval (issue #92)
The approving Manager decides how much of the PO is paid first, via a
0–100% slider on the approval card (default 100% = full). The slider is
convenience only — the resolved ABSOLUTE amount is stored on
PurchaseOrder.suggestedAdvancePayment (Decimal(12,2), nullable).

- schema + migration: add suggestedAdvancePayment (null = no explicit
  advance ⇒ full payment, preserves legacy behaviour).
- approvePo(): accepts the amount, clamps to [0, totalAmount], persists
  it, records it on the APPROVED audit row. Set once at approval; never
  edited afterwards.
- approval-actions.tsx: whole-percent slider showing the resolved ₹
  amount + remaining balance; value sent with Approve / Approve-with-Remarks.
- Accounts surface: payment queue + PO detail show the advance; it
  prefills the FIRST payment amount (only when nothing is paid yet and
  it is a true partial). Balance runs the normal PARTIALLY_PAID loop.
- Not shown on the exported PO/invoice (po-export-layout untouched).
- Tests: persist + audit metadata + clamp-to-total.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 01:40:20 +05:30
..
migrations feat(po): manager sets advance payment on approval (issue #92) 2026-06-24 01:40:20 +05:30
accounting-codes-data.ts feat(accounts): hierarchical accounting codes with 6-digit format and category tree 2026-05-30 03:27:31 +05:30
rank-data.ts feat(crewing): foundations — SITE_STAFF role, ranks reference data + admin (flagged) 2026-06-22 13:26:04 +05:30
rank-doc-data.ts feat(crewing): foundations — SITE_STAFF role, ranks reference data + admin (flagged) 2026-06-22 13:26:04 +05:30
schema.prisma feat(po): manager sets advance payment on approval (issue #92) 2026-06-24 01:40:20 +05:30
seed-prod.ts feat(crewing): foundations — SITE_STAFF role, ranks reference data + admin (flagged) 2026-06-22 13:26:04 +05:30
seed-ranks.ts feat(crewing): foundations — SITE_STAFF role, ranks reference data + admin (flagged) 2026-06-22 13:26:04 +05:30
seed.ts feat(crewing): foundations — SITE_STAFF role, ranks reference data + admin (flagged) 2026-06-22 13:26:04 +05:30