create_job_work_in_order
Create a Job Work In Order in TallyPrime when acting as a job worker, booking an order to convert customer-supplied raw materials into finished items for delivery back.
Instructions
Create a Job Work In Order in TallyPrime — used when this company is the job worker, booking an order to process raw materials a customer will supply, into a finished item the company will deliver back. Each item line is the finished item expected to be delivered eventually, plus a nested list of components — the raw materials the customer is expected to supply for that item. Reverse-engineered from a real manually-created Job Work In Order's own export (same technique used for Sales Order): the component list lives nested two levels deep, inside each item's own order allocation (VOUCHERCOMPONENTLIST.LIST inside BATCHALLOCATIONS.LIST inside ALLINVENTORYENTRIES.LIST), each component carrying its own nested BATCHALLOCATIONS.LIST with a PARENTITEM back-reference to the item it belongs to. Confirmed live: this structure creates cleanly (no VAT/tax lines, no per-item ledger allocation — just the one balancing party ledger entry for the total). Same voucher-type-active prerequisite as other Order-class vouchers, and orderNumber + each item's dueDate are REQUIRED (same reasoning as create_sales_order). Distinct from create_job_work_out_order, which is for the opposite direction (sending materials out to a job worker).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Order date in DD-MM-YYYY format | |
| items | Yes | One entry per finished item this company will deliver back to the customer. | |
| narration | No | Narration / description | |
| orderNumber | Yes | REQUIRED — the order reference shown as 'Order no.' in Tally's UI. Independent of voucherNumber. | |
| partyLedger | Yes | Customer ledger name (the principal who is giving this job work order) | |
| voucherNumber | No | Explicit voucher number. Normally omit and let Tally auto-number — but some Tally configurations stop auto-numbering certain voucher types via the XML gateway (confirmed live for item-invoice types; unconfirmed either way for Job Work In Order). If creation fails with a blank EXCEPTIONS:1, check get_vouchers for the highest existing number of this voucher type and retry with voucherNumber set to the next one. Distinct from orderNumber. |