Linking an accounts from chart of accounts to invoices/bills

Linking an accounts from chart of accounts to invoices/bills

Whenever i make a sales invoice, the journal entry shows inventory account as debit instead of cost of goods sold as debit. How can i change that? please help