Skip to content

Commquest-Technologies/quest_statements

Repository files navigation

Quest Statements

A clean, customer-ready Statement of Account print format for ERPNext's Process Statement Of Accounts. Drop-in install — no doctype changes, no fixtures, no schema migrations. Works for both Accounts Receivable and General Ledger reports.

Statement of Account — page 1

Why

ERPNext's stock SOA template renders fine but is busy and dense — verbose remarks, default labels, and a layout that fights the eye when a customer is trying to reconcile what they owe. Quest Statements replaces the template with a tighter, more readable version that:

  • Uses accounting-friendly labels: Customer PO, Debit, Credit, Outstanding / Balance.
  • Renders payments as Payment EFT-20250320 → SINV-26000001 instead of ERPNext's auto-generated multi-line blob.
  • Renders credit notes as Return against SINV-26000002 instead of an empty cell.
  • Pulls Payment Terms and Credit Limit straight from the Customer doc — no extra setup.
  • Dates the statement by the period it covers (report_date for AR, to_date for GL) — not by when the PDF was downloaded.
  • Single table, no colspan — every column lines up cleanly across data, totals, and balance rows.
  • Multi-page safe: <thead> repeats on each page, sections stay together where it matters.

Install

cd $PATH_TO_YOUR_BENCH
bench get-app https://github.com/Commquest-Technologies/quest_statements.git
bench --site $YOUR_SITE install-app quest_statements
bench --site $YOUR_SITE clear-cache

Both Accounts Receivable and General Ledger reports will automatically use the new template the next time you generate a statement via Process Statement Of Accounts.

How it works

ERPNext's Process Statement Of Accounts looks up the process_soa_html hook per report and renders the registered Jinja template. This app registers a single template for both:

# hooks.py
process_soa_html = {
    "Accounts Receivable": "quest_statements/templates/statement_of_account.html",
    "General Ledger":      "quest_statements/templates/statement_of_account.html",
}

The template branches on report.report_name internally and produces the correct columns/rows for each report shape.

Generating a statement

  1. Open Process Statement Of Accounts in your ERPNext desk.
  2. Pick the report (Accounts Receivable for an as-at snapshot, General Ledger for a transaction log with running balance).
  3. For AR, set Posting Date to the as-at date you want (e.g. end of month). For GL, set From Date and To Date.
  4. Add the customer(s).
  5. Download or Send Now — the PDF uses this app's template.

Sample output

The example below is the GL view of a customer with 18 transactions across two months — invoices, partial and full credit notes, partial and multi-invoice payments — paginated across two pages:

Page 1 — header, opening balance, transactions: Page 1

Page 2 — transactions continued, closing totals, ageing summary: Page 2

Compatibility

  • Frappe / ERPNext v15+.
  • Multi-currency aware: respects presentation_currency from PSOA filters; falls back to row currency, then ZAR.
  • Works alongside any active Print Style.

Development

Pre-commit is configured for the standard Frappe toolchain (ruff, eslint, prettier, pyupgrade):

cd apps/quest_statements
pre-commit install

License

MIT

Releases

No releases published

Packages

 
 
 

Contributors