Cost of Good Sold (COGS) is reported from the vendor bill if you run the report in Cash Basis. On the other hand, COGS is reported from the invoice if the report is in Accrual Basis hence therewill be no duplicate transactions for your COGS.
You'll have to customize your reports depending on the Accounting Method for your Profit and Loss Report. Here's how:
Go to the Reports menu.
Choose Custom Reports.
Type for and select the Profit and Loss Report you want.