update_debit_note
Update an existing TallyPrime debit note by replacing its item lines, party, and narration. Matched by date and voucher number, it alters only the intended voucher and avoids collisions.
Instructions
Update an existing item-invoice Debit Note in TallyPrime, replacing its item lines, party, and narration. Same fields as create_debit_note, plus voucherNumber. 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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Existing debit note's date in DD-MM-YYYY format | |
| items | Yes | One entry per returned line — replaces all existing lines. | |
| billName | No | Bill reference to settle against, e.g. the original bill's name. Defaults to 'Agst Ref' billType. | |
| billType | No | Defaults to 'Agst Ref' — settling against the original purchase's bill, unlike create_purchase_invoice's 'New Ref' default. | |
| buyerTrn | No | YOUR OWN company's TRN on this debit note. | |
| narration | No | Narration / description | |
| reference | No | Free-text reference for this debit note. | |
| vatLedger | No | Default VAT ledger for items without their own override. | |
| buyerState | No | YOUR OWN company's Emirate/state on this debit note's Party Details. | |
| partyLedger | Yes | Supplier ledger name (the party being debited) | |
| supplierTrn | No | The supplier's (party's) TRN on this debit note. Distinct from buyerTrn — same asymmetry as create_debit_note. | |
| buyerCountry | No | YOUR OWN company's country on this debit note's Party Details. | |
| referenceDate | No | Date for the reference above, in DD-MM-YYYY format. | |
| voucherNumber | Yes | Exact voucher number of the debit note to update | |
| vatRatePercent | No | Default VAT rate. Required if vatLedger is set. | |
| placeOfSupplyCountry | No | UAE VAT Place of Supply Country for this debit note. | |
| placeOfSupplyEmirate | No | UAE VAT Place of Supply Emirate for this debit note. |