i need to add an invoice document by xml. My code works great, if there aren't item lines of type iSalesTree.
For example: I sell a set of 3 different items. In my document will be 4 lines. 1. iSalesTree, 2-4 iIngredients
After i add my document there are 7 lines. The systems inserts the copomonents of my salesTree (first line) again.
The error happens always if the document(invoice) is not based on a base document (delivery note)
Is there are solution to handle this?