tally_create_purchase_voucher.
Authentication and enablement
Requires a workspace Tally integration pointing at the TallyPrime HTTP-XML gateway.base_url, company, and the optional reverse-proxy basic-auth credentials are injected from the integration record. Enable the tool and bind the integration.
Inputs
from_date(required):YYYY-MM-DD.to_date(required):YYYY-MM-DD. Must not be earlier thanfrom_date.party_ledger_name(optional): exact vendor ledger name; matched case-insensitively.order_number(optional): substring matched against both the voucher number and the reference.
Output
{from_date, to_date, total_orders, orders[], warning, retrieved_at}.
Each entry in orders[] carries date, voucher_number, reference, party_ledger_name, order_total, narration, guid, master_id, and lines[]. Each line carries stock_item_name, quantity, quantity_text, rate, amount, ledger_name, order_number, and due_date.
quantity_text and rate are Tally’s own strings (10 Nos, 1500.00/Nos); the unit is not parsed back out of them. Amounts and quantities are reported as positive magnitudes.
Limits and side effects
- Read-only against Tally.
- The result does not indicate whether an order is still open or already fulfilled. Tally computes pending order quantities in its order-outstanding reports, which this tool does not read. Compare an invoice against the order’s lines and total instead.
- Voucher type and date range are filtered inside Tally; party and order number are filtered afterwards, because Tally TDL string formulae are the least reliable part of the protocol.
- When the exported voucher header carries no amount — which happens for inventory vouchers on some Tally builds —
order_totalfalls back to the sum of the line amounts rather than reporting zero. - A date range longer than one year returns a warning; large exports can be slow on the gateway.
- An empty result is a successful response, not an error.
Expected errors
- Missing Tally credentials.
- Validation: unparseable date, or
from_dateafterto_date. - Gateway unreachable or an HTTP error from the Tally gateway.
- Unparseable response from Tally.