F290OWN
User Function F290OWN()Adds an FINA290 IndRegua filter and replaces the standard issue-date criterion.
Overview
The specific documentation allows an additional filter in payable invoice IndRegua. Entry point presence removes the standard issue-date filter while keeping the other standard criteria. Returning an empty string therefore does not establish that the complete original filter is preserved. The page identifies SIGAFIN, FINA290 and Brazil, with no parameters. (TOTVS, ref. 1) The P12.2210 listing concatenates the result to cFiltro in FA290CHECF. (Ref. 2)
Syntax
User Function F290OWN()Return value
Character expression added to the IndRegua filter. The official example concatenates conditions beginning with .AND. (Ref. 1)
Limit issue dates to the environment base date
#Include "Protheus.ch"
User Function F290OWN()
// Adapted from the official example (ref. 1); does not query or write records.
Local cFilter := ""
// Entry point presence removes the standard issue-date criterion.
// dDataBase belongs to the Protheus context and is not translated.
cFilter += '.AND.DTOS(E2_EMISSAO)>="' + DToS(dDataBase) + '"'
cFilter += '.AND.DTOS(E2_EMISSAO)<="' + DToS(dDataBase) + '"'
Return cFilterProposes issue-date limits equal to the base date. Other standard criteria remain subject to routine processing. Example not compiled or run in Protheus.
- The return is an AdvPL expression used by the IndRegua filter; do not treat it as an SQL fragment.
- Do not return .T. or .F. instead of filter text. The official parameter section states that there are no parameters.
- The example limits issue dates to one day. Using a range requires an explicit rule and date validation.
- Compare displayed records with and without the entry point, including dates equal to and outside the base date. Issue date and due date are different criteria.
- Editorial test plan: compare standard and customized behavior in the described operations, inspect resulting records and record release and patch.
- Under review: sources and example checked against documentation; code not compiled or run in Protheus. Exact transaction position and target release behavior remain unconfirmed.

Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.