In official SQL-Ledger, it is possible to add an invoice or a POS transaction without posting it and then forgetting to post it unintentional or sometimes, intentionally, by user to commit fraud.
I have made few changes in SQL-Ledger code which prevent this:
- An invoice cannot be printed if it is not posted already.
- As much invoice lines are printed as are already posted.
Here are these code changes which you can also do in your SQL-Ledger installation to achieve this.
I intend to make few more changes to avoid the situation where user makes some changes to the invoice, prints it and then skips posting it. I have marked this plan with TODO in these code diffs.
If you have any further ideas or queries on this topic, you can share them in comments.


