tally_delete_voucher
Permanently deletes a TallyPrime voucher that should never have existed, such as a duplicate posting, by previewing the write and requiring confirmation before removal.
Instructions
DELETE a voucher from TallyPrime entirely. Its number becomes a gap in the series.
Prefer tally_cancel_voucher for a posted entry that has to be voided — cancelling keeps the number and the audit trail. Delete is for entries that should never have existed, such as a duplicate posting.
Give the guid and current date from tally_get_vouchers.
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 |
|---|---|---|---|
| guid | Yes | The voucher's guid, as returned by tally_get_vouchers. | |
| 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. | |
| currentDate | Yes | The voucher's date as it is NOW in TallyPrime (from the same read). |