Linking Sales Invoice to Sales Order after submitting and Sales Invoice

Hi there,

How can I link a Sales Invoice with a Sales Order after the Sales Invoice has been submitted and paid?

Hi,

For now, this is not possible without cancel and amend the submitted transaction.

As a work around, you can create a Custom Field on Sales Invoice form to keep the Sales Order log.

Best,
Prakash

Thanks for the custom field hack.

Is it possible to make this change directly in the database? In other words how is the link between sales order and sales invoice created in the database?

In other words, can I just update the so_detail value in the sales invoice database table to link the sales invoice with the sales order?

Are there any unexpected consequences with doing this?

Hi, I have linked my sales order with my invoice …How do I prevent making of two invoices from the same sale order?

Hi Parkash,
I created the custom field you said and make the edit in the invoice list one by one but the problem I’m facing is that the status of the Sales Order didn’t updated and I don’t see the invoices in the Sales Order

I also faced a similar issue as I wanted to link an already submitted invoice and order which were created afterward.

After digging into the code, it looks like sale order and sale invoice are linked through the sales invoice items. If you look at the db table for Sales Invoice Item there is a column named sales_order by setting it to the name of the desire sales order, it seems to link the two at least in the UI.

Note that this is not an official but rather a hacky way which I am not sure it 100% works. Nevertheless, I hope this could help some of you.