alter_voucher
Modify an existing Tally voucher by master_id, applying only specified changes while preserving unmentioned GST, bank, and address details; replace ledger or stock lines only when totals balance.
Instructions
Modify an existing voucher. Identify it with master_id (preferred). Only the fields given in changes are modified; everything else (GST details, bank details, addresses...) is sent back unchanged. changes.ledger_entries REPLACES all ledger lines (for item invoices: the party/tax lines); changes.inventory_entries REPLACES all item lines; changes.stock_in / stock_out REPLACE the Stock Journal lines. Totals must still balance. An existing single bill reference on a ledger is kept automatically if you omit bill_allocations for it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | With voucher_number: voucher date (YYYY-MM-DD) | |
| guid | No | ||
| changes | Yes | ||
| 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. | |
| master_id | No | Voucher master_id (from list_vouchers / get_voucher). Preferred. | |
| voucher_type | No | ||
| voucher_number | No |