on 01-14-2013 10:43 AM
hi,
i need to add an invoice document by xml. My code works great, if there aren't item lines of type iSalesTree.
oDoc.Browser.ReadXml(_sxmlPath, 0) |
iRetVal = oDoc.Add |
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?
Best regards
Markus
Hi Markus,
When adding a Sales BOM via the DI API, you put just the BOM item code in the XML, not the components. The DI API will automatically add the components during the Add method.
A problem arises if you want to change the quantity of the components before adding the invoice. To get around this I had to create a sales order instead, then update the quantities as desired on the sales order before copying this to an invoice.
Kind Regards,
Owen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Owen,
thanks for reply.I don't want to loose my component lines, because maybe there are special settings on quantity and warehouse. If the di api adds the component automatically the quantities and warehouses are set as defined in bom.
For now, i have to use a base document.
best regards
Markus
User | Count |
---|---|
86 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.