Creation of customer / supplier accounts

0

Good afternoon,

I was trying to create Accounting Accounts automatically through Interop, but I can not find any method that does this. It really has an AutoCorrect method but I do not understand what Array it asks for. Does anyone know which method to do this?

Thanks in advance for your help

    
asked by anonymous 13.11.2018 / 16:45

1 answer

2

The ArrContasAutomaticas() parameter in the CriaContasAutomaticas method of the Accounting Chart expects a multidimensional array of String , more properly, 2 dimensions, with 5 rows for each column / account.

Below information about the structure of array :

Ano             = Array(1, X)
Conta           = Array(2, X)
Descricao       = Array(3, X)
TipoEntidade    = Array(4, X)
Entidade        = Array(5, X)

The X represents the number of the column, that is, for each account to be created, there must be a column (eg, 5 accounts, then 5 columns).

In case of multiple accounts, the code should include a cycle where the column is the control variable and the row is fixed for each field.
Something like this (no cycle, untested code):

Dim arrCbl(5, 2) As String

arrCbl(1, 1) = "2018"
arrCbl(2, 1) = "2110001"
arrCbl(3, 1) = "Conta 2110001"
arrCbl(4, 1) = "C"
arrCbl(5, 1) = "SOFRIO"
arrCbl(1, 2) = "2018"
arrCbl(1, 2) = "2120002"
arrCbl(3, 2) = "Conta 2120002"
arrCbl(4, 2) = "C"
arrCbl(5, 2) = "SOFRIO"

Motor.Contabilidade.PlanoContas.CriaContasAutomaticas arrCbl
    
13.11.2018 / 18:13