4

The client I am working with has a requirement that they are able to give credit memos before either full or partial capture of an invoice (i.e. money is authorized but not paid).

The idea being that no stock is being managed by magento, and magento has no way of knowing if something is in stock at a given time. The stock is managed by a 3rd party system. Generally they will receive new stock within days, but it may not necessarily match the items ordered. They want to be able to refund a part of any order.

Is there any way of doing this? Are there any extensions that offer this functionality?

The other way to look at it is, we need to be able to amend an order after its been authorized. In order to adjust the amount of money that is taken from the customer, specifically omitting any unavailable items. This must appear to be a refund from the customer's perspective as per our client's requirements.

All of this will be managed using a 3rd party integration that leverages the Magento API.

  • 3
    "We want to authorise the funds; then remove some line items from the order; raise a credit memo for said line items and raise the invoice with the revised order items" From a financial perspective, if payment hasn't been captured and the invoice hasn't been raised - then a credit memo cannot exist, as it has no corresponding invoice. I can understand the theory behind what you want - but it doesn't really add up. – Ben Lessani - Sonassi Mar 7 '13 at 18:37
  • The idea being to allow us to amend which items the customer is charged for if certain items in an order are unavailable – lukefowell Mar 7 '13 at 18:43
  • If fulfillment isn't happening within Magento, why are you handling payment/invoicing in Magento? I would export all of your order invoicing, crediting, etc. to that 3rd party system. – philwinkle Mar 7 '13 at 18:46
  • 1
    Why can't you just stick to the stock functionality then? Edit the order in the admin - raise the invoice and then capture payment. A new order will be created along with the invoice. A credit note shouldn't exist in the accounting world unless there was an invoice that corresponds to the figures to begin with - which there isn't. – Ben Lessani - Sonassi Mar 7 '13 at 18:46
6

Luke, I've never seen an extension out there that does exactly what you need.

It's (probably) possible to implement this functionality with custom Magento code by rewriting the various quote, sales, quote item, sales item, credit memo, and credit memo, and payment module event handlers, and/or a class method rewrite or two. However, it's a rather large task and not easily answered in a single Stack Exchange question, and would require you to understand how all the above objects interact before tackling it.

This sort of programming can be more time consuming that you'd expect. Also, because it involves actual money, this needs more rigorous testing that can usually be applied in a client services environment. Also also, it gets extra tedious because each payment module type (authorizenet, paypal, stripe, etc.) seems to handle orders, credit memos, and invoices slightly differently, which means you'll often end up with subtle, hard to track down bugs. I have 4+ years Magento experience and I'd be wary of tackling this sort of problem — especially if the client needed a fixed bid.

If you're open to alternate solutions — right now it sounds like your client is handling this manually in the admin console and wants to be able to stop doing that. Instead of trying to come up with (clever and awesome) solutions using Magento's existing objects, I'd focus on automating what your client is currently doing manually. That'll likely be easier than messing around with custom account programming.

0

This is a tricky one indeed. I was asked to implement similar functionality, but at the time of capture/shipment - so I simply cancelled/aborted the items not part of the first shipment with $order->cancel()->save();

The easiest solution, by far, would be to invoice/capture the items you actually want to remove, and then immediately create a creditmemo for the same items. Just make sure no no customer notifications gets sent while doing so.

After that you can continue to capture and ship the remaining items in the order.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.