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:

  • E-mail notifications
  • Retroactive Days
  • Default Approver
  • Uses working days or consecutive days
  • Standard Access Group
  • Protheus/Reserve Export
  • Participant as approver
  • Travel Department User
  • Product
  • Payment Term
  • Inflow TIO
  • Outflow TIO
  • Billing Advance
  • The prefix of bills payable and receivable
  • Types of a bill payable and receivable
  • Classes of bills payable and receivable
  • Class for bonuses payable and receivable
  • Prefix of bonuses
  • Days of delay
  • Standard customer and store
  • Type of rate used - Tourism quotation, the first day of travel, or last day of travel
  • Refund currency - Strong or Original
  • Advance currency - Strong or Original
  • Days to maturity of bills payable and receivable
  • Maximum days - open rendering of accounts
  • Maximum quantity - open rendering of accounts
  • Advance without an overnight stay
  • Fixed Value
  • Daily Value
  • Class
  • Days for estimate
  • Estimate of urgent advances
  • Type of travel - Domestic, International or Both
  • Type of Bill
  • The prefix of advance requested with trip
  • The prefix of single advance
  • Calculation base date - Request or trip start
  • Tourism conversion - before or after generating the bill
  • Manager’s emails
  • Apportionment Cost Center
  • An environment of integration with Reserve
  • Integration with Reserve - Disabled, Online, Schedule, Online, and Schedule
  • International Travel Numbering
  • Single Travel Numbering
  • Approval Configuration
  • Air
  • Accommodation
  • Car
  • Insurance
  • Road
  • Other
  • Passenger
  • Customer
  • Date - with tolerance
  • Cost Center
  • Prefix
  • Type of bill
  • Class
  • Supplier and Store


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:

  • João - Manager
  • Paulo - Coordinator
  • Luciana - Systems Analyst
  • Ricardo - Systems Analyst

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:

  • No limit - The expenses reported will be considered refundable.
  • Daily limit - The sum of expenses posted of the same type and on the day must not exceed the limit.
  • Total limit - The sum of all expenses of the same type posted must not exceed the limit.
  • Limit/expense - Expense is restricted to the informed limit.

If it is necessary to control these limits, the possible values for setting an expense are:

  • Unit Value - For automatic calculation when the amount is informed in the rendering of accounts (ex.: Km.)
  • Limit without overnight - Limit value for trips that do not require an overnight stay.
  • Limit with overnight - Limit value for trips that require an overnight stay.
  • Currency Limit 2 - Limit value for expenses in USD.
  • Currency Limit 3 - Limit value for expenses in EUR.

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:

  • Domestic
  • International
  • Both

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:

  • Position level - used for integration with Reserve and which defines the type of access the participant will have.
  • Reserve Login - participant’s login on Reserve
  • Reserve ID - entered after integrating the register with Reserve.
  • Current Company and Branch - company and branch where the participant currently acts to control Reserve orders.
  • Previous Company and Branch - a historical record of the company and branch where the participant previously worked to control Reserve orders.
  • Allow Advance - informs whether the participant is eligible for an advance.
  • Approver - Approver user ID
  • Substitute - Substitute approver user ID
  • Supplier and Store - Supplier and store code for credit of advances and refunds.
  • Accountability Substitute - ID of the user that can perform accountability in the participant's place (employee of a Project Office, Secretaries or Executive Assistants, etc.).

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.

01. OVERVIEW

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:

  • Flight
  • Accommodation
  • Car
  • Road
  • Insurance
  • Other


Attention

  • These service items are configurable and are in the Configuration Wizard. If the company does not offer any of these items in its policy, you can hide them.
  • The Others item is the only one in which it is not necessary to purchase a service, so requests with this service only do not go through the verification stage of the request. This is necessary when an employee wants to request only an advance, as they will, for example, pay a visit to a customer with their own vehicle and only want the advance.

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:


02. EXAMPLE OF USE

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:

03. AUTOMATIC ROUTINE

For the execution of the automatic routine, we illustrated some features such as Inclusion (MyFA666Inc), Edition (MyFA666Alt) and Exclusion (MyFA666Del), in the following examples:

Example of automatic routine execution
#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



04. TABLES USED

  • FW3 - Request Header
  • FW4 - Services (items)
  • FW5 - Employees
  • FW6 - Cost Entities


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:

  • Flight
  • Accommodation
  • Car
  • Road
  • Insurance
  • Other

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.

01. OVERVIEW

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:

  1. Fixed Amount: This is the fixed amount granted, usually for the transfer fee.
  2. Amount with or without Overnight Stay: When the trip has a period within the same day, the amount of the advance without an overnight stay is calculated; if it exceeds a daily rate, it will be calculated with the amount with overnight stay.
  3. Other currencies: Amounts in other currencies are usually granted by credit on traveler checks or currency purchase. For this case, Protheus does not make the calculation, but the credit amount of this advance must be informed. The conversion rates for the purchase of this currency into strong currency can be informed before or after the generation of the bill by configuring it in the Configuration Wizard.

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.

02. EXAMPLE OF USE

The advance can be generated from the travel request (FINA666) by selecting this option on the Advances tab:


image2019-7-8_15-12-37.png


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:


03. AUTOMATIC ROUTINE

To execute the automatic routine, we illustrate the request for the advance after the trip is completed (MyFA667A), in the following example:

Example of automatic routine execution
#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



04. TABLES USED

  • FL5 - Travel
  • FLC - Passengers
  • FLD - Advances

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

  • Accountability can only be finalized since all advances linked to the trip, if any, are paid, that is, credited to the employee. This prevents an undue refund amount from being credited to the employee.
  • All other currencies are converted to dollars since the most common operation is to grant traveler's checks in dollars for debit, credit or withdrawal in the currency of other countries. For example: In an expense made in rupees, the rate informed of the traveler check transaction must be the reference dollar conversion rate.

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:

  • 8B3 - 8B3 - Accountability/Expense Item
  • 8B4 - Reversal of Accountability/Expense Item
  • 8B5 - Header of Accountability*
  • 8B6 - Reversal of Header of Accountability*

*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

  • When a trip is rescheduled, the order is only canceled within the trip, as many services incur cancellation or rescheduling fees/costs. For this reason, both the rescheduled and the asset will be displayed in the payment.
  • 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.

  • The percentages of travel cost entities are proportioned and loaded into the generated verification record.



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:

  • Synchronize the travel accountability;
  • Add individual accountability;
  • Generate/manage expenses;
  • Monitor the balance of accountability;
  • Forward accountability for checking and approval;
  • Monitor accountabilities already closed;
  • Correct refused accountability.

The minimum of this process that needs to be configured for the application to work is:

  • Registers
    • Expenses (with or without binding by location and group)
    • Access Group
    • Participants
  • Accountability (individual)

A complete travel process for the App includes:

  • Registers
    • Configuration Wizard
    • Employee
    • Access Group
    • Expense
    • Expense Group
  • Travel Request (Via Reserve or Protheus integration)
  • Travel
  • Advance
  • Accountability (the focus of the app)

Attention

  • This application is complementary to the Financial Protheus travel control process;
  • You must have a Protheus username and password (from version 12.1.17 onwards January/18) to use it;
  • It is not mandatory to use the TOTVS Reserve integration, as it is already possible to request a separate trip in Protheus.

For more information, access TOTVS My Accountability in the Applications area.

Access Google Play to download the app.