# TimesheetEntries

> One hours booking (urenboeking) by one employee on one day on one operation of a production order assembly.

Subject: Hours.

One hours booking (urenboeking) by one employee on one day on one operation of a production order assembly. Time that isn't production work (presence, absence, indirect hours) is booked the same way on special orders; sub_operation_type tells the kinds apart.

Label in Fledge: Uren geboekte uren.

| | |
| --- | --- |
| URL | `https://odata-api.fledge.nl/v2-8/TimesheetEntries` |
| Key | `administration_id`, `date`, `employee_id`, `timesheet_entry_id` |
| Administration-specific | yes: always filter on `administration_id` |
| Operations | GET list, GET one, POST, PATCH, DELETE |
| Read licenses | BASIS, BASISAPP, URENPC |
| Write licenses | BASIS, BASISAPP |
| Scopes | FLEDGE_PORTAL, FLEDGE_TERMINAL |

> **Watch out:** Presence (5) is clocking in and out; the work done in that time is booked separately. Don't add presence to productive hours.

## Example requests

```http
GET https://odata-api.fledge.nl/v2-8/TimesheetEntries?$filter=administration_id eq 1&$select=date,employee_id,timesheet_entry_id,cluster_id,cost_sub_operation_post_calculation,end_time&$top=50
GET https://odata-api.fledge.nl/v2-8/TimesheetEntries(administration_id=1,date={date},employee_id={employee_id},timesheet_entry_id={timesheet_entry_id})
```

## Fields

