Usina BRAdvPL Guide
Sign in
← All topics
ENTRY POINTUnder review

F241DTBOR

User Function F241DTBOR() as date

Changes the tax payment batch date using the documented PARAMIXB[1] context.

F241DTBORFINA241PARAMIXBDate
01 · OVERVIEW

Overview

F241DTBOR belongs to FINA241 and replaces the tax payment batch date. It receives the system default date in PARAMIXB[1] and returns a custom date. (TOTVS, 2024, ref. 1) The community listing places the call in FA241BORDE. (Universo do Desenvolvedor, 2023, ref. 2) The official example uses Date() + 3, rather than adding three days to the received date. GitHub searches located no useful implementation. The TDN page was read in full.

02 · SYNTAX

Syntax

User Function F241DTBOR() as date

Parameters

PARAMIXB[1]
DateExecution context

System default payment batch date received in PARAMIXB[1]. This is entry point context, not a formal argument in the user function signature. (TOTVS, 2024, ref. 1)

Return value

Custom date that replaces the payment batch date. (TOTVS, 2024, ref. 1)

03 · PRACTICAL EXAMPLE

Official example with editorial comments

#Include "TOTVS.CH"

User Function F241DTBOR() as date
    // Adapted from the TDN example; comments and local name are editorial.
    // Initialization reads the documented context, which is overwritten below.
    Local dBatchDate := PARAMIXB[1] as date

    FWAlertInfo("F241DTBOR entry point")
    // Keep the official example rule: use Date(), not the received date.
    dBatchDate := Date() + 3

Return dBatchDate
Expected result

Displays a message and returns Date() + 3. The initially received date is overwritten. This is expected by reading the code; it was neither compiled nor executed in Protheus.

BEST PRACTICES
  • Define the rule base: Date() + 3 and PARAMIXB[1] + 3 may produce different dates. The official example uses the first expression.
  • Do not interpret adding 3 as automatic business-day adjustment; a calendar rule needs its own handling.
  • The FWAlertInfo message belongs to the teaching example. Assess its suitability for the intended workflow before adopting the code.
  • Confirm release, patch, aliases and transaction position; the page does not establish that operational contract.
  • In testing, use a default date different from the current date and check the date actually recorded.

Related content

REFERENCES
  1. PIRES, Marcos da Rocha. F241DTBOR - Alteração da data do borderô com impostos. TOTVS TDN, 27 dez. 2024. Accessed on 2026-10-23.
  2. EURAI. Pontos de Entrada P12.2210 - Parte 2. Universo do Desenvolvedor, 2023. Accessed on 2026-10-23.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha