Creation of articles via motors with prices including VAT

0

There are settings in the Administrator to indicate which PVPs have vat included. However, via engines there is also this configuration at the ArticleMode object level. What is this last? That is, what happens if in ADM is PVP1 without VAT included and when creating an article via motor we say that it is with VAT included?

artigoMoeda.set_PVP1(125); artigoMoeda.set_PVP1IvaIncluido(true);

    
asked by anonymous 12.07.2018 / 16:05

2 answers

2

If you create an article via the engine, what prevails is what is in the GcpBEArtigoMoeda object.
If it is via ERP, since the read settings are obtained from the Administrator, what is in the Administrator prevails.

What can happen next is if we save the file of an article, previously created by engines, in the ERP, the information that is in the file will overlap with what was previously in the article, so if before it is without VAT included and in the Administrator is set up with VAT included, when saving the card the item will have VAT included.

    
12.07.2018 / 16:24
0

I solved it this way:


            Dim newart As GcpBEArtigo
            newart = New GcpBEArtigo
            With newart
                .Artigo = cbID.Text
                .Descricao = tbDescricao.Text
                .TipoArtigo = cbTipo.Text
                .UnidadeBase = cbUnidade.Text
                .UnidadeCompra = cbUnidade.Text
                .UnidadeEntrada = cbUnidade.Text
                .UnidadeVenda = cbUnidade.Text
                .UnidadeSaida = cbUnidade.Text
                .Familia = cbFamilia.Text
                .IVA = cbImposto.Text
                .MovStock = "S"
            End With
            motor.Comercial.Artigos.Actualiza(newart)

            Dim newartpvp As GcpBEArtigoMoeda
            newartpvp = New GcpBEArtigoMoeda
            With newartpvp
                .Artigo = cbID.Text
                .Moeda = cbMoeda.Text
                .Unidade = cbUnidade.Text
                .PVP1 = CDbl(tbPVP1.Text)
                .PVP2 = CDbl(tbPVP2.Text)
            End With
            motor.Comercial.ArtigosPrecos.Actualiza(newartpvp)
    
30.11.2018 / 21:30