Sales and purchase account can be treated as either nominal account and real account. According to nominal account Debit all expenses and credit all the gains, and we can see that purchase are expenses and sales are receipt. According to the real account Debit what comes and credit what goes, and in purchase will be treated as comes in and receipt are goes out.