> For the complete documentation index, see [llms.txt](https://docs.fieldmotion.com/fieldmotion-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fieldmotion.com/fieldmotion-api-docs/requisitionorderentry/_save.md).

# \_save

Sets the variables in a Requisition Order Entry

### Parameters

#### ro\_id

The ID of the Requisition Order with this Entry.

#### id

The ID of the Entry.

#### stock\_type

The type of Entry:\
0 => Empty\
1 => Stock\
2 => Free Text

#### supplier\_id

The ID of a Supplier which can be selected for the Entry.

#### stock\_id

The ID of the Stock selected in the Entry.

#### stock\_text

Used as a string variable for the description of the Entry if "stock\_type" is 2, or otherwise as the name of the Stock selected for the Entry.

#### qty

The quantity of Stock units in the Entry.

#### cost

The cost of one Stock unit in the Entry.

#### nominal

The Nominal Code for the Entry.

#### taxtype

The Tax Rate selected for the Entry.

#### totalnet

The Net Total for the Entry.

#### totaltax

The Total Tax for the Entry.

### Example

```
FM_api('RequisitionOrderEntry_save',[
    'ro_id'=>'270001',
    'id'=>'150001',
    'stock_type'=>'1',
    'supplier_id'=>'398040',
    'stock_id'=>'487372',
    'stock_text'=>'Office Chair',
    'qty'=> '1',
    'cost'=>'70',
    'nominal'=>'234-a',
    'taxtype'=>'Furniture Tax',
    'totalnet'=>'70',
    'totaltax'=>'5'
  ]
);
```

### Result

#### On Success

```
{"ok":1}
```

#### On Failure

If the "ro\_id" parameter is not set:

```
{"error":"missing or invalid parameter: ro_id"}
```

If the "id" parameter is not set:

```
{"error":"missing or invalid parameter: id"}
```

If the "stock\_type" parameter is not set:

```
{"error":"missing or invalid parameter: stock_type"}
```

If the "supplier\_id" parameter is not set:

```
{"error":"missing or invalid parameter: supplier_id"}
```

If the "stock\_id" parameter is not set:

```
{"error":"missing or invalid parameter: stock_id"}
```

If the "stock\_text" parameter has a trimmed string value with a length higher than 255:

```
{"error":"description too long. max length 255"}
```

If the "qty" parameter is not set:

```
{"error":"missing or invalid parameter: qty"}
```

If the "cost" parameter is not set:

```
{"error":"missing or invalid parameter: cost"}
```

If the "nominal" parameter is not set:

```
{"error":"missing or invalid parameter: nominal"}
```

If the "taxtype" parameter is not set:

```
{"error":"missing or invalid parameter: taxtype"}
```

If the "totalnet" parameter is not set:

```
{"error":"missing or invalid parameter: totalnet"}
```

If the "totaltax" parameter is not set:

```
{"error":"missing or invalid parameter: totaltax"}
```

If the "ro\_id" parameter is set but does not have any integers:

```
{"error":"no ro_id supplied"}
```

If the "id" parameter is set but does not have any integers:

```
{"error":"no entry id supplied"}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fieldmotion.com/fieldmotion-api-docs/requisitionorderentry/_save.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
