Invoicing & payments
Recording payments
Applying money, and un-applying it without losing it.
Record a payment from the invoice it pays, or on the case when it arrives before any invoice exists.
Recording against an invoice updates its status automatically: partly paid, then paid once the balance reaches zero.
UN-APPLYING RATHER THAN DELETING
If a payment went to the wrong invoice, un-apply it. It becomes unapplied case credit and can be reapplied correctly. The money arrived — only its destination was wrong, so deleting the record would be the wrong fix.