Desko Invoice keeps invoice payment state in sync using invoice records and payment records.
Invoice statuses
| Status | Meaning |
|---|---|
| Draft | Invoice is created but not sent. |
| Sent | Invoice is sent and payment is pending. |
| Partially Paid | At least one payment is recorded but balance remains. |
| Paid | Total recorded payment is equal to or greater than invoice total. |
| Overdue | Due date has passed and invoice is not fully paid. |
| Cancelled | Invoice is closed and should not accept payments. |
How status changes
Status can change from:
- Manual update on invoice overview
- Manual selection inside invoice form
- Payment insert/update/delete
- Due date passing with unpaid balance
- Settlement action
Payment records
Each payment stores:
- Invoice ID
- User ID
- Amount
- Payment date
- Method
- Reference
- Notes
- Receipt number
- Created date
Automatic recomputation
When a payment is inserted, updated, or deleted, the invoice paid amount and status are recalculated.
Typical flow:
sent -> partially_paid -> paidIf the due date passes before full payment:
sent -> overdueRecording partial payments
If an invoice total is ₹10,000 and the customer pays ₹4,000:
- Paid amount becomes ₹4,000
- Outstanding becomes ₹6,000
- Status becomes Partially Paid
Full payment
If total recorded payments reach the invoice total:
- Paid amount becomes invoice total or more
- Outstanding becomes zero
- Status becomes Paid
Deleting a payment
If a wrong payment is deleted, the invoice status and paid amount are recalculated again.
Best practices
- Use consistent payment methods: Cash, UPI, Bank Transfer, Card, Other.
- Add UTR/transaction ID in Reference for bank/UPI payments.
- Use notes for manual adjustments.
- Do not record payments against cancelled invoices.
- Use settlement only for genuine balance adjustments.