How to rewrite the Xpath for the total of the invoice to report the accurate amount. Net Invoice: if item has taxes applied, use this field, if not, use this other field Net Invoice Xpath:
Total Net Invoice: sum up all reported net invoices and add any other extra charges Xpath:
I tried using the SUMMARY tagging element, but whenever I add the SumMarkUp field as it’s from the SalesHeaderExt not SalesInvoiceLine like the rest, I get a ‘NaN’ result.
When you need to work with a subset of data you can implement filtering on the node collection, e.g. SalesInvoiceLines[@DiscPercent > 0] would only contain SalesInvoiceLines records where discount percent is greater than zero.
If you need to combine summary data from several sources, e.g. from sales invoice lines and their markups, you can use a Field tagging element and two sum() functions which calculate lines in one sum() function, and markup in the second sum() function and then add their values together.
You can send your template and the DDSP file to support@docentric.com and we will suggest the solution.