AUTOMATIC CALCULATION FOR ADDITIONAL SUBSTENANCE AND ACCOMMODATION EXPENSES IN
ACCORDANCE WITH BUNDESREISEKOSTENGESETZ

When a new expense item is created, as soon as the expense product "Additional meal expenses" is selected (the expense product is flagged by the new checkbox "Additional meal expenses"), the form view of the expense item is supplemented with the following fields:

Date of arrival
Departure date
Destination
Breakfast included
Number of lunches included
Number of dinners included
 

In addition, the state administration will be supplemented with two additional fields to be able to store the daily rates for additional meals:

Expense allowance 24h
Expense allowance>8h

From the given information, Odoo automatically calculates the amount of expenses and deductible flat rates for included meals:

IF the expenditure product marked as "expenses" is deposited in an expense item,
THEN the following new mandatory fields are inserted in the expense item:

Arrival date (datetime)
Destination (many2one, res.country)
Breakfast included (int)
Number of lunches included (int)
Number of dinners included (int)

Based on this information Odoo calculates the number of days as well as the number of arrival and departure days and outputs them in new calculated fields "Number of arrival and departure days" and "Number of days". The price of the expense item for additional meal expenses is then calculated as follows:

(<Amount Traveldays> * <Expense allowance 8h> from selected travel destination
PLUS <Amount days> * <Expense allowance 24h> from selected travel destination)
MINUS (<Amount breakfast included> * <Expense allowance 24h> from selected travel destination * 0,2)
MINUS (<Amount of lunches uncluded> * <Expense allowance 24h>from selected travel destination * 0,4)
MINUS (<Amount of dinners included> * <Expense allowance 24h> from selected travel destination * 0,4)
Price of the expense product for additional meals

The price of an expense product for additional food expenses must never have a negative value. The values ​​of the arrival date (datetime) and departure date (datetime) fields are automatically inherited from the meal allowance expense item to the existing date of arrival and departure date fields in the expense report after the expense expense expense item is added to the expense report.