Product: |
TOTVS Backoffice
|
Product line: | Protheus line |
Segment: | Serviços |
Module: | TOTVS Backoffice (Protheus Line) - Management Accounting (SIGACTB)
|
Function: | CTBA270 |
Country: | Brazil |
Ticket: | Internal |
Requirement/Story/Issue | DSERCTR1-46829 |
The CT101VLENT entry point allows for the validation of accounting entities when recording manual accounting entries, specifically in the CTBA101 routine. This way, it can be ensured that custom accounting rules are applied before the entry is finalized, either allowing or preventing the recording (saving).
lRet := ExecBlock("CT101VLENT",.F.,.F.,{cTipo,cDebito,cCredito, cCustoDeb,cCustoCrd, cItemDeb,cItemCrd, cCLVLDeb,cCLVLCrd})
User Function CT101VLENT() Local lRet := .T. Local cTipo := Paramixb[1] // Accounting entry type 1 -> Debit, 2 -> Credit, 3 -> Double-entry Local cDebito := Paramixb[2] // Debit Account Local cCredito := Paramixb[3] // Credit Account Local cCustoDeb := Paramixb[4] // Debit Cost Center Local cCustoCrd := Paramixb[5] // Credit Cost Center Local cItemDeb := Paramixb[6] // Debit Accounting Item Local cItemCrd := Paramixb[7] // Credit Accounting Item Local cCLVLDeb := Paramixb[8] // Debit Value Class Local cCLVLCrd := Paramixb[9] // Credit Value Class If cDebito == cCredito // Example of a condition that can be created for entity validation lRet := .F. Endif Return lRet // If lRet = .F., the system displays a message stating that the // entities cannot be the same and cancels the operation
Importante!