Delete Stock items by their creation date.



The date that all stock items were created on, in the form of yyyy-mm-dd.


FM_api('Stock_deletebyIDs', ['date'=>'2018-10-12']);


On Success

The amount of stock that was deleted. For example:


On Failure

If the user is not logged in:

{'error':'not logged in'}

If the user is not the main account user:

{'error':'only the main account user can delete by date'}

If the date is not given or is in the wrong format:

{'error':'no date given'}

If there are no stocks create on the given date:

{'error':'no stock in the database was created on that date'}

Last updated