The technician marks the job done, the manager approves it, and finance still cannot bill. Each of them is right about their own step in the process. The word that is wrong is "done": your system stores one flag where three different facts belong. The work is finished, the evidence is complete, and your finance team can act on it to send the invoice.
You stop chasing paperwork to get paid.
Why one flag costs days
The flag hides what is missing. To bill, your finance team needs the customer's sign-off, the purchase order number, and a reason for any charge that differs from the work order. When one of them is missing, the job still shows complete, and nobody sees the gap until someone in finance asks for it. Until then, the invoice waits, and so does your cash.
Asking technicians to fill in everything before the job closes only moves the problem. They would need to know finance's rules for every job type and contract. Put those rules in the system instead, and have it show each requirement when the record is prepared.
One record, five named states
Give each job a single record that is always in exactly one of five states, and allow only the moves you list. Engineers call this a state machine. It differs from a status field with more options because each move carries its own rule about evidence and authority.
State
It moves on when
Who acts
Work recorded
Evidence attached, or an item is missing
The system
Evidence checked
A person with billing authority approves
The approver
Held for an exception
The missing item is supplied
One named owner
Approved for billing
Finance confirms the invoice exists
Finance
Invoiced
It stays; a correction links to it
Finance
A job cannot be approved for billing until the sign-off, purchase order and any charge reason are attached. A job missing any of them is held for an exception, naming the missing item and one owner. Each move records who made it, when, and on what evidence. When an auditor asks why a job was billed, the record answers. A model can read technicians' notes and flag a charge that needs a reason; the state rules still decide if the job moves.
4.20123456789.0123456789 days
Time the four states on the main path and you see where your finished jobs wait; in this example, it is the approval queue.
Where it breaks: between systems
Your field system sends the approved job to finance and waits for a reply. The connection times out. Was the invoice created or not? The sender cannot know, so it sends the job again. If your finance system treats the second message as new, your customer gets two invoices. If the sender gives up instead, the job can go unbilled and nobody notices.
This is a known failure with a known fix. In 2012, Pat Helland wrote in ACM Queue that messages between systemsdo not have "crisp guarantees for delivery": they can get lost and, after a timeout, they are retried. So every step that changes something must be safe to run twice. The term is idempotence: doing it twice has the same effect as doing it once. His examples: sweeping a floor is idempotent, a withdrawal is not, and "[p]rocessing withdrawal XYZ ... if not already processed" is. Your invoice step should be the third kind.
An invoice step safe to repeat
The approved job travels with an idempotency key built from its job number, its version and the state it is moving to. Every retry reuses that same key, unchanged. Your finance system stores the key in the same step that creates the invoice, and accepts each key only once, so when the same message arrives again, even at the same moment, it creates nothing new and replies with the invoice it already made. The customer sees one invoice either way.
An IETF Internet-Draft, the Idempotency-Key header field, proposes the rule that separates a retry from a new request: a key "MUST NOT be reused" for a request with different contents. So a corrected job carries a new version, and with it a new key. It points back to the original invoice, so finance corrects that invoice under its own accounting rules instead of issuing a second, unrelated one. The job shows invoiced only after finance confirms that the invoice exists. Until then it stays approved for billing, in view and retried, not lost.
Three tests to see before go-live
You need not read the code to check this was built. Ask for three tests, run in front of you:
Send the same approved job twice. Your customer gets just one invoice.
Cut the connection after sending, then retry. Still a single invoice.
Send a corrected job after the original. No new bill; it links to the invoice.
How you know it works
Measure the time a job spends in each state, not one average from done to invoice. The state where your jobs wait longest is the next thing to fix. Count the jobs billed twice and the jobs never billed as well. Both should be zero, and both are invisible in an average.
First steps this week
Pull last month's jobs that finance sent back. Note what was missing from each.
Name who could have supplied each item. That is the likely exception owner.
Ask your integration owner two questions. One on no reply, one on a repeat.
If finance's system is silent, what does the sender do? And what does finance do when a job arrives twice? The answers show how many invoices a customer gets after a timeout today.