01. GENERAL DATA

Product:

TOTVS Backoffice

Product Line:

Protheus Line

Segment:

Services

Module:

TOTVS Backoffice (Protheus Line) - Managerial Accounting (SIGACTB)

Function:

CTBA102

Country:

Brasil

Ticket:

Interno

Requisite/Story/Issue

DSERCTR1-46829

02. DESCRIPTION

Entry point used after recording the data in the booking table.

In the example below, the DPCTB102GR entry point is used to apply an additional validation/adjustment after an accounting entry is recorded. If the operation is a reversal (indicated by the parameter nOpc == 6), the entry point can adjust a specific field of the recently recorded entry, according to a user-defined business logic.

03. OTHER INFORMATION


Entry Point (EP) manipulation in the system
If nOpc == 6
	ExecBlock("DPCTB102GR",.F.,.F.,{ nOpc,dDataEst,cLoteEst,cSubLtEst,cDocEst } )
Else
	ExecBlock("DPCTB102GR",.F.,.F.,{ nOpc,dDataAux,cLoteAux,cSubLtAux,cDocAux } )											
EndIf
EP Example
User Function DPCTB102GR()

	Local nOpc      := PARAMIXB[1] 
	Local dDataEst  := PARAMIXB[2] 
	Local cLoteEst  := PARAMIXB[3] 
	Local cSubLtEst := PARAMIXB[4]  
	Local cDocEst   := PARAMIXB[5] 

    // Checks whether the transaction is a reversal
    If nOpc == 6
        // Defines a logic for field adjustment after the reversal
        DbSelectArea("CT2")
        DbSetOrder(1)
        
        If MsSeek(xFilial("CT2") + DTOS(dDataEst) + cLoteEst + cSubLtEst + cDocEst)
			//CUSTOMER VALIDATION
        EndIf
    EndIf

Return

Importante !!

  • It should be noted that the use of the Entry Point (PE) and its impacts on the system are the customer's responsibility.
  • The examples used in this documentation are for demonstration purposes only; each customer must determine the behavior they wish to implement according to the scope of the entry point.

04. RELATED SUBJECTS

  • N/A