# PreCalculationMaterials

> One planned line of a material (materiaal) of a production order assembly in the pre-calculation (voorcalculatie).

Subject: Calculations.

One planned line of a material (materiaal) of a production order assembly in the pre-calculation (voorcalculatie). What was booked against it is in PostCalculationMaterials; 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 materialen.

| | |
| --- | --- |
| URL | `https://odata-api.fledge.nl/v2-8/PreCalculationMaterials` |
| Key | `administration_id`, `pre_calculation_material_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, URENPC |
| Write licenses | PRODUCTIE |
| Scopes | FLEDGE_PORTAL, FLEDGE_TERMINAL |

## Example requests

```http
GET https://odata-api.fledge.nl/v2-8/PreCalculationMaterials?$filter=administration_id eq 1&$select=pre_calculation_material_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/PreCalculationMaterials(administration_id=1,pre_calculation_material_id={pre_calculation_material_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 |
| `pre_calculation_material_id` (key) | Int32, not null | Mat.nummer: Materiaal nummer |
| `production_order_assembly_id` (key) | Int32, not null | Schrapnummer |
| `addition` | Boolean | Toeslag |
| `allowance` | Int32 | Nummer: Toeslagprijs 1 |
| `amount_pre_calculation` | Decimal | Declarabel bedrag |
| `angle_1` | Decimal | Hoek 1 |
| `angle_2` | Decimal | Hoek 2 |
| `burn` | Boolean | Branden |
| `calculation_method` | Int32 | Rekenmethode |
| `date_available` | Date | Gewenste beschikbaarheids datum. 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 |
| `description_special` | String | Omschrijving speciaal |
| `do_miter_saw` | Boolean | Verstekzagen |
| `do_saw` | Boolean | Zagen |
| `drawing_number` | String | Tekeningnummer |
| `gross_price` | Decimal | Prijs bruto |
| `has_miter_saw_price` | Boolean | Toepassen verstekzaagprijs |
| `instruction` | Int32 | Voorschrift |
| `internal_serial_number_1` | Int32 | Intern volgnummer |
| `internal_serial_number_2` | Int32 | Intern volgnummer |
| `internal_serial_number_3` | Int32 | Intern volgnummer |
| `internal_serial_number_4` | Int32 | Nummer: Bewerkingsprijs 4 |
| `internal_serial_number_5` | Int32 | Nummer: Bewerkingsprijs 5 |
| `internal_serial_number_6` | Int32 | Nummer: Bewerkingsprijs 6 |
| `internal_serial_number_base` | Int32 | Intern volgnummer |
| `internal_serial_number_over` | Int32 | Intern volgnummer |
| `is_archived` | Boolean | Archief: Gearchiveerd |
| `is_finished_stock` | Boolean | Voorraad afgewerkt |
| `is_ordered` | Boolean | Besteld |
| `is_stock` | Boolean | Voorraad |
| `is_supplier_price` | Boolean | Leveranciersprijs (ja/nee) |
| `material_shape_id` | String | Materiaalvorm code |
| `material_text` | Int32 | Mat/art/tekst: Materiaal/artikel/tekst |
| `material_type_id` | String | Materiaalsoort: alfanumerieke code voor het materiaal, 15 karakters  lang |
| `measure_surface` | Boolean | Bepaal oppervlakte |
| `measure_weight` | Boolean | Bepaal gewicht |
| `memo` | String | Memo |
| `multiple_angles` | Boolean | Meerdere hoeken |
| `net_gross_manual` | Int32 | Netto/Bruto/Handmatig |
| `net_price` | Decimal | Prijs netto |
| `number_of_saw_cuts` | Int32 | Aantal maal zagen |
| `order_is_finished` | Boolean | Besteld afgewerkt |
| `order_quantity` | Decimal | Bestel aantal |
| `order_unit_gross` | Decimal | Bestel bruto: Besteleenheid bruto |
| `order_unit_net` | Decimal | Bestel netto |
| `over_price` | Boolean | Overprijs |
| `price_system` | Int32 | Prijssysteem |
| `price_unit` | Decimal | Prijs eenheid |
| `produce` | Boolean | Produceren |
| `production_finished` | Boolean | Produceren afgw.: Produceren afgewerkt |
| `purchase_status` | Int32 | Inkoop status |
| `radius` | Boolean | Stralen |
| `revision` | String | Revisie |
| `sandblast_lead_paint` | Boolean | Stralen + menie`: Stralen + menie |
| `sandblast_sigmaweld` | Boolean | Stralen + sigmaweld |
| `storage` | Decimal | Opslag |
| `type_of_miter` | Int32 | Type verstekzagen (liggend, staand) |
| `weight_gross` | Decimal | Gewicht bruto |
| `weight_net` | Decimal | Gewicht netto |
| `is_quantity_independent` | Boolean | Aantal onafhankelijk. True when the line counts once per order, whatever the quantity. |
| `is_fixed_length` | Boolean | Fixed lengte |
| `saw_cut` | Decimal | Zaagsnede |
| `parameter_1` | Decimal | Par 1: Parameter 1 |
| `parameter_2` | Decimal | Par 2: Parameter 2 |
| `parameter_3` | Decimal | Par 3: Parameter 3 |
| `parameter_4` | Decimal | Par 4: Parameter 4 |
| `parameter_5` | Decimal | Par 5: Parameter 5 |
| `parameter_6` | Decimal | Par 6: Parameter 6 |
| `article_custom_field_set_id` | Int32 | Volgnummer |
| `article_id` | String | Artikelcode |
| `reservation_article_id` | String | Artikel (torm.part_code, msrt.part_code) |
| `creditor_id` | Int32 | Crediteurnummer |
| `is_reserved` | Boolean | Gereserveerd. 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, retour). 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. What has been accounted for so far in the post-calculation, by issues and purchase receipts. |
| `price` | Decimal | Prijs per stuk. 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)
- `PostCalculationMaterials` → [PostCalculationMaterials](https://docs.fledge.nl/en/api/reference/PostCalculationMaterials.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 PreCalculationMaterials/augment` — returns PreCalculationMaterial
- `POST PreCalculationMaterials(administration_id=1,pre_calculation_material_id={pre_calculation_material_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 PreCalculationMaterial

---

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