• A Confluence está sendo executada atualmente com todos os plugins que não são do sistema desabilitados. Pode haver perda de algumas funcionalidades
Páginas filhas
  • Check on Bills - FINA390 - Financials - P12

INDEX

Note

This routine was adjusted to comply with the General Personal Data Protection Law (LGPD law No. 13.70), so that some fields containing data regarded as sensitive and/or personal are blurred, becoming illegible.


01. OVERVIEW

Use this routine to generate checks before posting bills. You can generate a single check for several bills from the same supplier. The posting binds bank/branch/account/check.   

02. EXECUTION

  • Manually

Procedure manually performed through the Checks on Bills routine (FINA390), with the display of the screens involved in the process - actions/commands from the user are required

  • Automatically

Procedure automatically performed in the Checks on Bills routine (FINA390) without the display of screen - no interaction from the user required.
Used in customizations in which the process does not required user's interactions (MSEXECAUTO)

Example of Automatic Routine
#Include 'Protheus.ch'
//---------------------------------
// CHEQUE SOBRE TITULOS |
//---------------------------------
User Function 1DupPref()
Local aArray := {}
Local cCheque:= "2906001"
Local nOpc := 2 // 2 - Chq s/ titulo, 3 - Avulso
Private lMsErroAuto
aArray := { { "AUTBANCO" , "237" , NIL },;
{ "AUTAGENCIA" , "33901" , NIL },;
{ "AUTCONTA" , "125008 " , NIL },;
{ "AUTCHEQUE" , cCheque , NIL },;
{ "AUTVENCINI" , CtoD("21/06/2016"), NIL },; // Remover caso utilizar opc 3
{ "AUTVENCFIM" , CtoD("29/06/2016"), NIL },; // Remover caso utilizar opc 3
{ "AUTVALOR" , 5000 , NIL },;
{ "AUTFORN" , "001" , NIL },;
{ "AUTBENEF" , "F PADRAO ", NIL },;
{ "AUTNATUREZA" , "10101 " , NIL }}
MsExecAuto( { |x,y,z| FINA390(x,y,z)} ,0, aArray, nOpc)
If lMsErroAuto
MostraErro()
Else
Alert("O cheque "cCheque" foi gerado com sucesso!")
Endif
Return
Example of Automatic Routine Cancellation
#Include 'Protheus.ch'
//---------------------------------
// CHEQUE SOBRE TITULOS |
//---------------------------------
User Function MyCanFA390()
Local aArray := {}
Local cCheque:= "2906001"
Private lMsErroAuto := .F.
aArray := { { "AUTBANCO" , "237" , NIL },;
{ "AUTAGENCIA" , "33901" , NIL },;
{ "AUTCONTA" , "125008 " , NIL },;
{ "AUTCHEQUE" , cCheque , NIL },;
{ "AUTCHQIMPR" , .T. , NIL }}// Identifica se deve ou não reutilizar o cheque caso impresso.
MsExecAuto( { |x,y,z| FINA390(x,y,z)} ,0, aArray, 5)
If lMsErroAuto
MostraErro()
Else
Alert("O cheque "cCheque" foi cancelado com sucesso!")
Endif
Return


03. OPERATIONS

  • Counter Checks 

Procedure to add checks that lack associated bills.

  • Checks on Bills

Procedure for the user to add and link a check to a bill that has not yet been posted.

  • Search

Search for the bill in the accounts payable file, having it placed and highlighted in the browser.

  • Cancel 

Procedure to delete a check and cancel the bank transaction. 

  • Accounting tracker 

Display query with accounting entry of check, if it has already been booked.  

  • Caption 

Display caption chart and check status definitions

  • Redeposit

Procedure that reverses the transaction generated by the counter check operation

04. PARAMETERS

List of parameters applied to FINA390 and its processing 


05. FINANCIAL RULE 

A check is a prompt payment order. When the issuer uses the Check on Bills operation to generate a check, they order a bank to pay a given amount to a beneficiary.

Besides a payment order, the check is also considered a "credit bill". That is, the issuer admits to a debt; thus, if payment is not made, the check can be protested or lead to a collection lawsuit.


