Order has invalid product details

Job ID: 36413083

Budget: ₹1,500 – ₹12,500 INR

Generating text file for all the orders and invoices. when a product has warrant selected, the product listed 2 times. one with warranty and another one without warranty.
1. fix the duplicate lines of product when warranty selected
2. we want to take this file and have a separate controller, it should be called whenever we want for debugging purpose
when we pass a increment id, in the query string, it should generate order and invoice file for that increment id alone
Related categories: PHP Magento 2