...
DocNameSpace,XMLNewChild,Prefix);
XMLCurrNode := XMLNewChild;
AddAttribute(XMLCurrNode,'currencyID',CurrencyCode);
XMLCurrNode := XMLCurrNode.parentNode;
// Delete the following line.
AddElement(XMLCurrNode,'BaseQuantity',OIOUBLDocumentEncode.DecimalToText(SalesInvLine.Quantity),
DocNameSpace,XMLNewChild,Prefix);
XMLCurrNode := XMLNewChild;
AddAttribute(XMLNewChild,'unitCode',SalesInvLine."Unit of Measure Code");
XMLCurrNode := XMLCurrNode.parentNode;
...
...
DocNameSpace,XMLNewChild,Prefix);
XMLCurrNode := XMLNewChild;
AddAttribute(XMLCurrNode,'currencyID',CurrencyCode);
XMLCurrNode := XMLCurrNode.parentNode;
// Add the following line.
AddElement(XMLCurrNode,'BaseQuantity',OIOUBLDocumentEncode.DecimalToText(ABS(SalesInvLine.Quantity)),
DocNameSpace,XMLNewChild,Prefix);
XMLCurrNode := XMLNewChild;
AddAttribute(XMLNewChild,'unitCode',SalesInvLine."Unit of Measure Code");
XMLCurrNode := XMLCurrNode.parentNode;
...