Magento – No credit memo button available if the end price if 0

creditmemomagento-1.6ordersrefundstock

I'm trying to convert a magento instance from a b2c platform to a b2b platform.
I'm having issues with a particular part of magento.

When an order with the final price of 0 is issued, i have no credit memo button available.
The order is issued from the back-end and in the Payment Method Field the massage is

No payment Methods.

This is actually logical because there is no amount of payment to be refunded. But the thing is that the product, although it does not cost the customer anything to buy, it actually leaves my stock.

  1. The first question is, if this is a normal behavior for magento of is something broken on my end?

The end goal is not to refund my customer's money but to get the product in my stock again.

  1. If this in normal for a magento instance, is there any other way to force a payment method when the order is issued so that the credit memo button will be available and later down the refund process, will let me get the product back in stock?

Best Answer

I think if is because it fails on the function canCreditmemo. This function is set against the order and checks the state of the order and will allow/disallow you to create a credit memo.

The key lines for you would be.

if (abs($this->getStore()->roundPrice($this->getTotalPaid()) - $this->getTotalRefunded()) < .0001) {
    return false;
}
Related Topic