Raising an invoice to a customer. If the invoice is paid then the debit entry will go to the bank account, otherwise if due from from the customer it will be debited to accounts receivables.
Entries marked with (P&L) should be posted to a profit or loss code. All others are posted to balance sheet codes.
DR Cash / Accounts receivables;
CR Revenue (P&L);
CR Sales tax account
The sales tax account line is to reverse the sales tax amount as the sale has been cancelled.
Sales tax rules depend on your juristiction, consult a tax professional for further advice.