create_voucher
Create TallyPrime accounting vouchers, item invoices, and stock journals from ledger and inventory entries; pass GST ledger lines explicitly and use dry_run to preview XML without writing data.
Instructions
Create a voucher in Tally (Payment, Receipt, Journal, Contra, Sales, Purchase, Credit/Debit Note, Stock Journal or any custom type). Accounting vouchers: give ledger_entries only (Debits must equal Credits). Item invoices: give inventory_entries (stock items, each posting to a sales/purchase ledger) plus ledger_entries for the party and any tax / round-off ledgers; items count as Cr when going out (sales) and Dr when coming in (purchase). Stock Journal (godown transfer, manufacturing, adjustment): give stock_out (source/consumption) and/or stock_in (destination/production). GST is not computed automatically: pass CGST/SGST/IGST ledger lines with amounts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Voucher date (YYYY-MM-DD) | |
| company | No | Company name as shown in Tally. Omit to use the currently active company. | |
| dry_run | No | If true, only return the XML that would be sent; nothing is written to Tally and no backup is taken. | |
| stock_in | No | Stock Journal: destination / production lines | |
| extra_xml | No | Advanced: raw Tally XML tags appended inside <VOUCHER> | |
| narration | No | ||
| reference | No | Supplier invoice no. / reference | |
| stock_out | No | Stock Journal: source / consumption lines | |
| is_optional | No | Create as an optional (memo) voucher | |
| party_ledger | No | Party ledger (also marks that ledger entry as party) | |
| voucher_type | Yes | Exact voucher type name (see list_voucher_types) | |
| ledger_entries | No | Accounting lines | |
| reference_date | No | ||
| voucher_number | No | Required for manually numbered voucher types; ignored by auto-numbered ones | |
| inventory_entries | No | Stock item lines (makes it an item invoice) |