Repository navigation
feat(report): Invoices Awaiting Receipt - #12
Merged
Merged
Conversation
…r invoice no) Rukn books Purchase Invoices before the goods arrive (Update Stock off, no PO) and enters the Purchase Receipt later; ERPNext holds no link between them, so standard To-Bill / fulfilment views cannot show what is still outstanding. Pairs the two documents on supplier + supplier invoice number (case, spaces and dashes ignored), plus any direct item link. Four views: - Invoices Awaiting Receipt (ageing, possible same-amount receipt hint) - Receipts Without Invoice - Amount Mismatch (paired by number, totals differ beyond tolerance) - Possible Duplicate Receipts (DUP/COPY suffix on the invoice number, or same supplier + invoice date + items/qty/rate) Matching and duplicate logic are pure functions with unit tests; smoke tests run every view against site data. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
New Script Report Invoices Awaiting Receipt (Ram Custom, Purchase Invoice). Tracks Purchase Invoices booked before the goods are received.
Why
Rukn books PIs first (Update Stock off, no PO) and enters the PR ~30 days later. ERPNext holds no PI-PR link, so To-Bill and the existing Purchase Invoice Fulfilment Status report cannot show what is outstanding. Live check (read-only, 2026-10-22): 2,705 PI-first invoices, 0 PO-linked; 2,703 pair 1:1 with a PR on supplier + invoice number.
How
Pairs PI
bill_nowith PRcustom_supplier_invoice_numberper supplier (case/space/dash-insensitive), plus any direct item link. Four views: Invoices Awaiting Receipt, Receipts Without Invoice, Amount Mismatch, Possible Duplicate Receipts (catches the-DUPLICTEsuffix trick behind PR-0411).Tests
Pure-logic unit tests (12, run locally with a stubbed frappe: pass) plus site-data smoke tests (not run in a bench). Code run read-only against live data via console: all 4 views return in <1s.
Deploy
No migrate patches, no schema change. Standard report JSON is synced by
bench migrate.🤖 Generated with Claude Code