The description of the lineTotalAmount parameter of the function AddTradeLineItem states "This parameter is optional. If it is not filled, the line total amount is automatically calculated based on netUnitPrice and billedQuantity".
This is true for writing CII files, but not for writing UBL files.
When creating UBL files, the section </cac:InvoiceLine> is written without the compulsory <cbc:LineExtensionAmount> section. This leads to validation errors:
