# PreCalculationOutsourcedItems

> One planned line of an outsourced item (uitbesteding) of a production order assembly in the pre-calculation (voorcalculatie).

Subject: Calculations.

One planned line of an outsourced item (uitbesteding) of a production order assembly in the pre-calculation (voorcalculatie). What was booked against it is in PostCalculationOutsourcedItems; a purchase order line is linked through PurchaseOrderProductionOrderLinks. Only live orders: a finished order's lines are not in this set.

Label in Fledge: Productieorder VC uitbestedingen.

| | |
| --- | --- |
| URL | `https://odata-api.fledge.nl/v2-8/PreCalculationOutsourcedItems` |
| Key | `administration_id`, `pre_calculation_outsourced_item_id`, `production_order_assembly_id`, `production_order_header_id` |
| Administration-specific | yes: always filter on `administration_id` |
| Operations | GET list, GET one, POST, PATCH, DELETE |
| Read licenses | BASIS |
| Write licenses | PRODUCTIE |
| Scopes | FLEDGE_PORTAL, FLEDGE_TERMINAL |

## Example requests

```http
GET https://odata-api.fledge.nl/v2-8/PreCalculationOutsourcedItems?$filter=administration_id eq 1&$select=pre_calculation_outsourced_item_id,production_order_assembly_id,production_order_header_id,date_available,is_quantity_independent,is_reserved&$top=50
GET https://odata-api.fledge.nl/v2-8/PreCalculationOutsourcedItems(administration_id=1,pre_calculation_outsourced_item_id={pre_calculation_outsourced_item_id},production_order_assembly_id={production_order_assembly_id},production_order_header_id='{production_order_header_id}')
```

## Fields

| Field | Type | Description |
| --- | --- | --- |
| `administration_id` (key) | Int32 | Administratienummer |
| `production_order_header_id` (key) | String, not null | Order nummer |
| `production_order_assembly_id` (key) | Int32, not null | Schrapnummer |
| `pre_calculation_outsourced_item_id` (key) | Int32, not null | Uitbestdings nr.: Uitbestedings nummer |
| `addition` | Decimal | Opslag |
| `date_available` | Date | Gewenste beschikbaarheid. The desired availability date (gewenste beschikbaarheid); can be empty. A purchase order made from the order advice doesn't take it over as its delivery date. |
| `description_1` | String | Omschrijving |
| `description_2` | String | Omschrijving |
| `description_3` | String | Omschrijving |
| `drawing_number` | String | Tekeningnummer |
| `instruction` | Int32 | Voorschrift |
| `is_archived` | Boolean | Archief: Gearchiveerd |
| `is_finished_stock` | Boolean | Voorraad afgw.: Voorraad afgewerkt |
| `is_ordered` | Boolean | Besteld j/n |
| `is_stock` | Boolean | Voorraad j/n |
| `measure_surface` | Boolean | Bepaal oppervlakte |
| `measure_weight` | Boolean | Bepaal gewicht |
| `memo` | String | Memo |
| `order_is_finished` | Boolean | Besteld afgewerkt |
| `pre_calculation_amount` | Decimal | Declarabel bedrag |
| `produce` | Boolean | Produceren |
| `production_finished` | Boolean | Produceren afgw.: Produceren afgewerkt |
| `revision` | String | Revisie |
| `supplier_text` | Int32 | Lev/art/tekst: Leverancier/artikel/tekst |
| `is_quantity_independent` | Boolean | Aantal onafhankelijk. True when the line counts once per order, whatever the quantity. |
| `article_id` | String | Artikelcode |
| `creditor_id` | Int32 | Crediteurnummer |
| `article_custom_field_set_id` | Int32 | Volgnummer |
| `is_reserved` | Boolean | Gereserveerd j/n. Stock is reserved for what is still needed, set when the assembly reaches the reservation status. |
| `main_operation_id` | Int32 | Hoofdbewerkings nummer |
| `next_step` | Int32 | Vervolg (voorraad, inkoop, productie). What happens to the line, set by the backend. 0 means the need is still open (it shows in the order advice).. Values: 0 = None yet (the need is open); 1 = Stock (Uitgegeven); 2 = Purchase (Besteld); 3 = Production (Wordt geproduceerd); 4 = Return (Retour); 5 = Production on a separate order |
| `position_number` | String | Pos nummer |
| `post_calculation_quantity` | Decimal | Aantal NC: Aantal gebruikt in NC. What has been accounted for so far in the post-calculation, by issues and purchase receipts. |
| `price` | Decimal | Prijs. The planned price for one unit of the assembly: multiply by the assembly's calculation_quantity for the order, except a line with is_quantity_independent, which counts once. |
| `quantity` | Decimal | Aantal |
| `sequence` | Int32 | Volgorde |
| `sub_operation_id` | Int32 | Subbewerkingsnummer |
| `total_quantity` | Decimal | Totaal aantal VC. What the whole assembly needs, in the article's price unit, with net or gross and trade sizes applied. Still needed = total_quantity - post_calculation_quantity. |
| `warehouse_address_id` | Int32 | Adresnummer |
| `warehouse_aisle_id` | Int32 | Magazijn |
| `warehouse_shelf_id` | Int32 | Locatie |

## Relations

- `Administration` → [Administrations](https://docs.fledge.nl/en/api/reference/Administrations.md) (one)
- `Article` → [Articles](https://docs.fledge.nl/en/api/reference/Articles.md) (one)
- `Creditor` → [Creditors](https://docs.fledge.nl/en/api/reference/Creditors.md) (one)
- `ProductionOrderAssemblies` → [ProductionOrderAssemblies](https://docs.fledge.nl/en/api/reference/ProductionOrderAssemblies.md) (one)
- `ProductionOrderHeader` → [ProductionOrderHeaders](https://docs.fledge.nl/en/api/reference/ProductionOrderHeaders.md) (one)
- `WarehouseAddress` → [WarehouseAddresses](https://docs.fledge.nl/en/api/reference/WarehouseAddresses.md) (one)
- `WarehouseAisle` → [WarehouseAisles](https://docs.fledge.nl/en/api/reference/WarehouseAisles.md) (one)
- `WarehouseShelf` → [WarehouseShelfs](https://docs.fledge.nl/en/api/reference/WarehouseShelfs.md) (one)
- `PostCalculationOutsourcedItems` → [PostCalculationOutsourcedItems](https://docs.fledge.nl/en/api/reference/PostCalculationOutsourcedItems.md) (many)
- `PreCalculationSubOperationLinks` → [PreCalculationSubOperationLinks](https://docs.fledge.nl/en/api/reference/PreCalculationSubOperationLinks.md) (many)
- `PurchaseOrderProductionOrderLinks` → [PurchaseOrderProductionOrderLinks](https://docs.fledge.nl/en/api/reference/PurchaseOrderProductionOrderLinks.md) (many)

## Actions

- `POST PreCalculationOutsourcedItems(administration_id=1,pre_calculation_outsourced_item_id={pre_calculation_outsourced_item_id},production_order_assembly_id={production_order_assembly_id},production_order_header_id='{production_order_header_id}')/issueOut` — body: `account_date` Date; `quantity` Decimal; `postcalculation_excess_percentage` Decimal; `recalculate_origin` RecalculationOriginsEnum — returns PreCalculationOutsourcedItem

---

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