Páginas filhas
  • Nature x Budget Accounts (FINA272)


CONTENTS


01. OVERVIEW

This register enables you to import the Budgetary Flow by Nature from PCO - Budget Planning and Control to Financials. Use it to list the Natures with Budget Accounts. You can later use this list to import the values registered in Budget Planning and Control for the Financial Budget.


02. EXAMPLE OF USE


 Add.

In option Add, the screen below is displayed with header and Items, in which the header and a view of the Natures table (SED) of fields code and description and the items the relationship that will be registered in relationship table F73.




The Fields, Budget Account From and To have default query of table AK5, Class has default query of table AK6, Cost Center From and To have default query of table CTT, Accounting Item From and To have default query of table CTD and Value Class From and To have default query of table CTH.

Except for field Budget Account From and To, all aforementioned fields will be selected if left blank.


When you click Confirm, the routine saves the entry and no longer allows new additions for nature 001, as exemplified above. You will only be able to edit it.

You can add several lines to compose the value of the nature with the budget accounts. You cannot repeat the set of budget account plus class plus cost center plus accounting item plus value class in more than one nature.


Edit.

Option Edit displays the Natures X Budget Accounts screen, mentioned above in item Add, with the record placed in the browser for due maintenance. If the listing does not yet exist, the system notifies that you must use option Add.



View.

Option View displays the Natures X Budget Accounts screen, mentioned above in item Add, with the record placed in the browser for due viewing.



Delete.

Option Delete displays the Natures X Budget Accounts screen, mentioned above in item Add, with the record placed in the browser for due confirmation of deletion.


Import.

Option Import displays questions for you to select budgetary balances to be imported to Financials. After you fill out the questions and confirm the operation, the system starts the transfer process by feeding table SE7 - Financial Budget with values from the calculation of the budget accounts listed in table F73.

The aforementioned calculation is the sum of the balances of valid budget accounts listed for each nature, the result being saved in its respective period in Financials.

 

Questions

1 – Period From  – Enter start date for importing values.

2 – Period To  – Enter end date for importing values.

3 – Balance Type – Enter the Type of Balance for importing values (enable default query for this question).

4 – Target Currency – Enter the Currency to be used in financial budget (enable default query for this question).

5 – Nature From – Enter initial nature for import. (enable default query for this question)

6 – Nature To – Enter final nature for import. (enable default query for this question)

7 – Budget Account From – Enter the initial budget account for import. (enable default query for this question)

8 – Budget Account To – Enter the final budget account for import. (enable default query for this question)



After processing, a Browser formatted screen is displayed with the options Confirm or Cancel, with the data generated in the import formatted as financial budget fields. View the screen to check the data and confirm or cancel the operation.

After confirmation, there will be no reversal or cancellation of the process. You must execute this procedure manually in the financial budgets area.

Imported data will always overwrite the data found in the Financial Budget register.

03. Data Structure


Table

Key

File

Name

Single key

F73

F73010

Natures x Budget Accounts

F73_FILIAL+F73_NATUR+F73_ITEM


Main Fields

Field

Description

F73_FILIAL

System Branch Code

F73_NATUR

Financial Nature Identification Code

F73_DESNAT

Financial Nature Description

F73_ITEM

Sequential Item

F73_COINI

Initial Code of Budget Account for data import

F73_COFIM

Final Code of Budget Account for data import

F73_CLASSE

Nature Code for data import. When blank, all are considered.

F73_ CCINI

Initial Code of Cost Center for data import. When blank, all are considered.

F73_ CCFIM

Final Code of Cost Center for data import. When blank, all are considered.

F73_ITCTBI

Initial Code of Accounting Item for data import. When blank, all are considered.

F73_ITCTBF

Final Code of Accounting Item for data import. When blank, all are considered.

F73_CLVRLI

Initial Code of Value Class for data import. When blank, all are considered.

F73_CLVRLF

Final Code of Value Class for data import. When blank, all are considered.


Validations


Field

Validation

F73_NATUR

ExistChav("SED")

F73_COINI

ExistChav("AK5") .AND. FIN272Vld(‘F73_CO’,INCLUI)*

F73_COFIM

ExistChav("AK5") .AND. FIN272Vld(‘F73_CO’,INCLUI)*

F73_CLASSE

Vazio() .or. ExistChav("AK6")

