> ## Documentation Index
> Fetch the complete documentation index at: https://agents.nanonets.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Tally Get Purchase Orders

> Reads Purchase Order vouchers from Tally for a date range, with their ordered stock item lines.

Retrieves Purchase Order vouchers from Tally for a date range, optionally filtered by party ledger name and/or order number. Display name **"Tally Get Purchase Orders"**. Off by default.

Use it to confirm an order was issued, or to compare a supplier invoice against what was actually ordered before posting it with `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 than `from_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_total` falls 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_date` after `to_date`.
* Gateway unreachable or an HTTP error from the Tally gateway.
* Unparseable response from Tally.
