Currently if you make a mistake entering an invoice (Vendor or Client)
and post the invoice before you realise,
you have to manually find and edit the invoice, changing all QTY's to
negative numbers, and any payment to a negative, edit the Invoice Number
to show that it has been voided, and possibly add a comment to the notes
field.
Then you can save the invoice as new.
At this point there may be nothing else to do (customer changed their
mind before leaving store),
or you may have to reedit the original invoice, make corrections then
once again Post as New.
I propose a two part solution to this.
First, add a RED "VOID" button to the Document. (if it is being edited)
this would
1. negate all QTY's and Payments,
2. add VOID to the invoice number
3. add a note "Voided by $username on $date at $time"
4. Post the Invoice as NEW
Second, if it can be done without major modification to the code,
add a RED "VOID and Raise" button to the Document. (if it is being
edited)
1. negate all QTY's and Payments,
2. add VOID to the invoice number
3. add a note "Voided by $username on $date at $time"
4. Post the Invoice as NEW
5. Reopen the Original Invoice for editing.