cancel
Showing results for 
Search instead for 
Did you mean: 

Void an Invoice

Void an Invoice

Hi to all!

 

I try to Void an Invoice. It works in simple case when you have only one invoice for the Order, but when I have multiple invoices for same Order I have a problem.

 

I have a payment module with a Payment class who implements MethodInterface. Because of this interface I have a public void method where I get as parameter the Payment.

When I am at Order View -> Invoice View page and click on Void button the void logic go throw Payment->void method, but in the Payment object there is no (or at least I can not find it) information for the Invoice ID who will be voided.

So how can I understand which invoice (id) will be voided?

 

Regards!

4 REPLIES 4

Re: Void an Invoice

The void and credit memo buttons on top don't go through same controller when you are in the order and when you are in the invoice as far as I remember.

 

So go into the invoice, like on the order on the left click invoices, click "View" on the specific invoice, and then from this screen in the top right hit "Void"

Founder at https://agency418.com

Re: Void an Invoice

Hi!

This is exactly what I am doing - clicking on Void button (on the top) in Invoice View.

Regards!

Re: Void an Invoice

When you say invoice view, are you inside of the specific invoice, like is your URL like this: /sales/order_invoice/view/invoice_id/657576576/

Founder at https://agency418.com

Re: Void an Invoice

Yes, I am in this place, like - /sales/order_invoice/view/invoice_id/174/
And there are few links:
image.png

I am clicking on the Void link. Process starts and I catch it in my Payment->Void method where get payment object.