Workflow

How to Handle Overpayment on an Invoice / Receipt

Verified end to end. Demo run invoice-receipt-overpayment-20260519T224642Z created an FR total of 1.97, added a cash payment of 2.00, received troco:0.03, and saved finished document FR 9999/848.

Evidence Summary

Route
/vendas/fr/create
Final document
999900848 / FR 9999/848
Customer
[910] 100 Ouvidos Lda
Article line
AI-DEMO-20260519-021105, quantity 1, total 1.97
Payment
[NUM] Numerario amount 2.00; change 0.03
Evidence file
raw/playwright/workflows/latest-invoice-receipt-overpayment.json

Verified invoice receipt overpayment workflow

When to Use This

Use this when the customer gives more money than the invoice / receipt total, usually with cash. OfficeGest accepts the payment because it is greater than the document total and reports the difference as change.

Step-by-Step

  1. Create the Invoice / Receipt [FR] and confirm the document total.
  2. Click End to open the Payment modal.
  3. Select the payment method. The verified run used [NUM] Numerario.
  4. Enter the amount received from the customer. The verified run entered 2.00 against total 1.97.
  5. Click Save in the Payment modal.
  6. Confirm the final save dialog if OfficeGest asks.
  7. Check the final FR list row. The document should be LIQ / Finished, with paid value equal to the document total.

Verified Behavior

CheckObserved result
Payment rowpayment&option=add created a NUM row with value 2.
Payment validationpayment&option=validate returned valid:true and troco:0.03.
Final savesaveDocument returned OKDOC and redirected to /vendas/fr/view/OTk5OTAwODQ4.
FR list resultFR 9999/848 was LIQ / Finished with total 1.97, ValorPago=1.97, and pending value 0.00.
Important distinctionThe entered payment row was 2.00, but the FR list paid value stayed equal to the document total, not the cash received.
Stock effectWarehouse 1 stock decreased from -27 to -28 after final save.

Backend Calls Observed

Action or endpointPurpose
payment&option=addAdds the cash row with the received amount.
payment&option=validateAccepts payment greater than the document total and returns the change value.
saveDocumentFinishes the FR after payment validation succeeds.
DT_List_DocumentosVerifies the finished FR row after save.

Raw evidence: raw/playwright/workflows/invoice-receipt-overpayment-20260519T224642Z.json. Screenshots: assets/screenshots/invoice-receipt-overpayment-20260519T224642Z-01-fr-line-before-payment.png through assets/screenshots/invoice-receipt-overpayment-20260519T224642Z-03-fr-list.png.