The expression (xs:decimal(cbc:LineExtensionAmount)) = (round(sum((xs:decimal(/ubl:Order/cac:OrderLine/cac:LineItem/cbc:LineExtensionAmount)) * 10 * 10) div 100) has one opening bracket too much after sum. It should be:
(xs:decimal(cbc:LineExtensionAmount)) = (round(sum(xs:decimal(/ubl:Order/cac:OrderLine/cac:LineItem/cbc:LineExtensionAmount)) * 10 * 10) div 100)
The expression
(xs:decimal(cbc:LineExtensionAmount)) = (round(sum((xs:decimal(/ubl:Order/cac:OrderLine/cac:LineItem/cbc:LineExtensionAmount)) * 10 * 10) div 100)
has one opening bracket too much aftersum
. It should be:(xs:decimal(cbc:LineExtensionAmount)) = (round(sum(xs:decimal(/ubl:Order/cac:OrderLine/cac:LineItem/cbc:LineExtensionAmount)) * 10 * 10) div 100)