I work with a client that is using purchase orders, and a custom order’s process (custom statuses). So there is no invoice, and only custom statuses for the orders. The problem is, with no “admin actions” (like invoices), correct me if i’m wrong, the orders doesn’t appears in the reports (even if in reports->sales->orders, I select any status (including my custom ones and any date, nothing appears), I also tried to change the timezone and refreshing lifetime statistics.
So I guess I need to modify the way magento handle these reports to include all the orders, even if it has no admin actions(no invoice or anything).
Any help on this?
Thanks!
—-Edit—-
Thanks for the answer, I tried changing this
if ($paymentHelper->isZeroSubTotal($storeId)
&& $this->_getOrder()->getGrandTotal() == 0
&& $zeroSubTotalPaymentAction == Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE
&& $paymentHelper->getZeroSubTotalOrderStatus($storeId) == 'pending') {
$invoice = $this->_initInvoice();
$invoice->getOrder()->setIsInProcess(true);
$invoice->save();
}
for this
$invoice = $this->_initInvoice();
$invoice->getOrder()->setIsInProcess(true);
$invoice->save();
in onepagecontroller.php so it create an invoice for each orders,
but it still doesn’t appear in the sales report.
Change your process such that a complete order still generates an invoice OR rewrite all the reports. You can change your process by training your client, or you can change it by writing automated cron scripts to examine order states and programmatically generate the invoices.