How do I prevent the Spring API from automatically adding the associated line item? [closed]

-3

When adding a line in a purchasing document of an article whose tab specifies an associated article (eg article G0001 in the demo bd) via API from external application, the API automatically adds the associated article line in the same amount , as it does when that line is added interactively. How can this behavior be countered in the v9 / v10 API?

    
asked by anonymous 31.12.2018 / 11:24

1 answer

2

Good morning,

As Sergio said in his comment, it is important to have an example code here so that everyone can see the point well.

Even without a code, as I understand it, what you want here is that you do not release the substitute article in the AddLine method. This can be done through the argument AdicionaArtigoAssociado , passed to false .

I leave here the API of this method of v10, in v9 it's all identical.

CmpBEDocumentoCompra AdicionaLinha(CmpBEDocumentoCompra clsDocCompra, string Artigo, ref double Quantidade, ref string Armazem, ref string Localizacao, double PrecoUnitario, double Desconto, string Lote, double QntVariavelA, double QntVariavelB, double QntVariavelC, double DescEntidade, double Desc, int Arredondamento, int ArredondaIva, bool AdicionaArtigoAssociado)

The documentation can be found here.

    
02.01.2019 / 12:37