Product: |
TOTVS Backoffice
|
Product Line: | Protheus Line |
Segment: | Services |
Module: | TOTVS Backoffice (Protheus Line) - Managerial Accounting (SIGACTB)
|
Function: | CTBXSEM |
Country: | Brazil |
Ticket: | Internal |
Requisite/Story/Issue | DSERCTR1-46829 |
The entry point CTBPXDCQRY allows for the customization of the query used in the ProxDoc() function within the CTBXFUN.PRX routine. With this entry point, it is possible to adjust the query to meet specific criteria when searching for documents, providing flexibility in the selection and ordering of records according to the user's needs.
cQuery := Execblock( 'CTBPXDCQRY' , .F. , .F. , {cQuery} )
User Function CTBPXDCQRY()
Local cQuery := ParamIxb[1]
cQuery := "SELECT Max(CTF_DOC) MAXDOC "
cQuery += "FROM CTF "+" CTF "
cQuery += "WHERE CTF_FILIAL='"+xFilial("CTF")+"' AND "
cQuery += "CTF_DATA = '"+DTOS(dDataLanc)+"' AND "
cQuery += "CTF_LOTE = '"+cLote+"' AND "
cQuery += "CTF_SBLOTE = '"+cSubLote+"' AND "
cQuery += "D_E_L_E_T_ <> '*' "
cQuery := ChangeQuery(cQuery)
Return cQuery
Important!