Back to Field Notes
Infinary Engineering Group

Job Done, Invoice Sent: Turning a Finished Job into a Paid Invoice — No Keystrokes

For most service businesses the slowest part isn't the work — it's the gap between finishing the work and billing for it. Here's how we make a completed, verified job create and send its own invoice, so cash stops sitting in a clipboard.

The slowest part of a service business usually isn’t the service. It’s the gap between “the job is done” and “the customer has been billed.” Work gets finished in the field on Tuesday and invoiced from the office the following Monday — if someone remembers. That week is money you’ve already earned, sitting uninvoiced.

We recently moved a fast-growing cleaning company off paper timesheets, a whiteboard schedule, and hand-typed invoices and onto one platform it owns (the full story is in the case study). The single biggest cash-flow win wasn’t a new tool — it was closing the gap between done and billed so it takes no human step at all.

This is the outbound side of the money loop — invoices you send. The inbound side — reading supplier bills you owe — is a separate write-up. Together they close both halves.

The Gap Between “Done” and “Billed”

On paper, billing is a relay race with too many handoffs:

  1. A crew finishes a job and writes it on a timesheet.
  2. The slip travels to the office — eventually.
  3. Someone re-types the hours and remembers which jobs need invoicing.
  4. Someone types each invoice.
  5. Someone emails it.
  6. Everyone waits to get paid.

Every handoff adds delay, and every handoff is a chance to drop the ball entirely. The invoice that never gets sent is pure lost revenue, and it happens more than any owner wants to admit.

Make “Done” the Trigger, Not a Note

The fix is to stop treating “job complete” as a note someone acts on later, and start treating it as the event that creates the invoice. When a crew marks a job complete on their phone and its checklist passes, the system itself builds the invoice from the contract’s agreed rate and sends it.

In the all-in-one business software (ERPNext, built on the Frappe framework), every record can fire off code when its status changes. So we hang the billing logic directly on the moment a field visit is marked done:

# When a crew marks a Service Visit complete on their phone, bill it —
# automatically, from the contract's agreed rate. No one types an invoice.

import frappe
from frappe.utils import today, add_days

def on_service_visit_submit(doc, method):
    # 1. Only ever bill work that's actually verified done.
    if doc.status != "Completed" or not doc.checklist_passed:
        return

    # 2. Never bill the same visit twice, even if the record is re-submitted.
    if frappe.db.exists("Sales Invoice",
                        {"service_visit": doc.name, "docstatus": 1}):
        return

    contract = frappe.get_doc("Service Contract", doc.contract)

    invoice = frappe.get_doc({
        "doctype": "Sales Invoice",
        "customer": contract.customer,
        "service_visit": doc.name,                 # link back for a clean audit trail
        "items": [{
            "item_code": contract.service_item,    # e.g. "RECURRING-CLEAN"
            "qty": 1,
            "rate": contract.agreed_rate,
        }],
        "due_date": add_days(today(), contract.payment_terms_days),
    })
    invoice.insert()
    invoice.submit()

    # 3. Email the customer a card-payment link the moment the crew drives away.
    send_stripe_payment_link(invoice)

That’s the whole idea: the finished job is the invoice trigger. The office never re-types anything, and no completed job slips through unbilled.

Why Tie It to the Checklist, Not the Clock

Notice the first guard — the invoice only fires if the job is marked complete and its checklist passed. That’s deliberate. We bill verified work, not merely scheduled work.

The digital checklist and proof-of-service the crew completes on-site are the gate. If the checklist isn’t finished, no invoice goes out. This protects the customer relationship as much as the books: you never bill for a clean that didn’t fully happen, and when a client questions an invoice, the completed checklist and timestamps are right there to back it up.

Recurring Work That Bills Itself

For a business built on recurring accounts, this compounds. The service contract generates the scheduled jobs; the completed jobs generate the invoices. The owner sets up a weekly office account once, and from then on the schedule, the work, and the billing all flow from that single agreement — with the option to roll a month of visits into one tidy invoice per commercial client instead of many small ones.

The Payoff

Same-day invoicing instead of a week. Cash that used to sit in a clipboard now moves the day the work is done. No invoice ever forgotten, because no human has to remember to send it. And the office hours that used to go into re-keying and chasing paperwork go back into actually running the business.

AI and automation shouldn’t be a separate app you log into to push paperwork. They should be part of how the one platform runs — quietly closing the loop between the work and the money.

Infinary Engineering Group

#Automation #ERPNext #Field Service #FinOps

Authenticated Dispatch

Infinary Engineering Group

ERPNext on Google Cloud

Talk to Us