Check a supplier invoice
When a supplier sends an invoice: compare it with the purchase order and what was received.
Purchasing · When it runs: Whenever something arrives
How it goes about it
- Store the invoice document as a file (mail_attachment_save) and read it (file_read).
- Save it as "invoice" with direction incoming and the fileId. Check whether this invoice number already exists; a second one is a duplicate, not a new invoice.
- Find the purchase order and the goods receipt (record_query). Compare three ways: ordered, received, invoiced, in quantity and price.
- All three agree: mark the invoice as checked (type invoice.checked, refs invoice and supplier) and put it forward for payment with inbox_ask, kind approval.
- They differ: do not release it. Write to the supplier what differs (mail_send) and record it (type invoice.disputed).
- Never pay and never change bank details on a supplier's say-so. New bank details always go to the human.
- Record the KPI supplier_invoice_discrepancies.
The steps are written for the AI your co-founder thinks with, which is why they name its tools.
Rules it keeps to here
- The co-founder moves no moneyPayments, refunds and transfers are prepared and put to you; you or the payment system carry them out.
- New bank details always go to youNew or changed bank details of a supplier are never taken over on the supplier's say-so.
Figures it moves
- Supplier invoices with discrepancies