This one has been on the backburner for quite some time but my client has resurrected it.
I am still trying to get the correct XML format that Smartfreight will accept for dangerous goods.
Here's a link to the Smartfreight documentation
https://smartfreight.atlassian.net/wiki ... ods+importAttached is a trimmed version of my plugin. Trimmed in that there's nothing going to SF, I am just writing the XML to disk for now.
Also attached is a sample XML output which is incorrect.
When I have just 1 DG on a sales order, it displays the dg details OK although the tag is not correct. It should say <freightlinedetails> but it says <dgdetails>.
It's worse when I have multiple DGs on a sales order, as each DG item needs to have it's own block of <freightlinedetails> with a desc = "[inner]", i.e. <desc>[inner]</desc>
At the moment, each <freightlinedetails> refers to a line on the freight grid - which is correct, no issues there. But within that <freightlinedetails> when DGs exist on the order, they need to have their own separate <freightlinedetails> with a desc = '[inner]'.
That tells Smartfreight that any following <freightlinedetails> with that desc is a child of the previous <freightlinedetails> as per this comment on the link above
Inners should be used to define multiple Dangerous Goods records allocated against a single freight line detail. Please refer to Inners for more details.
I think the attached plugin is fairly self explanatory, but it has some custom fields for inventory which define the DG fields. They need to be populated, particularly the UN number.
I am doing a For Next to iterate through the sales order lines, checks their DG values, and write out a new <dgdetails> for each DG. But it's only displaying 1 <dgdetails> despite having multiple DGs on the sales order.
And the <dgdetails> should say <freightlinedetails> with a tag within i.e. <desc>[inner]</desc>.
I just need some assistance to get the correct format expected by Smartfreight.
v 7.2.1 SR14