F73_ CCINI

Vazio() .or. ExistChav("CTT").AND. FIN272Vld(‘F73_ CCINI’,INCLUI)*

F73_ CCFIM

Vazio() .or. ExistChav("CTT").AND. FIN272Vld(‘F73_ CCFIM’,INCLUI)*

F73_ITCTBI

Vazio() .or. ExistChav("CTD").AND. FIN272Vld(‘F73_ ITCTBI’,INCLUI)*

F73_ITCTBF

Vazio() .or. ExistChav("CTD").AND. FIN272Vld(‘F73_ ITCTBF’,INCLUI)*

F73_CLVRLI

Vazio() .or. ExistChav("CTH").AND. FIN272Vld(‘F73_ CLVRLI’,INCLUI)*

F73_CLVRLF

Vazio() .or. ExistChav("CTH").AND. FIN272Vld(‘F73_ CLVRLF’,INCLUI)*

*Function FIN272Vld() will be responsible for all field validations


Index.


Index 

Order

Key

Description

F73_FILIAL

1

F73_FILIAL+F73_NATUR+F73_ITEM

Nature + Item


Triggers.


Field

Seq

Rule

Key

Condition

Alias

F73_NATUR

001

M->F73_DESNAT:=SED->ED_DESCRIC

xFilial("SED")+M->F73_NATUR

!EMPTY(M->F73_NATUR)

SED


IMPORTANT!

It is Important to apply package 008342 and add routine to menu.

04. TABLES

  • F73 Nature x Budget Accounts.
  • SED Natures.
  • AK5 Budget Accounts.
  • AK6 Budget Classes.
  • CTT Cost Center.
  • CTD Accounting Item.
  • CTH Value Classes.


05. MIGRATOR ZC1 x F73

The purpose of this RdMake is to transfer data from the customer table (ZC1) to the new data table (F73) Nature x Budget Accounts.  

  

Código fonte:
#INCLUDE "protheus.ch"
#INCLUDE "rwmake.ch"
#INCLUDE "TBICONN.ch"
#Include "TOTVS.CH"

USER FUNCTION Migrador()

Local lOk := .F.

PREPARE ENVIRONMENT EMPRESA cEmpAnt FILIAL cFilAnt MODULO "FIN" TABLES "ZC1","F73","SED"

If ChkFile("ZC1")
    DbSelectArea("ZC1")
    ZC1->(dbSetOrder(1))//ZC1_FILIAL+ZC1_NATUR+ZC1_ITEM 
    ZC1->(dbGoTop())//POSICIONA NO PRIMEIRO REGISTRO DA ZC1
Endif

If ChkFile("F73")
    DbSelectArea("F73")
    F73->(dbSetOrder(1))//F73_FILIAL+F73_NATUR+F73_ITEM 
    F73->(dbGoTop())//POSICIONA NO PRIMEIRO REGISTRO DA F73
Endif

Begin Transaction

    While !("ZC1")->( Eof())
        Reclock("F73",.T.)
            F73->F73_FILIAL  := ZC1->ZC1_FILIAL
			F73->F73_NATUR   := ZC1->ZC1_NATUR
            F73->F73_ITEM    := ZC1->ZC1_ITEM 
            F73->F73_COINI   := ZC1->ZC1_COINI
            F73->F73_COFIM   := ZC1->ZC1_COFIM 
            F73->F73_CLASSE  := ZC1->ZC1_CLASSE
            F73->F73_CCINI   := ZC1->ZC1_CCINI 
            F73->F73_CCFIM   := ZC1->ZC1_CCFIM
            F73->F73_ITCTBI  := ZC1->ZC1_ITCTBI
            F73->F73_ITCTBF  := ZC1->ZC1_ITCTBF 
            F73->F73_CLVRLI  := ZC1->ZC1_CLVRLI
            F73->F73_CLVRLF  := ZC1->ZC1_CLVRLF
            lOk := .T.
		F73->(MsUnlock())

        ZC1->(Dbskip())
    Enddo

    ZC1->(DbCloseArea())
    F73->(DbCloseArea())

    If lOk
        MsgAlert("Migration successful!")
    else
        DisarmTransaction()
        MsgAlert("Error in migration run it again!")
    Endif

End Transaction   

RESET ENVIRONMENT

Return Nil