create_voucher_type
Define or modify a voucher type in TallyPrime, setting its parent, abbreviation, numbering method, and duplicate prevention.
Instructions
Create a new custom Voucher Type in TallyPrime (e.g. 'Bank Payment' as a sub-type of 'Payment', with its own numbering series/abbreviation) — or rename/reconfigure an existing one by passing oldName. Base types to derive from: 'Payment', 'Receipt', 'Journal', 'Contra', 'Sales', 'Purchase', 'Credit Note', 'Debit Note', 'Stock Journal', 'Physical Stock', etc. — must be an exact existing voucher type name (check get_voucher_types first). Setting numberingMethod explicitly is useful given the confirmed-live issue where some Tally configurations stop auto-numbering item-invoice-mode voucher types via the XML gateway unless a voucherNumber is supplied on every create call — see create_sales_invoice's voucherNumber note. Confirmed live separately: a brand-new custom voucher type created WITHOUT numberingMethod set can accept vouchers with a completely blank voucher number (not even '1') — pass numberingMethod: 'Automatic' explicitly to avoid ending up with unreferenceable vouchers you can only look up/delete by date.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the voucher type (the new name, if renaming) | |
| parent | Yes | Base voucher type this derives from, e.g. 'Payment', 'Sales', 'Journal'. Must already exist (see get_voucher_types). | |
| oldName | No | Existing voucher type's current name — pass this to rename/reconfigure instead of creating a new one. | |
| extraFields | No | Escape hatch for any other native Tally VOUCHERTYPE field by exact XML tag name — not validated. | |
| abbreviation | No | Short code shown for this voucher type in reports, e.g. 'Bank Pymt'. | |
| numberingMethod | No | 'Automatic', 'Manual', 'Automatic (Manual Override)', or 'Multi User Auto'. Controls whether Tally auto-assigns voucher numbers on create, and whether an explicit voucherNumber is accepted/required. | |
| preventDuplicates | No | Reject a new voucher if its number duplicates an existing one of this type. | |
| useAsManufacturingJournal | No | Flag this voucher type as a Manufacturing Journal (only meaningful with parent 'Stock Journal'). Same underlying voucher XML as a plain Stock Journal — this only changes how Tally labels/reports it. Pass this voucher type's name as 'voucherType' to create_stock_journal/update_stock_journal to post against it instead of the generic 'Stock Journal' type. |