The check is paid when a balance exists in the checking account to be verified in table SE8 - Bank Balances of the company/business unit/branch to which the user is logged. If there is no balance, the check is considered bounced and returned, requiring a Cancel operation.


Attention

You cannot generate Checks on Advance Payments, Deductions, Debit Notes to Suppliers and Provisional Bills. 

Note

If you want to issue checks for Advance Payments, please use routine Automatic Postings Payable (FINA090) and, in parameters (F12), set option "Generate Check Autom." to YES.


06. TAX CALCULATION



  

IMPORTANT!

The routine is not responsible for withholding the tax. It only recomposes the base so the check value is a net amount.



07. ACCOUNTING

The booking of processes applied to a check added via Financials module is done through the standard entries below:

SE

Generator Fact

ON

OFF (CTBAFIN)

566

Generation of checks on bills pending 

X

X

567

Generation of counter checks 

X

X

568

Cancellation of Counter Check

X

X

569

Redeposit of checks on bills pending 

X

X

571

Cancellation of checks on bills pending / Deletion of payment order 

X

X


08. TABLES

  • SE2 - Accounts Payable Register 
  • SEF - Checks Register 
  • SED - Natures Register
  • SA6 - Banks Register
  • SA2 - Suppliers Register
  • FK2 - Postings Payable
  • FK3 - Calculated Taxes
  • FK4 - Withheld Taxes
  • FK5 - Bank Transactions
  • FK6 - Accessory Values
  • FKA - Transaction Tracking


09. ENTRY POINTS


Entry point

Note 

F390BROW

Entry Point that allows creating a filter in the browser of routine FINA390.Document: http://tdn.totvs.com/x/7qRc+

F390BFIL

Allows entering an expression for filtering bills on the main screen of the Check Generation routine, to run only in the TopConnect environment. Enter the expression in SQL.Documentation: http://tdn.totvs.com/x/oKRc+

A390HIST

Use entry point A390HIST to fill out field cHist390 (initialization of history in generation of checks on bills).
Documentation: http://tdn.totvs.com/x/OKJc+

F390FIL

Entry point F390FIL implements a condition in default filter of work file (table) when selecting bills to generate Checks on Bills.
Documentation: http://tdn.totvs.com/x/oAdoDg+

A390ACR


F390GCHE

Use entry point F390GCHE to handle the issue date of the check when generated through button "Check W/out Bill" of routine FINA390.Document: http://tdn.totvs.com/x/m6Rc+

A390SEF

Entry point A390SEF is used for complementary saving items of check on bill. It is executed after saving data to SEF.
Documentation: http://tdn.totvs.com/x/OaJc+

A390CHEQ

The entry point is called in the bill selection function for check generation (FA390tit). Entry point for processing checks before booking.
Documentation: http://tdn.totvs.com/x/N6Jc+

A390AVU 

The Entry Point is called in the check on bills generation program, on posting of bills or counter checks after saving check to SE5.
Documentation: http://tdn.totvs.com/x/NqJc+

F390CANC

Entry point that allows or prohibits check cancellation.Documentation: http://tdn.totvs.com/x/RaRc+

F390CBX

Entry point for saving complements after check cancellation.

F390REDP

Use entry point F390REDP to save complementary SEF data when handling a redeposit.
Documentation: http://tdn.totvs.com/x/A6Nc+

FA390NATUR


F390NATU


F390BEN


F390TIT

Entry point F390TIT checks the possibility of selecting the bill to compose the check. If the bill selection is changed, ExecBlock must return .F., so there is nochange to accumulators of values and numbers of bills.Document: http://tdn.totvs.com/x/YqVc+

FA390TOK

Use entry point FA390TOK in validation (All Okay) of data digitalized when generating checks and redepositing. You can use the following variables: cBanco390, cAgencia390, cConta390, cHist390, cNatur390, cCheque390, cForn390, cBenef390 e nValor390.Document: http://tdn.totvs.com/x/taNc+

F390FILUSU

Entry point for validation of bills for CH generation.

F390GRV

The purpose of entry point F390GRV is to handle checks. It is called in function fa390Ver() before checking whether the cancellation refers to counter check or bill.

F390CBX2

Entry point for saving complements after check cancellation.