does quickbooks calculate the difference between cost of goods sold and invoice amount
Yes, QuickBooks will automatically calculate GROSS PROFIT. Difference between Revenue and COGS is your gross profit. Revenue comes from invoicing. COGS could come from various sources like entering to COGS account or for inventory items directly from invoicing to customers.