selectline-software / selectline-api

Apache License 2.0
26 stars 5 forks source link

Error when adding an item with BOM type D to a delivery note #380

Closed ccfrusano closed 6 months ago

ccfrusano commented 7 months ago

Details

I have this item V500219, which contains 2 subitems inside: image

When I add this item to a document, I expect both subitems to be added. Instead, this happens: image

The lines 12 and 13 are correct, but I don't know why a SET is added. This makes that two pieces of stock of each item gets substracted. Does anybody know why? Thanks

MatthiasGuse commented 7 months ago

Hello,

the function you use is desinged for "SalesBOMPosition" and not for "Sample BOM". You can use POST /Documents/{documentKey}/ArticleItem to add your list.

Regards

ccfrusano commented 7 months ago

Hello Matthias, This item is of type "M". If we try to use the function you mention, we get the error: "Article line: "failure": "Diese Art von Stücklisten wird in dieser Funktion nicht unterstützt. Erlaubte Stücklisten hierfür sind K,P,R,Z". image

As you can see, it has 2 subitems. That's why we tried the "SalesBOMPosition" function. How can we insert lines in documents for items type "M"? Thanks! Best,

MatthiasGuse commented 7 months ago

Hello,

in your first post, you used an other type. For both types it is only possible to add the positions by "POST /Documents/{documentKey}/ArticleItem" in non storing document types.

It is only possible to transfer a document with such position types to an storing document.

Regards