0
votes

I want to print Invoice of both pending and complete status orders in pdf.But right now it prints only complete status orders invoice only. How can i change it.

This is the line line i found under app/code/core/Mage/Adminhtml/controllers/Sales/Ordercontroller.php

function name pdfinvoicesAction

$invoices = Mage::getResourceModel('sales/order_invoice_collection')
                    ->setOrderFilter($orderId)
                    ->load();

This one collects the completed order invoices. how can make it to collect both pending and complete status orders

Any help would be appreciated.

Thanks

1

1 Answers

1
votes

"I want to print Invoice of both pending and complete status orders"... The problem is, if the order is in pending status then that means the payment is pending and logically there can not be an invoice if the payment is not cleared.

In order to change it you need to change the whole magento logic and the order state machine!