PO Closeout & Open-Commitment Accrual Helper
A month-end tool that flags purchase orders ready to close, computes the remaining open commitment per PO and cost center, and hands finance a clean accrual file — with a human approval gate before anything is closed.
Each month-end you load PO activity, the tool flags fully-satisfied and stale POs as closeout candidates and computes open commitment per PO and cost center, a reviewer approves the closures, and you export a closed-PO list plus an accrual CSV finance can post — with a full audit trail of who closed what.
Before you start
- A free Supabase account
- A free Resend account
- A Vercel account for deploy (free Hobby tier is fine)
- An export of your open POs with ordered / received / invoiced amounts per line (CSV or Google Sheet works)
The problem this kills
Every month-end, the same scramble. Finance asks procurement for "open commitments" and a list of POs that should be closed. You open a giant export of every PO, eyeball which ones are fully received and invoiced, guess which ones have been abandoned for months, and try to remember the difference between "we received it but haven't been invoiced yet" (accrue it) and "we ordered it but it hasn't shown up" (still a commitment). You hand the controller a number you half-trust, someone closes a PO that still had an uninvoiced receipt against it, and the accrual gets restated next month.
It is slow, it is manual, and it is exactly the kind of judgment-plus-bookkeeping work that an internal tool should be doing for you.
What you'll build
A small, private web app that:
- Loads your PO line activity (from a CSV/Google Sheet export today, or your ERP later).
- Flags closeout candidates automatically: POs that are fully received and invoiced, plus stale POs with no activity in N days (you set N).
- Computes the open commitment per PO and per cost center — ordered minus received-or-invoiced — and separates "received not invoiced" (an accrual) from "ordered not received" (a remaining commitment).
- Shows a reviewer the proposed closeout list and the accrual figures, and waits for a human to approve before anything is marked closed or any file is handed to finance.
- Exports a closed-PO list and an accrual journal CSV in the exact columns your finance system expects.
- Keeps an audit log of who closed which PO and when.
What's inside the Implementation Plan
The plan is a complete, paste-and-go runbook for an AI coding agent (Claude Code). You do not write code — you paste, answer questions, and review.
It opens by interviewing you about your business — your month-end process, your ERP or spreadsheet, your real PO-number and cost-center naming, your typical and peak PO volumes, your staleness rule, and your messy edge cases (partial receipts, credit memos, foreign currency, blanket POs). It reflects a short tailored spec back to you and gets your thumbs-up before it builds anything, so the tool fits how you actually work instead of a generic template.
From there it walks you step by step through the data model, the closeout and commitment logic, the review-and-approve screen, the CSV exports, and deploy — each step ending with a ready-to-copy prompt.
The governance it includes (this is the point)
This is not a throwaway script. The plan builds in the controls finance and audit will ask about:
- Login, so only your team can open the tool.
- Row-level security, so people only ever see their own organization's data.
- A hard human approval gate — the AI drafts the closeout list and accrual figures, a buyer or controller reviews them, and only then does anything get marked closed or exported.
- A complete audit trail — who closed what PO, and when.
- Duplicate guards keyed on PO number, plus a loud warning if a PO is proposed for closure while it still has uninvoiced receipts.
Who it's for
Procurement and finance staff who scramble every month-end to clean up dangling POs and explain "open commitments" to the controller — and who want an accurate, defensible accrual number without living in a spreadsheet for two days.
You've got this. Paste the first prompt and let the agent interview you.