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?
This should not be static. You should call a function (get_customer_ref(origin)) and the function returns the correct ref after searching for the correct sale order. So in your rml you should just have something like.
[[ o.get_customer_ref(origin) or RemoveParentNode(para) ]]
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 4/1/13, 11:38 PM|
|Seen: 2458 times|
|Last updated: 3/16/15, 8:10 AM|