01. GENERAL DATA

Product:

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

02. DESCRIPTION

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.

03. OTHER INFORMATION


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


  • It should be noted that the use of the Entry Point (EP) 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