update_stock_journal
Update an existing Stock Journal voucher in TallyPrime by date and voucher number, replacing its source/destination stock lines, costs, and narration.
Instructions
Update an existing Stock Journal voucher in TallyPrime, replacing its source/destination lines and narration. Same fields as create_stock_journal, plus voucherNumber. Matched by date + voucher number — use get_ledger_vouchers or get_vouchers first to confirm it exists and is unique. Refuses if another voucher type shares the same number on that date (confirmed live: Tally's Alter lookup ignores voucher type and can silently corrupt the wrong one) — resolve the collision in Tally first if that happens.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Existing voucher's date in DD-MM-YYYY format | |
| sources | Yes | One or more stock items being consumed/issued. | |
| narration | No | Narration / description for the voucher | |
| voucherType | No | Voucher type of the existing voucher. Defaults to 'Stock Journal' — must match the type it was originally created with (e.g. a custom Manufacturing Journal type), or the lookup will not find it. | |
| destinations | Yes | One or more stock items being produced/received. | |
| voucherNumber | Yes | Exact voucher number of the stock journal to update | |
| additionalCosts | No | Optional additional costs (labour, freight, overhead, etc) incurred in production, posted through an expense ledger and folded into the value of the destination item(s) rather than left as a separate P&L line. |