Lars Boele
Lars Boele

Reputation: 375

Change invoice date in Magento

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?

Upvotes: 2

Views: 3397

Answers (2)

Kenny
Kenny

Reputation: 5400

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.

Upvotes: 3

Dmytro Zavalkin
Dmytro Zavalkin

Reputation: 5277

Try

    /* @var Mage_Sales_Model_Order_Invoice $invoice */
    $invoice = Mage::getModel('sales/order_invoice')->loadByIncrementId($invoiceIncrementId);
    $invoice->setCreatedAt(...);
    $invoice->setUpdatedAt(...);
    $invoice->save();

Upvotes: 1

Related Questions