tally_delete_ledger
Preview deleting an unused or mistaken TallyPrime ledger before it is removed. Returns a confirmToken and changes nothing until you approve; ledgers with posted vouchers are rejected.
Instructions
Delete a ledger from TallyPrime.
WHEN TO USE: to remove an account created by mistake or no longer used. TallyPrime refuses to delete a ledger that has vouchers posted to it — that refusal is reported as WRITE_REJECTED and nothing is changed.
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 |
|---|---|---|---|
| name | Yes | The ledger to delete, by its exact name. | |
| 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. |