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