update_sales_order
Replace lines, party, order number, and narration on an existing TallyPrime sales order. Locates the voucher by date and exact voucher number to avoid editing the wrong entry.
Instructions
Update an existing Sales Order in TallyPrime, replacing its item lines, party, order number, and narration. Same fields as create_sales_order (orderNumber and each item's dueDate still REQUIRED), plus voucherNumber to locate the existing voucher. 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. Note voucherNumber here is the existing voucher's own number to match by — Tally may still not let you change it, since Order-class vouchers use 'Auto Retain' numbering (see create_sales_order).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Existing order's date in DD-MM-YYYY format | |
| items | Yes | One entry per line — replaces all existing lines. | |
| narration | No | Narration / description | |
| orderNumber | Yes | REQUIRED — the order reference shown as 'Order no.' in Tally's UI. | |
| partyLedger | Yes | Customer ledger name | |
| voucherNumber | Yes | Exact voucher number of the sales order to update |