Invoice reference against an order

adnanbutt050
Mon, 11 Oct 2021 09:23:06 +0000

Hi all,

Hope you guys are doing well, I am trying to export an invoice reference number against an order reference number. the link between both tables is done in this table llx_element_element.

I know I am doing something stupid by using a left join on these tables.

SELECT llx_facture.rowid,llx_facture.ref FROM llx_element_element
LEFT JOIN llx_element_element ON llx_element_element.fk_target = llx_facture.rowid
LEFT JOIN llx_element_element on llx_element_element.fk_source = llx_commande.rowid

Could anyone let me know how I can get the invoice reference number against all the order reference numbers?

with this MYSQL command, I am getting the following error.
#1066 - Not unique table/alias: 'llx_element_element’

Kind Regards,
Hafiz

Read full topic