# HistoricPreCalculationSubOperations

> One planned operation of a finished production order (productiehistorie): the final pre-calculation of an operation.

Subject: Calculations.

One planned operation of a finished production order (productiehistorie): the final pre-calculation of an operation. It has no navigation to its assembly: join HistoricProductionOrderAssemblies on historic_production_order_header_id and historic_production_order_assembly_id, for calculation_quantity.

Label in Fledge: VC-subbewerkingen historie.

| | |
| --- | --- |
| URL | `https://odata-api.fledge.nl/v2-8/HistoricPreCalculationSubOperations` |
| Key | `administration_id`, `historic_production_order_assembly_id`, `historic_production_order_header_id`, `historic_production_order_pre_calculation_sub_operation_id`, `main_operation` |
| Administration-specific | yes: always filter on `administration_id` |
| Operations | GET list, GET one, POST, PATCH, DELETE |
| Read licenses | BASIS |
| Write licenses | PRODUCTIE, BEHEER |
| Scopes | FLEDGE_PORTAL |

## Example requests

```http
GET https://odata-api.fledge.nl/v2-8/HistoricPreCalculationSubOperations?$filter=administration_id eq 1&$select=historic_production_order_assembly_id,historic_production_order_header_id,historic_production_order_pre_calculation_sub_operation_id,main_operation,date_ready,decription,has_setting_code&$top=50
GET https://odata-api.fledge.nl/v2-8/HistoricPreCalculationSubOperations(administration_id=1,historic_production_order_assembly_id={historic_production_order_assembly_id},historic_production_order_header_id='{historic_production_order_header_id}',historic_production_order_pre_calculation_sub_operation_id={historic_production_order_pre_calculation_sub_operation_id},main_operation={main_operation})
```

## Fields

| Field | Type | Description |
| --- | --- | --- |
| `administration_id` (key) | Int32 | Administratienummer |
| `historic_production_order_header_id` (key) | String, not null | Ordernummer |
| `historic_production_order_assembly_id` (key) | Int32, not null | Schrap |
| `historic_production_order_pre_calculation_sub_operation_id` (key) | Int32, not null | Volgnummer |
| `main_operation` (key) | Int32, not null | Hoofdbewerking. The main operation (main_operation_id elsewhere). |
| `date_ready` | Date | Datum gereed. When the operation was reported ready. |
| `decription` | String | Omschrijving. The description (spelled so). |
| `employee_signal_ready` | Int32 | Medewerker gereedmelding |
| `file` | String | Bestand |
| `has_setting_code` | Boolean | Instelcode. True for a set-up operation (instelbewerking), as has_adjustment_code on live operations. |
| `memo` | String | Memo |
| `operation_duration` | Decimal | Bewerkingstijd. The same column as total_operation_duration on live operations: probably the planned time in seconds for one unit of the assembly. Multiply by the assembly's calculation_quantity, except a set-up operation (has_setting_code), which counts once. |
| `operation_duration_apiece` | Decimal | Bewerkingstijd p/s: Bewerkingstijd per stuk. The time of one run, in seconds. |
| `operation_sequence` | Int32 | Bewerkings volgorde |
| `price` | Decimal | Prijs |
| `quantity` | Decimal | Aantal |
| `rate` | Decimal | Tarief. The hourly rate (tariff on live operations). |
| `sub_operation` | Int32 | Subbewerking. The sub operation (sub_operation_id elsewhere). |
| `time_norm` | Decimal | Normtijd |
| `user_signal_ready` | Int32 | Gebruiker gereedmelding |

## Relations

- `Administration` → [Administrations](https://docs.fledge.nl/en/api/reference/Administrations.md) (one)

---

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