We know that Sales Entry is of form
Party Dr
To Sales
When Payment is received from party, entry will be
Bank Ac Dr
To Party
(Bank is an asset which increases, so we debit it
Party is an Asset, which decreases on making payment, so we credit it)
Normally First Goods Sold, then Payment Received
So, entry is
Party Dr
To Sales
Bank Dr
To Party
Sometimes Payment Made in Advance, then goods Sold
So, entry will be
Bank Dr
To Party
Party Dr
To Sales
Similarly, some amt Received in Advance, then goods Sold, then amt Received
So, entry will be
Bank Dr
To Party
Party Dr
To Sales
Bank Dr
To Party
Similarly entries with GST will be as follows