tally_create_stock_journal
Preview a new stock journal in TallyPrime to move stock between godowns, record production, or adjust inventory. Returns a confirm token; no data is written until you confirm.
Instructions
Post a NEW stock journal in TallyPrime: stock that goes OUT (consumed) and stock that comes IN (produced or received), with no ledger lines. Use it to transfer stock between godowns (same item out of one godown, into another), to record production (raw materials out, finished goods in), or to adjust stock.
Each line is a stock item, quantity, rate and godown. The value of each line is quantity × rate. For a sale or purchase of items use tally_create_voucher with items.
WRITES TO TALLYPRIME, in two steps. This call only PREVIEWS: it checks the change against the live books and returns exactly what would be written plus a confirmToken — nothing is changed. Show the preview to the user, and only after they approve it call tally_confirm_write with the token. Never confirm on your own initiative, and never confirm a preview the user has not seen.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Voucher date, ISO YYYY-MM-DD. | |
| company | No | Company name. Omit to use whichever company TallyPrime has loaded. If given and it is not the loaded one, the call fails with TALLY_COMPANY_NOT_LOADED rather than returning another company's data. | |
| consumed | Yes | Stock going OUT. | |
| produced | Yes | Stock coming IN. | |
| narration | No | ||
| voucherType | No | Default "Stock Journal". A custom type must be based on Stock Journal. | |
| voucherNumber | No | Only for types numbered manually. Omit to let TallyPrime number it. |