I applied cash to the wrong invoice. Can I undo that and start over?

Yes, beginning with xTuple ERP version 3.3.0 we added the ability to reverse (i.e., void) Cash Receipts from the Cash Receipts report screen, found under Accounting > Accounts Receivable > Reports > Cash Receipts. When you reverse a Cash Receipt, you also undo any applications made originally when the cash was applied.

After a Cash Receipt has been reversed, it returns to an unposted state. That means you can then make any changes to the unposted document before you post it again.

Keep in mind, this works only for Cash Receipts entered in or after xTuple ERP version 3.3.0. Cash Receipts entered prior to 3.3.0 cannot be voided in this way. Also, any Credit Memos or Customer Deposits created from the unapplied balance when the original Cash Receipt was posted will not be reversed when a Cash Receipt is voided. Instead, a misc. A/R Debit Memo will be created in the amount of the original unapplied balance.