Set opening cost
inv_set_opening_costWhat one unit was worth when it came in without a cost: stock on hand before these books, or a correction received by hand. Everything after it is derived. Only for stock that came in without a cost. Take the figure from a record the person has: the last supplier invoice, a stock sheet, the accountant's figure. Never estimate it yourself, and never use the selling price. It is the one cost anyone states; every other cost is derived from what was paid on purchase orders. Changing it later re-derives everything after it, so say why. Effects: opening cost stated; average cost, value and cost of goods sold re-derived.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | Yes | Where the figure comes from: "last Bay Gasket invoice, March". | |
| item_id | Yes | The item. An existing item id. | |
| unit_cost | Yes | What one unit was worth. In cents (integer minor units) — 1250 means $12.50. |