Accounting treatment for GST in sales and purchase invoices?

I have recently obtained GST registration. In my business, both sales and purchase invoices show GST separately. My accountant has advised me that the GST component should not be included in sales or purchase values, but should be recorded separately in the books of accounts. What is the correct accounting treatment for the GST component in these transactions? Explain with Journal entries.