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 |
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.
If nOpc == 6
ExecBlock("DPCTB102GR",.F.,.F.,{ nOpc,dDataEst,cLoteEst,cSubLtEst,cDocEst } )
Else
ExecBlock("DPCTB102GR",.F.,.F.,{ nOpc,dDataAux,cLoteAux,cSubLtAux,cDocAux } )
EndIf
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 !!