In our sales order we have a customer Purchase order number for reference, we need to customise the invoice to add this. As far as I know, this field exists only in the sales order table. So far, I can edit the RML of the invoice but the problem comes trying to pull this reference. I think* the logic should be: if origin = SO130025 (our sale order number) then char = sales_order.customer_ref (sales order table, customer_ref field) else remove node
But I'm having trouble with putting it into code.
Anyone come across this?