Magento Credit memo, changing ORDER-id to INVOICE-id

In Magento you can cancel an order or invoice, and set it to a creditmemo. This is working correctly, but in our case we need the INVOICE-id, instead of an ORDER-id. By default, Magento uses the INVOICE-id.

This isn’t some “setting”, but it would probably need to be coded by hand. That’s not a problem for me, but I can’t seem to find the right file to edit.

Does anyone know whether this is even possible? Or does someone else had this problem before?

Thanks in advance!

🙁 Can’t seem to set a bounty, otherwise i would have done it.

One thought on “Magento Credit memo, changing ORDER-id to INVOICE-id”

  1. If you have an invoice ID, you can trivially retrieve the order ID of the order it is tied to.

    $invoice = Mage::getModel("sales/order_invoice")->load($invoice_id);
    $order_id = $invoice->getOrderId();
    

    Hope that helps!

    Thanks,
    Joe

Leave a Reply

Your email address will not be published. Required fields are marked *