Páginas filhas
  • COMING SOON - API - Automatic Accounting Entry (CTBA102)

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

Nota
titleAttention

This feature is being developed and will be available from release 12.1.2310 onwards.

01. OVERVIEW

Data model to be used in the accounting entries API.

...

Header

Key

Value

Required

NOTE:

Content-Type

application/json

X

N/A

tenantId

T1,D MG 01 

X

(Company and Branch in which the accounting entry will be entered, reversed or deleted)

Company Group+','+Company+Business Unit+Branch 

NOTE: Header must be sent to all methods

02. METHODS

  • INSERT @Post (Insertion of Accounting Entry)

EndPoint: Path of the service REST Protheus + /api/ctb/accountingentry/insert Ex.: http://localhost:9090/api/ctb/accountingentry/insert

Body

Send it in Json format in accordance with the following model

Lot Cover

Field

Description

Type

Required

Note

CT2_DATA

Entry Date

Character


Date sent in ddmmaaaa character format. For example: 08/29/2022.

Default = system base date:

CT2_LOTE

Batch Number 

Character


Default = '000001' 

CT2_SBLOTE

Sub-batch Number 

Character


Default = '001' 

ITEMS

Accounting entry rows

Object Array

X

Each item corresponds to an entry row for the same batch cover

Batch Items

Field

Description

Type

Required

Note

CT2_DC

Entry Type

Character

X

1 → Debit 2 → Credit 3→ Double Entry

CT2_VALOR

Entry Amount

Numeric

X

decimal must be sent with the period character

CT2_HIST

Entry History

Character

X

** Default size in Protheus 40

CT2_DEBITO

Debit Account             

Character

X

Required for entry types: Double Entry and Debit 

CT2_CREDIT

Credit Account            

Character

X

Required for entry types: Double Entry and Credit 

CT2_TPSALD

Type of Balance

Character


Default = '1' 

CT2_CONVER

Conversion Criterion  

Character


Default = '1' . Define whether to generate accounting entries in other currencies, converted in accordance with the criterion

CT2_ORIGEM 

Source of Entry     

Character


Default = 'API ACCOUNTINGENTRY' . 

CT2_HP

Default History         

Character


N/A

CT2_CCD   

Debit Cost Center   

Character


N/A

CT2_CCC   

Credit Cost Center

Character


N/A

CT2_ITEMD

Debit Item

Character


N/A

CT2_ITEMC

Credit Item

Character


N/A

CT2_CLVLDB

Debit Value Class

Character


N/A

CT2_CLVLCR

Credit Value Class

Character


N/A

CT2_EC05DB

Additional Entity (Without Nomenclature)

Character


N/A

CT2_EC05CR

Additional Entity (Without Nomenclature)

Character


N/A

CT2_EC06DB

Additional Entity (Without Nomenclature)

Character


N/A

CT2_EC06CR

Additional Entity (Without Nomenclature)

Character


N/A

CT2_EC07DB

Additional Entity (Without Nomenclature)

Character


N/A

CT2_EC07CR

Additional Entity (Without Nomenclature)

Character


N/A

CT2_EC08DB

Additional Entity (Without Nomenclature)

Character


N/A

CT2_EC08CR

Additional Entity (Without Nomenclature)

Character


N/A

CT2_EC09DB

Additional Entity (Without Nomenclature)

Character


N/A

CT2_EC09CR

Additional Entity (Without Nomenclature)

Character


N/A

CT2_KEY

Identifier Key

Character


N/A

...