correct_stock
Set a product's stock to the amount actually counted on the shelf, correcting drift from unrecorded usage or duplicate entries. Adjusts inventory up or down to match reality.
Instructions
Set stock to the amount actually counted on the shelf.
This is the "I looked, and there are three" fix, for when the tracked amount has drifted from reality — someone used something without recording it, or a purchase was entered twice. It books the difference either way, so it can correct upward as well as down. To record ordinary use, prefer consume_product; to record a purchase, prefer add_stock.
Args: product: Product name, description fragment, or barcode. actual_amount: The amount really there, in the product's stock unit. Zero is allowed and clears the product's stock. best_before_date: YYYY-MM-DD. Required when correcting upward, since the extra stock is a new entry and needs a date. location_id: Where the corrected stock is, if not the usual spot.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| product | Yes | ||
| location_id | No | ||
| actual_amount | Yes | ||
| best_before_date | No |