_find

Returns rows from the stock_container table showing where elements of a selected stock item are allocated.

Parameters

id

Integer. The ID of the stock item sought.

Example

FM_api('Stock_find',
		[
			'id'=>'5'
		]
	);

Result

On Success

Returns all rows from the stock_container table for that stock_id. Each row contains the following fields:

  • stock_id

  • container_id

  • container_type

  • amt

  • last_edited

  • amt_trigger

Example:

[{"stock_id":"5","container_id":"1","container_type":"3","amt":"1","last_edited":"2016-05-27 15:23:25","amt_trigger":""},{"stock_id":"5","container_id":"4360","container_type":"1","amt":"-4","last_edited":"2017-05-25 16:06:54","amt_trigger":null},{"stock_id":"5","container_id":"5204","container_type":"1","amt":"-1","last_edited":"2017-10-05 09:13:45","amt_trigger":null},{"stock_id":"5","container_id":"5205","container_type":"1","amt":"-3","last_edited":"2017-12-22 10:58:40","amt_trigger":null}]

On Failure

If no stock id provided:

{"error":"no stock id provided"}


	

Last updated