Does anyone know how I can change the order and invoicedate in Magento? I want to change the order date back in time.
Can anyone help me?
Does anyone know how I can change the order and invoicedate in Magento? I want to change the order date back in time.
Can anyone help me?
If you don't want to do this programatically you can modify the information stored in the sales_flat_order
and sales_flat_invoice
tables.
If the invoice date also needs to be updated in the overview you must modify sales_flat_order_grid
and sales_flat_invoice_grid
aswell.
Try
/* @var Mage_Sales_Model_Order_Invoice $invoice */
$invoice = Mage::getModel('sales/order_invoice')->loadByIncrementId($invoiceIncrementId);
$invoice->setCreatedAt(...);
$invoice->setUpdatedAt(...);
$invoice->save();