Pay Invoice with balance deduction
When an invoice for a user is generated, and the user pays it, we need to check it as completed. After this is done, the user's balance is increased by the value of invoice.
Let's see our user's balance (SETTINGS - Users):
Then in invoices (SETTINGS - Accounting - Invoices), we see an invoice for this user:
Click Details to see the invoice details. Check Create payment for completed invoice and click the red cross icon above to mark the invoice as completed and paid:
You will see the invoice as paid:
In user details, we see that the user's balance has decreased:
... and in Payments (SETTINGS - Accounting - Payments), we see that payment for invoice is created:
Other notes:
Note: if you want to revert all changes, it is enough to click the green check mark in Invoice details. The user balance will be decreased, payment deleted, and the invoice marked as not processed.