Purchase & COGS

i need help
why some Purchase invoices affects on Cost of goods sold Account