Attention
From release 12.1.16 on.
The purpose of the travel process in the Financial module of Protheus is to offer control of expenses related to the corporate travels of a company or entity. For this purpose, we register travel requests, purchase services, grant advances, render accounts, pay suppliers, and bill these trips, when necessary.
Below we detail the components of the travel process:
Due to the complexity of corporate travel policies and the variations in rules between companies, the travel process has a series of parameters. These are concentrated in the Configuration Wizard (FINA691) and divided into:
Note that all changes made in this wizard directly reflect the parameters of Protheus (SX6).
This routine is responsible for mapping the Protheus backoffice branches with the Reserve environment, such as user and password for integration. For further information, see the integration manual page here.
The access group defines the hierarchies for viewing employee travel data.
For example:
The following are employees of Company A:
There are two possible groups for configuration in this scenario:
1) João is responsible for Department Group A, where Paulo, Luciana, and Ricardo are members. So, João can view his own trips and the trips that contain at least one member of his group.
2) Paulo is responsible for Department Group A.1, where Luciana and Ricardo are members. Paulo can view his own trips and the trips that contain at least one or more members of his group.
Important
Users configured in the Travel Department User parameter have a full view of the data.
Expenses are the types of costs that an employee can report to the company. Through the Expense Type register (FINA679) it is possible to configure them.
There may or may not be any control of limits for accountability, such as:
If it is necessary to control these limits, the possible values for setting an expense are:
The limits have an effective period, that is, if it is necessary to change the policy, you can end a term by informing the End Date and entering the values for a new period.
You can link expense types to locations:
This link is made as another action on the expense type registration screen.
Tip
The Type of Expense header is the data of the cost entities as a facilitator for the entry of the line of expenses in accountability.
The Expense Group can be informed, but it is not mandatory.
The Expense Group (FINA681) has the same characteristics as the Expense Type, with the exception of cost entities, type of limit per expense, and unit value, which are specific to the expense line, and aim to group and define standard limits for a particular group.
Attention
The amount set in the expense, when informed, is a priority in the calculation of accountability.
The travel process uses the Participants' base (APDA020) of SIGAAPD - Performance Evaluation and Research. Therefore, in this register you find in the Travel tab the necessary information to make you a traveler:
A participant may or may not be an employee and the integrations with the Personnel Management module for this are those that exist in Protheus (from the Participant's registration replicating to the payroll or vice versa with the .ini configuration)
Important
For the participant to be considered self-approving, it is necessary to configure the MV_RESAPRT parameter with the value "1" (yes) and fill in the Approver field in the Participants register (Travel tab) with its own code. It is only possible to carry out this registration process in the Edit operation.
For more information on integrating Participants with Reserve, click here.
Although Reserve has only the Cost Center as the cost entity and Protheus works with other entities, it is possible to carry out the classifications in Protheus through the Travel routine (FINA665). In Related Actions, through the option Edit Cost Ent., it is also possible to inform the Value Class and the Accounting Item.
The rest of the routines carry these travel costs or, in the case of Accountability or Travel Request, have fields for entering entities.
For more information on integrating Cost Centers with Reserve, click here.
An employee (in this scenario, they are called Participant) needs to take a corporate trip, for some reason, whatever it may be (ex: customer service/visit, business meeting, event). So this routine will have as main objective to register the request of this trip, considering relevant information to control the expenses of the trip and its policies.
Important
This routine only covers requests from Protheus. Trips integrated with Reserve do not generate requests, as they are purchased and issued directly by the agency.
In the items of the trip, you can select and justify/detail the following services:
Attention
When parameterized for approval after the request, a pending approval will be generated for the superior of the participants. Otherwise, it can be sent to the travel department (directly after the request or in a second moment through the sending option) and the trip will be generated automatically.
Example:
The company can decide to go through all the approvals, in this case the flow will be:
Or it may be that only one of the approvals is necessary, in this case we have:
Access the routine through: Updates > Travel > Travel Requests
The traveler must inform the basic data of the trip in the header of the request, such as origin and destination, departure and arrival dates, customer for assistance (if any), etc.
For each service, Participants and their respective Cost Entities must be informed.
Also, you can select which participants will receive an advance in the Advances tab.
The calculated value is a forecast and is displayed only when it is parameterized:
For the execution of the automatic routine, we illustrated some features such as Inclusion (MyFA666Inc), Edition (MyFA666Alt) and Exclusion (MyFA666Del), in the following examples:
#INCLUDE "PROTHEUS.CH" #INCLUDE "FWMVCDEF.CH" //---------- Add travel request ----------// User Function MyFA666Inc() Local oModel := Nil Local oModelFW3 := Nil Local oModelFW4 := Nil Local oModelFW5 := Nil Local oModelFW6 := Nil Local cFilAtu := "" RpcSetEnv("T1","D MG 01 ","claudio.ribeiro","1") // Starts environment with requesting user oModel := FWLoadModel("FINA666") oModelFW3 := oModel:GetModel("FW3MASTER") // Travel header oModelFW4 := oModel:GetModel("FW4DETAIL") // Services oModelFW5 := oModel:GetModel("FW5DETAIL") // Participants oModelFW6 := oModel:GetModel("FW6DETAIL") // Cost center cFilAtu := xFilial("FW3") oModel:SetOperation(MODEL_OPERATION_INSERT) oModel:Activate() // Fill in the travel request header oModelFW3:SetValue("FW3_FILIAL",cFilAtu) oModelFW3:SetValue("FW3_NACION","1") oModelFW3:SetValue("FW3_CODORI","SP") oModelFW3:SetValue("FW3_CODDES","RJ") oModelFW3:SetValue("FW3_DTINI",StoD("20190702")) oModelFW3:SetValue("FW3_DTFIM",StoD("20190705")) oModelFW3:SetValue("FW3_CLIENT","001 ") oModelFW3:SetValue("FW3_LOJA","01") oModelFW3:SetValue("FW3_STATUS","0") // Open, initial status // Fill in the service grid included in the travel request oModelFW4:SetValue("FW4_ITEM",StrZero(1,TamSX3("FW4_ITEM")[1])) oModelFW4:SetValue("FW4_TIPO","1") // Aereo oModelFW4:SetValue("FW4_OBS", “Customer visit") // Fills grid of traveling participants oModelFW5:SetValue("FW5_ITEM",StrZero(1,TamSX3("FW4_ITEM")[1])) oModelFW5:SetValue("FW5_PARTIC","000001") oModelFW5:SetValue("FW5_ADIANT",.T.) // Add advance to participant oModelFW5:AddLine() // Add line for a second traveler oModelFW5:SetValue("FW5_ITEM",StrZero(2,TamSX3("FW4_ITEM")[1])) oModelFW5:SetValue("FW5_PARTIC","000002") oModelFW5:SetValue("FW5_ADIANT",.T.) // Add advance to participant // Fill in cost center grid oModelFW6:SetValue("FW6_ITEM",StrZero(1,TamSX3("FW4_ITEM")[1])) oModelFW6:SetValue("FW6_CC","002 ") oModelFW6:SetValue("FW6_PORCEN",100) oModelFW5:GoLine(1) // Validation and recording of data, if consistent If oModel:VldData() oModel:CommitData() Conout("Travel request included successfully.") Else VarInfo("",oModel:GetErrorMessage()) Conout("Validation error, travel request not included.") EndIf oModel:DeActivate() oModel:Destroy() RpcClearEnv() Return //---------- Travel Request change ----------// User Function MyFA666Alt() Local aKeyFW4 := {} Local oModel := Nil Local oModelFW5 := Nil Local oModelFW6 := Nil Local cSolic := "0000000010" RpcSetEnv("T1","D MG 01 ","richard.santos","1") // Initialize environment with requesting user dbSelectArea("FW3") dbSetOrder(1) dbSeek(xFilial("FW3")+cSolic) // Load data model with travel request positioned oModel := FWLoadModel("FINA666") oModelFW5 := oModel:GetModel("FW5DETAIL") // Participants oModelFW6 := oModel:GetModel("FW6DETAIL") // Cost center // Participant search key within the travel request aKeyFW4 := { {"FW5_FILIAL",xFilial("FW5")},{"FW5_SOLICI",cSolic},{"FW5_ITEM","01"},{"FW5_PARTIC","000002"} } oModel:SetOperation(MODEL_OPERATION_UPDATE) oModel:Activate() // Remove one of the travelers, in this case, participant 000002 If oModelFW5:SeekLine(aKeyFLE) oModelFW5:DeleteLine() Else Conout("Traveler not found in this travel request.") EndIf // Change the cost center (automatically positioned on the first grid) oModelFW6:SetValue("FW6_CC","003 ") // Validation and recording of data, if consistent If oModel:VldData() oModel:CommitData() Conout("Travel request edited successfully.") Else VarInfo("",oModel:GetErrorMessage()) Conout("Validation error, travel request not edited.") EndIf oModel:DeActivate() oModel:Destroy() RpcClearEnv() Return //---------- Delete travel request ----------// User Function MyFA666Del() Local oModel := Nil Local cSolic := "0000000010" RpcSetEnv("T1","D MG 01 ","claudio.ribeiro","1") // Starts environment with requesting user dbSelectArea("FW3") dbSetOrder(1) dbSeek(xFilial("FW3")+cSolic) // Load data model with travel request positioned oModel:= FWLoadModel("FINA666") oModel:SetOperation(MODEL_OPERATION_DELETE) oModel:Activate() // Validating and saving deletion If oModel:VldData() oModel:CommitData() Conout("Travel request deleted successfully.") Else VarInfo("",oModel:GetErrorMessage()) Conout("Validation error, travel request not deleted.") EndIf oModel:DeActivate() oModel:Destroy() RpcClearEnv() Return
The Travel routine (FINA665) has all the information related to trips already issued via agency or requests for individual travel.
A trip is composed of:
Travel header, which has the start and end dates, origin and destination, customer to be served (when applicable), etc.
The advances tab lists the participants and the advances requested for each one.
In the tab of the trip itself, you will see the list of all orders placed.
When selecting a travel order item, a context per service is enabled with specific data for each one, such as: For a flight, there is Airline, Locator, Class, etc.; in the case of a hotel, there is the Hotel Name, check-in and check-out dates, etc. Possible services are:
Participants and related Cost Entities are also displayed.
A trip made on Reserve is integrated only when it is issued, that is, it is not possible to change its services in Protheus (dates, values, etc.). The only editable data are the Cost Entities. For more details, see the TOTVS X Reserve integration manual.
A trip generated by a Travel Request from Protheus, on the other hand, must have its service details informed by the travel department through the Verification option, since the request is an order for the purchase of the trip. If approval is enabled after the verification, a pending approval will be generated for the superior of the participants.
A trip with all its services and expenses properly paid and accounted for is eligible for billing. This process displays the travel costs that can be passed on to the customer, in whole or in part, and generates a sales order for the customer. If it is not applicable for the company segment, this step is not required.
Advances (FINA667) are the amounts credited to employees to cover the costs of a trip, such as food, transportation, communication, etc.
These values are calculated through the configuration of the company's travel policy, which can be:
In the Travel routine (FINA665), it is still possible to request advance complements. If an employee needs more money on a trip, this request can be made by selecting the trip and the option Individual Advance Payment. In this case, an additional advance linked to the trip is generated.
The bill generation rules, such as Prefix, Class, Due Date for regular and urgent advances (those requested outside the advance policy rule) are in the Configuration Wizard.
Advances requested either via Reserve, Travel Request or individually are not approved together with the trip and generate a pending issue for the superior of the traveler, if configured.
Example:
If the superior's approval and financial evaluation is necessary, we have:
Or, we will have the following scenarios if a step can be performed automatically:
Tip
The advance is accounted for by the standard entry of a bill.
For cases in which the advance is in another currency and the rate informed after the bill is generated, it must be accounted for offline.
Attention
This process is not mandatory.
The advance can be generated from the travel request (FINA666) by selecting this option on the Advances tab:
Or after the Trip has already been sent to the travel department (FINA665) by clicking on the "Request Advance” and selecting the participants that will received the advance:
Then, through the routine FINA667, the advance can be viewed, and follow its flow of actions:
To execute the automatic routine, we illustrate the request for the advance after the trip is completed (MyFA667A), in the following example:
#INCLUDE "PROTHEUS.CH" #INCLUDE "FWMVCDEF.CH" //---------- Travel advance request ----------// User Function MyFA667A() Local aKeyFLC := {} Local aUser := {} Local oModel := Nil Local oModelFLC := Nil Local oModelFLD := Nil Local cViagem := "0000000001" Local cPartic := "000002" RpcSetEnv("T1","D MG 01 ","claudio.ribeiro","1") // Starts environment with requesting user dbSelectArea("FL5") dbSetOrder(1) dbSeek(xFilial("FL5")+cViagem) // Travel already requested // Load data model with travel request positioned oModel := FWLoadModel("FINA667A") oModelFLC := oModel:GetModel("FLCDETAIL") // Participants oModelFLD := oModel:GetModel("FLDDETAIL") // Advances // Participant search key within the travel aKeyFLC := { {"FLC_FILIAL",xFilial("FLC")},{"FLC_VIAGEM",cViagem},{"FLC_PARTIC",cPartic} } oModel:SetOperation(MODEL_OPERATION_UPDATE) oModel:Activate() If FINXUser(RetCodUsr(),aUser,.T.) // Participant that will receive the advance If oModelFLC:SeekLine(aKeyFLC) oModelFLC:SetValue("OK",.T.) oModelFLD:LoadValue("FLD_DTSOLI",dDatabase) oModelFLD:LoadValue("FLD_DTPREV",DataValida(dDatabase+3)) oModelFLD:LoadValue("FLD_SOLIC" ,aUser[1]) oModelFLD:LoadValue("FLD_NOMESO",PadR(aUser[2],TamSx3("FLD_NOMESO")[1])) oModelFLD:SetValue("FLD_VALOR",400) oModelFLD:SetValue("FLD_MOEDA","1") oModelFLD:SetValue("FLD_JUSTIF","Advance for traveller") // Validation and recording of data, if consistent If oModel:VldData() oModel:CommitData() Conout("Advance requested successfully.") Else VarInfo("",oModel:GetErrorMessage()) Conout("Validation error, advance not requested.") EndIf Else Conout("Traveler not found in this trip.") EndIf EndIf oModel:DeActivate() oModel:Destroy() RpcClearEnv() Return
With a trip in progress or after its completion, the traveler must account for expenses to the company.
Every trip, regardless of whether or not there is an advance, automatically generates a record in the Accountability routine (FINA677) linked to it.
A rendering of accounts has the basic data of a trip, such as its number, start and end dates, location, the customer that was served (if applicable), in addition to the cost entities and percentage of billing against the customer (if applicable), etc.
The employee may inform their expenses item by item, informing: expense, location, amount (in local currency or other and its conversion rate), quantity, cost entities, etc.
In addition, advances are listed on accountability and deducted from the total amount at the bottom of accountability.
The amounts spent, refundable, and the balance are also shown at the bottom, in the 3 currencies used by Protheus: local, dollar and euro.
Attention
Once finalized and forwarded to the travel department (after its inclusion or at a later time by the option to send to be checked), the travel department will check the accountability. Although the system already calculates the reimbursable amounts of expenses using the expense limit rule, if the verifier identifies an item in the statements that are outside the travel policy, they can post the discounts at this time and the amount to be returned/refunded is updated.
If the approval and/or release steps for financial are active, pending issues will be generated for the superior of the traveler and for the financial/travel department, respectively.
Example:
In the event that the whole process must pass through approval or verification, we have:
If any step can be performed automatically, we have:
Finally, in addition to the trips, the routine also allows individual rendering of accounts.
Tip
Accountability has specific entries for accounting for expenses, which are:
*The accountability totals are registered in the FLF - Accountability Header table.
Service Verification is nothing more than a mirror of the invoice of a travel agency or of the direct suppliers themselves (airlines, hotels, car rental companies, etc.).
In this routine, you can select travel items, either by service or considering all types, for selecting and editing the payment sent on the invoice. With the orders duly selected and the amounts edited when necessary, a purchase order, an invoice, or a bill will be generated.
Important
Tip
The advance is accounted for by the standard entry of a bill.
When selecting an order for a check, the value of the service registered on the trip is suggested, but it is possible to edit it for greater or lesser, the latter option also allows you to finalize the payment of the item or keep the balance for partial checks.
When there is an agreement between supplier and customer regarding the payment of travel expenses, Protheus allows you to bill both the complete trip and separate accountability.
The billing of a trip includes the costs of the contracted services (flight, hotel, car rental, insurance, and road) and the expenses of the employees involved. When all services are paid and the accountability is finalized and approved, the trip will be able to be invoiced against the customer, either partially or totally. However, it is possible to parameterize the travel rules and allow the advanced billing of a trip, as long as at least the rendering of accounts is finalized, since this is a variable cost, unlike the services that have a forecast in their hiring.
Individual accountability can be billed as soon as it is finalized.
Attention
This process is not mandatory.
For further information, see the integration manuals TOTVS X Reserve and PCO X Reserve.
The My Accountability app allows quick and easy control for corporate travelers to keep their rendering of accounts up to date while traveling.
With this app you can:
The minimum of this process that needs to be configured for the application to work is:
A complete travel process for the App includes:
Accountability (the focus of the app)
Attention
For more information, access TOTVS My Accountability in the Applications area.
Access Google Play to download the app.