A credit sale starts the khata
Issue a sale without taking the full payment and the customer balance increases. Open the customer and you see the invoice, the due date, what has been paid and what remains. Supplier khata works the other way for purchase bills you still owe.
Part payments stay attached
Suppose a customer buys goods for रु 12,000, pays रु 5,000 today and रु 4,000 next week. The khata shows both receipts against the same invoice and रु 3,000 still due. One receipt can also settle several invoices, and the allocation remains visible.
Advances do not disappear
If a customer pays more than the open bills, the remainder becomes a customer advance. It is not counted as extra sales. It can be applied to a later invoice, and that application can be undone before the original receipt is cancelled.
A running total that agrees with the books
Purja derives the contact balance from the ledger and settlement rows. It does not keep a separate khata total that can drift away. The self-check compares those records and reports a disagreement.
No mystery balance. Every amount in khata links back to the invoice, payment, advance or correction that moved it.
Try the difficult customer first.
Enter the one who paid in two instalments. That is a better test than a clean cash sale.
Start a shop