| Field | Type | Description |
| --- | --- | --- |
| `administration_id` (key) | Int32 | Administratienummer |
| `employee_id` (key) | Int32, not null | Medewerkernummer: Medwerkernummer |
| `date` (key) | Date, not null | Datum |
| `timesheet_entry_id` (key) | Int32, not null | Volgnr: Volgnummer om meerdere keren op zelfde orderschrapnr te kunnen boeken.. A sequence number within the employee's day, not unique on its own. |
| `cluster_id` | Int32 | Clusternummer. Groups the entries of one employee and day that were started together on several production orders, numbered per employee per day; 0 when the entry stands alone. Not a link to OperationClusters. |
| `cost_sub_operation_post_calculation` | Decimal | Kostprijs bewerking in nacalculatie. The operation's cost rate when the entry was written. |
| `date_created` | DateTimeOffset | Aangemaakt: Aanmaakdatum en -tijd |
| `date_updated` | DateTimeOffset | Gewijzigd: Datum/tijd laatste wijziging |
| `day_number_since_1900` | Int32 | Dagnr_1900: Dagnummer sinds 01-01-1900 |
| `day_number_within_week` | Int32 | Dag nr: Dagnummer binnen week. |
| `declaration_price_machine` | Decimal | Declaratieprijs machine uren |
| `declaration_price_man_hours` | Decimal | Declaratieprijs manuren |
| `declaration_price_total` | Decimal | Declarabele prijs totaal. |
| `employee_function_hourly_rate` | Decimal | Functietarief man |
| `employee_grouping_1_id` | Int32 | Indeling1 |
| `employee_grouping_2_id` | Int32 | Indeling2 |
| `end_date` | Date | Einddatum urenboeking |
| `end_time` | Int32 | Eindtijd. Seconds since midnight on end_date; empty while the booking is still running. |
| `financial_period_id` | Int32 | Periode nummer |
| `financial_year` | Int32 | Boekjaar |
| `has_overtime_machine_correction` | Boolean | Ov_mach correctie: Geeft aan of de overuren van de machine handmatig gecorrigeerd zijn of niet. |
| `hour_status_clock` | Int32 | Klokstatus: Status van een urenrecord ingevoerd met de klok. |
| `hours_worked` | Decimal | Aantal werkuren op de dag waarvoor de boeking gedaan is.. The employee's working hours of that day, not the length of this booking. |
| `human_time_in_seconds` | Decimal | Orderuren (in sec).. The booked man time in seconds for total-time entries (input_type 2). For start and end entries (input_type 1) it can be 0: compute the length from start and end. |
| `input_type` | Int32 | Wijze invoer: Wijze van invoeren: b.v. begin- + eindtijd of totaaltijd. Values: 1 = Start and end time; 2 = Total time |
| `is_counter_booking` | Boolean | Logical die aangeeft of een boeking een tegenboeking is of niet. |
| `is_early_or_late` | Boolean | Reden vl: Geeft aan of het record een reden te vroeg weg of te laat aanwezig is |
| `is_overtime_fixed` | Boolean | Overwerk gefixeerd: Geeft aan of het overwerk van het record gefixeerd is of niet. |
| `is_overtime_suppressed` | Boolean | Geeft aan of ov onderdrukt is of niet. |
| `is_setup_operation` | Boolean | Instelbewerking |
| `machine_cost` | Decimal | Kostprijs machine uren |
| `machine_time_in_seconds` | Int32 | Machine uren. Machine time in seconds. |
| `main_operation_id` | Int32 | Hoofdbewerkingsnummer |
| `man_hour_cost` | Decimal | Kostprijs manuren |
| `memo` | String | Memo |
| `memo_2` | String | Memo |
| `month_number` | Int32 | Maandnummer |
| `origin` | Int32 | Bron: Geeft aan hoe het record is ingevoerd, b.v. PC-kantoor, PC-hal of klok-hal.. How the entry was made: 3 the web app (also the hours approval overview's "Uren toevoegen"), 4 a PC terminal, 5 generated by hours processing, 6 web; 2 an entry of a total time made through the Fledge API. |
| `overrun_machine_post_calculation` | Decimal | Opslagperc. machine uren: Opslagpercentage machine uren van de order |
| `overrun_manual_post_calculation` | Decimal | Opslagperc. manuren: Opslagpercentage manuren van productieorder |
| `overtime_1` | Int32 | Overwerk 1 |
| `overtime_1_machine` | Int32 | Overwerk 1 mach.: Overwerk 1 voor machine |
| `overtime_2` | Int32 | uren overwerk 2 |
| `overtime_2_machine` | Int32 | Overwerk 2 Mach.: Overwerk 2 voor machine |
| `overtime_3` | Int32 | uren overwerk 3 |
| `overtime_3_machine` | Int32 | Overwerk 3 mach.: Overwerk 3 voor machine. |
| `overtime_4` | Int32 | uren overwerk 4 |
| `overtime_4_machine` | Int32 | Overwerk 4 mach.: Overwerk 4 voor machine. |
| `overtime_5` | Int32 | uren overwerk 5 |
| `overtime_5_machine` | Int32 | Overwerk 5 mach.: Overwerk 5 voor machine. |
| `period_4_weeks` | Int32 | 4Week nummer |
| `pre_calculation_sub_operation_id` | Int32 | Volgnummer. The planned operation line it was booked on, within the order, assembly and main operation. |
| `production_code_id` | Int32 | Produktiecodenummer |
| `production_order_assembly_id` | Int32 | Orderschrapnummer |
| `production_order_header_id` | String | Ordernummer |
| `schedule_id` | Int32 | Schemanummer |
| `team_id` | Int32 | Ploegnummer. The employee's team (ploeg) when the entry was made; it doesn't follow a later team change. Join Teams on it. |
| `start_date` | Date | Begindatum boeking |
| `start_time` | Int32 | Begintijd. Seconds since midnight on start_date. |
| `status` | Int32 | Status urenverwerking. Values: 0 = Booked, not approved yet (Geboekt); 1 = Approved (Goedgekeurd); 2 = Provisionally processed (Voorlopig verwerkt); 4 = Processed (Definitief verwerkt); -1 = Rejected (Afgekeurd) |
| `sub_operation_billable_rate` | Decimal | Declarabel tarief van bewerking (incl. mantarief). |
| `sub_operation_id` | Int32 | Subbewerkingsnummer |
| `sub_operation_type` | Int32 | Soort bewerking (prod, niet prod, ...).. Values: 1 = Productive (Productief); 2 = Not productive, indirect (Niet productief); 3 = Absent (Afwezig); 4 = Travel (Reisuren); 5 = Present (Aanwezig) |
| `sub_operation_weighting_percentage` | Int32 | Wegingspercentage: Weginspercentage van de subbewerking |
| `total_cost` | Decimal | Kostprijs totaal.. Filled when the hours are processed. |
| `week_number` | Int32 | Week nr: Weeknummer. A week number derived from date; its definition isn't documented. Group by date for weeks. |

## Relations

- `Administration` → [Administrations](https://docs.fledge.nl/en/api/reference/Administrations.md) (one)
- `Employee` → [Employees](https://docs.fledge.nl/en/api/reference/Employees.md) (one)
- `EmployeeGrouping1` → [EmployeeGrouping1s](https://docs.fledge.nl/en/api/reference/EmployeeGrouping1s.md) (one)
- `EmployeeGrouping2` → [EmployeeGrouping2s](https://docs.fledge.nl/en/api/reference/EmployeeGrouping2s.md) (one)
- `EmployeeScheduleHeader` → [EmployeeScheduleHeaders](https://docs.fledge.nl/en/api/reference/EmployeeScheduleHeaders.md) (one)
- `HistoricProductionOrderAssembly` → [HistoricProductionOrderAssemblies](https://docs.fledge.nl/en/api/reference/HistoricProductionOrderAssemblies.md) (one)
- `HistoricProductionOrderHeader` → [HistoricProductionOrderHeaders](https://docs.fledge.nl/en/api/reference/HistoricProductionOrderHeaders.md) (one)
- `MainOperation` → [MainOperations](https://docs.fledge.nl/en/api/reference/MainOperations.md) (one)
- `PreCalculationSubOperation` → [PreCalculationSubOperations](https://docs.fledge.nl/en/api/reference/PreCalculationSubOperations.md) (one)
- `ProductionCode` → [ProductionCodes](https://docs.fledge.nl/en/api/reference/ProductionCodes.md) (one)
- `ProductionOrderAssembly` → [ProductionOrderAssemblies](https://docs.fledge.nl/en/api/reference/ProductionOrderAssemblies.md) (one)
- `ProductionOrderHeader` → [ProductionOrderHeaders](https://docs.fledge.nl/en/api/reference/ProductionOrderHeaders.md) (one)
- `SubOperation` → [SubOperations](https://docs.fledge.nl/en/api/reference/SubOperations.md) (one)
- `Team` → [Teams](https://docs.fledge.nl/en/api/reference/Teams.md) (one)
- `TimesheetJournalEntryLinks` → [TimesheetJournalEntryLinks](https://docs.fledge.nl/en/api/reference/TimesheetJournalEntryLinks.md) (many)

## Actions

- `POST TimesheetEntries(administration_id=1,date={date},employee_id={employee_id},timesheet_entry_id={timesheet_entry_id})/approve` — body: `memo` String; `memo_2` String — returns TimesheetEntry
- `POST TimesheetEntries/approve` — body: `TimesheetEntries` TimesheetEntryKeyDto[]: administration_id (Int32), employee_id (Int32), date (Date), timesheet_entry_id (Int32); `memo` String; `memo_2` String — returns TimesheetEntry[]
- `POST TimesheetEntries(administration_id=1,date={date},employee_id={employee_id},timesheet_entry_id={timesheet_entry_id})/disapprove` — body: `memo` String; `memo_2` String — returns TimesheetEntry
- `POST TimesheetEntries/disapprove` — body: `TimesheetEntries` TimesheetEntryKeyDto[]: administration_id (Int32), employee_id (Int32), date (Date), timesheet_entry_id (Int32); `memo` String; `memo_2` String — returns TimesheetEntry[]

---

Source: https://docs.fledge.nl/en/api/reference/TimesheetEntries
