> For the complete documentation index, see [llms.txt](https://kb.logicerp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/purchase/push/save-a-purchase-voucher-against-a-purchase-challan.md).

# Save a Purchase Voucher Against a Purchase Challan

Bills goods that came in on a **purchase challan** that is already in Logic ERP. A purchase challan (goods receipt note) brings the goods into stock, but nothing is posted to the supplier's account yet. This endpoint takes the open lines of one challan for the items you list, prices and taxes them, and saves them as a **purchase voucher** posted to the supplier's account. You send the challan's internal number and the items and quantities you are billing; rates and taxes come from Logic ERP, not from your request.

To record a purchase **without** a challan, use [Save a Purchase Voucher](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/purchase/push/save-a-purchase-voucher.md). To create the challan itself, use [Save a Purchase Challan](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/purchase/push/save-a-purchase-challan.md).

### **Endpoint**

| Name          | Detail                                                 |
| ------------- | ------------------------------------------------------ |
| Address       | `https://your-server/api/SavePurchaseAgainstPUChallan` |
| Method        | `POST`                                                 |
| Authorization | Basic Auth                                             |

Also accepted: `https://your-server/api/SavePurchaseAgaintPUChallan` (older spelling – works exactly the same).

The response envelope, branches, dates, queueing and the common messages are explained in [How Every API Call Works](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/how-every-api-call-works.md).

### **Request fields**

The request has the same shape as Save a Purchase Voucher, but this endpoint reads only the fields below. Field names are not case-sensitive. Codes and names are matched as you send them – spaces around them are not trimmed (only `TransporterName` and `CurrencyName` are trimmed).

| Field                                                                                                                     | Type                   | Required                                       | Default                            | Meaning                                                                                                                                                                                                                                                                                                                                   |
| ------------------------------------------------------------------------------------------------------------------------- | ---------------------- | ---------------------------------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Challan_Code`                                                                                                            | number                 | Yes                                            | `0`                                | Logic ERP's internal number of the purchase challan – the `LastSavedCode` you got from Save a Purchase Challan, or `Vouch_Code` in [Get Purchase Challans](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/purchase/pull/get-purchase-challans.md). One challan per request.                |
| `AccountCode`                                                                                                             | text                   | No                                             | the challan's supplier             | The supplier, by the party code shown in Logic ERP (`User_Code` in [Get Party Master](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/masters/pull/get-party-master.md)). The voucher is posted to this account. When sent, it must be the challan's own supplier; another code is refused. |
| `BranchCode`                                                                                                              | number                 | No – but always send it (or `BranchShortName`) | `0`                                | The branch the voucher is saved in (as explained in How Every API Call Works). Send the branch where the challan was saved; a challan of another branch is refused.                                                                                                                                                                       |
| `BranchShortName`                                                                                                         | text                   | No                                             | empty                              | The branch's short name, used only when `BranchCode` is `0`.                                                                                                                                                                                                                                                                              |
| `Bill_No`                                                                                                                 | text                   | No                                             | the challan's supplier bill number | The supplier's bill (invoice) number.                                                                                                                                                                                                                                                                                                     |
| `Bill_Date`                                                                                                               | date                   | No                                             | `InvoiceDate`, else today          | The supplier's bill date, `yyyy-MM-dd`.                                                                                                                                                                                                                                                                                                   |
| `PartyBillDate`                                                                                                           | date                   | No                                             | `InvoiceDate`, else today          | The party bill date, `yyyy-MM-dd`.                                                                                                                                                                                                                                                                                                        |
| `InvoiceDate`                                                                                                             | date                   | No                                             | today                              | The voucher date, `yyyy-MM-dd`. Also the default for `Bill_Date` and `PartyBillDate`. It must fall in the current financial year.                                                                                                                                                                                                         |
| `GRN_Prefix`                                                                                                              | text                   | No                                             | `GRN`                              | Prefix of the goods receipt (GRN) number given to the voucher. The voucher gets the next GRN number for that prefix.                                                                                                                                                                                                                      |
| `LstItems`                                                                                                                | list                   | Yes                                            | empty list                         | The items and quantities to bill from the challan – see below. `ListItems` is accepted as another name for the same list.                                                                                                                                                                                                                 |
| `PU_Remarks_1`, `PU_Remarks_2`, `PU_Remarks_3`                                                                            | text                   | No                                             | the challan's remarks              | Remarks 1, 2 and 3 of the voucher. Replace the challan's remarks when sent (not empty).                                                                                                                                                                                                                                                   |
| `OrderNo`                                                                                                                 | text                   | No                                             | the challan's order number         | Order number. Replaces the challan's value when sent (not empty).                                                                                                                                                                                                                                                                         |
| `GR_Number`                                                                                                               | text                   | No                                             | the challan's GR number            | Transport GR (lorry receipt) number. Replaces the challan's value when sent (not empty).                                                                                                                                                                                                                                                  |
| `GRDate`, `OrderDate`, `ChallanNo`, `ChallanDate`                                                                         | date, date, text, date | No                                             | the challan's values               | Replace the challan's values when sent. Dates `yyyy-MM-dd`; a date that cannot be read is ignored.                                                                                                                                                                                                                                        |
| `PVTMark`, `Insurance_Policy_No`, `Declaration_No`, `Cases`, `TransportMode`, `DeliveryAdd1`, `DeliveryAdd2`, `VehicleNo` | text                   | No                                             | the challan's values               | Replace the challan's values when sent (not empty).                                                                                                                                                                                                                                                                                       |
| `DeliveryAt`                                                                                                              | text                   | No                                             | empty                              | The delivery-at place. The challan's value is not carried over.                                                                                                                                                                                                                                                                           |
| `AgentName`                                                                                                               | text                   | No                                             | none                               | An agent / broker, by name exactly as in Logic ERP. Must exist.                                                                                                                                                                                                                                                                           |
| `CostCenter`                                                                                                              | text                   | No                                             | none                               | A cost centre, by name exactly as in Logic ERP.                                                                                                                                                                                                                                                                                           |
| `TransporterName`                                                                                                         | text                   | No                                             | the challan's transporter          | A transporter, by name as in Logic ERP.                                                                                                                                                                                                                                                                                                   |
| `CurrencyName`, `ExchangeRate`                                                                                            | text, number           | No                                             | none, `1`                          | A currency by name, and its exchange rate (used only when above `0`). The challan's currency and exchange rate are not carried over.                                                                                                                                                                                                      |
| `CD_P`, `TD_P`, `SP_CD`, `Freight`, `Adjustment_Rs`, `SpDiscountRs`, `SchemeRs`, `AdjustUnit`, `CreditDays`               | number                 | No                                             | the challan's values               | Document-level discounts, charges (`SchemeRs` is the scheme amount) and credit days. Only values above `0` are used; they replace the challan's value.                                                                                                                                                                                    |
| `DisplayError`                                                                                                            | text                   | No                                             | `"0"`                              | `"1"` = when the request fails, `Message` holds the full technical detail. Use only while testing.                                                                                                                                                                                                                                        |

**`LstItems` – one entry per item and lot to bill**

| Field                     | Type   | Required         | Default   | Meaning                                                                                                                                                                                            |
| ------------------------- | ------ | ---------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `LogicUser_Code`          | text   | One of the two   | empty     | The item code shown in Logic ERP (`UserCode` in [Get Item Master](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/masters/pull/get-item-master.md)). |
| `AddlItemCode`            | text   | One of the two   | empty     | The additional item code / barcode (`AddlItemCode` in Get Item Master). Used only when `LogicUser_Code` is empty.                                                                                  |
| `ScannedQty`              | number | Yes              | `0`       | Quantity to bill. Must be above `0`.                                                                                                                                                               |
| `LotNo`                   | text   | Yes, in practice | empty     | The lot number **exactly as on the challan line** – same capitals, no extra spaces. Without it the line does not match the challan and the request is refused.                                     |
| `Org_Production_Unit`     | text   | No               | empty     | The lot's production unit. Used to match the challan line only when your API site has **Filter Lots On Basis Of Production Unit for Purchase Return** ticked.                                      |
| `Lot_Bill_No`             | text   | No               | empty     | Used only together with the next three fields: they are applied to a challan line only when `LotNo`, `Org_Production_Unit` and `Lot_Bill_No` all equal the lot's values.                           |
| `Expiry_Date`, `MFG_Date` | date   | No               | the lot's | Expiry and manufacturing date for the line (see `Lot_Bill_No`).                                                                                                                                    |
| `Production_Unit`         | text   | No               | the lot's | Production unit for the line (see `Lot_Bill_No`). When the line matches as described there, the value you send is used even when it is empty.                                                      |

**Ignored fields.** `SupplierCode` (checked to exist when sent, then not used), `Godown_Name` (not used – the lines keep the challan's godowns – but a name that does not exist still stops the request; leave it empty), `GR_Date`, `GPN_No`, `GPN_Date`, `Weight`, `Series_Code`, `DNO_Code`, `PO_Code`, `EntrySource`, and in `LstItems`: `BasicRate`, `PurRate`, `SaleRate`, `Lot_Mrp`, `SP_Rate_1` to `SP_Rate_5`, `ItemDescription`, `LotCode`, `Godown_Code`. Leave `Doc_Type` out (it defaults to `PU`; any value other than `PU` or `PR` stops the reverse-charge setting being taken from the tax region).

### **Rules Logic ERP applies**

* **What is billed.** The open (unbilled) lines of the challan in `Challan_Code` whose item and lot are in `LstItems`. Entries for the same item and lot are added together, and the total is billed from the matching challan lines in turn, never more than you sent. A total above the open quantity of the item and lot is refused with `Requested quantity is more than the quantity pending in Purchase Challan.`, and an item and lot with no open line on the challan is refused with `Item/Lot not pending in Purchase Challan.` Lines of items or lots you did not list stay open.
* **Billing in parts.** The billed quantity is taken off the challan line's open quantity, so the rest can be billed later with another request. If the purchase series is set to bill only challan goods that have already been sold, unsold quantity is left out.
* **Matching lines.** A challan line matches a `LstItems` entry by item and `LotNo` (and production unit, when that API setting is ticked). The lot number must match exactly, including capitals.
* **Supplier, branch and challan are checked.** `Challan_Code` must be a purchase challan (not a challan return) of the branch you send. `AccountCode`, when sent, must be the challan's supplier; left out, the challan's supplier is used.
* **Rates.** Your rates are not used. Each line's rate is the lot's basic rate, or the challan line's rate, depending on a setting of the purchase series. Sale rate, MRP and the other rates come from the lot. Rate formulas set on the purchase series are applied, as on Logic ERP's purchase screen.
* **Taxes.** The tax region is the **challan's** tax region (not the supplier's current one). GST and other taxes are worked out item by item for that region and supplier, as on Logic ERP's purchase screen. A challan without a tax region is refused.
* **What comes from the challan.** Supplier bill number, discounts, freight and other charges, credit days, remarks 1, transporter, delivery address and transport details – unless you send a value as listed in the table. The challan's agent, delivery-at place, currency and cost centre are not carried over.
* **Series and number.** The voucher is saved in the purchase series chosen as **Default Configuration** for *Purchase voucher against purchase challan* in your API site's settings. There is no request field for the series. The voucher gets the series' next number.
* **Checks of the series.** The purchase series' own checks apply – for example a mandatory MRP or purchase/sale rate, or refusing a supplier bill number that already exists for the supplier.
* **Date and financial year.** The voucher is dated `InvoiceDate` (today when it is left out) and saved in the current financial year. An `InvoiceDate` outside the current financial year is refused.
* **Approval.** A challan that is waiting for approval is refused.
* **Duplicates.** There is no duplicate check on the request. A billed quantity is no longer open, so a repeat finds less to bill: when the first request billed all the open quantity of the items, the repeat is refused with `No Pending Item Present....`; when it billed only part, the repeat bills again from what is left. Check `Status` before you resend.
* **All or nothing.** The voucher and all its lines are saved together. If anything fails, nothing is saved.
* Your Logic ERP licence must include the API for purchase vouchers against challans.

### **Example request**

```json
{
  "Challan_Code": 1435,
  "AccountCode": "S0412",
  "BranchCode": 2,
  "Bill_No": "INV/26-27/1187",
  "Bill_Date": "2026-10-28",
  "PartyBillDate": "2026-10-28",
  "GRN_Prefix": "",
  "PU_Remarks_2": "Billed against challan GRN-10052",
  "LstItems": [
    { "LogicUser_Code": "SHT1042", "ScannedQty": 12, "LotNo": "L2610A" },
    { "LogicUser_Code": "TRS2210", "ScannedQty": 8, "LotNo": "L2610B" }
  ]
}
```

### **Test it**

Send a request to the Logic ERP **sandbox** (a test company) from this page: open the block below, enter the sandbox user name and password (ask your Logic ERP support team), change the request if you like, and press **Test it**. This really saves in the sandbox, so use test values like the example. The example's challan has already been billed, so sending it unchanged bills nothing more; save a new challan on its page first and put its `LastSavedCode` in `Challan_Code`.

## Save a Purchase Voucher Against a Purchase Challan

> Bills goods that came in on a purchase challan that is already in Logic ERP. A purchase challan (goods receipt note) brings the goods into stock, but nothing is posted to the supplier's account yet. This endpoint takes the open lines of one challan for the items you list, prices and taxes them, and saves them as a purchase voucher posted to the supplier's account. You send the challan's internal number and the items and quantities you are billing; rates and taxes come from Logic ERP, not from your request.

```json
{"openapi":"3.0.3","info":{"title":"Logic ERP API","version":"1.0"},"tags":[{"name":"Purchase - Push"}],"servers":[{"url":"https://demo.logicerp.com/api","description":"Logic ERP sandbox (test company)"}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"The user name and password of your API site."}}},"paths":{"/SavePurchaseAgainstPUChallan":{"post":{"tags":["Purchase - Push"],"operationId":"SavePurchaseAgainstPUChallan","summary":"Save a Purchase Voucher Against a Purchase Challan","description":"Bills goods that came in on a purchase challan that is already in Logic ERP. A purchase challan (goods receipt note) brings the goods into stock, but nothing is posted to the supplier's account yet. This endpoint takes the open lines of one challan for the items you list, prices and taxes them, and saves them as a purchase voucher posted to the supplier's account. You send the challan's internal number and the items and quantities you are billing; rates and taxes come from Logic ERP, not from your request.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"Challan_Code":{"type":"integer","description":"Logic ERP's internal number of the purchase challan – the `LastSavedCode` you got from Save a Purchase Challan, or `Vouch_Code` in Get Purchase Challans. One challan per request."},"AccountCode":{"type":"string","description":"The supplier, by the party code shown in Logic ERP (`User_Code` in Get Party Master). The voucher is posted to this account. When sent, it must be the challan's own supplier; another code is refused."},"BranchCode":{"type":"integer","description":"The branch the voucher is saved in (as explained in How Every API Call Works). Send the branch where the challan was saved; a challan of another branch is refused."},"Bill_No":{"type":"string","description":"The supplier's bill (invoice) number."},"Bill_Date":{"type":"string","description":"The supplier's bill date, `yyyy-MM-dd`."},"PartyBillDate":{"type":"string","description":"The party bill date, `yyyy-MM-dd`."},"OrderNo":{"type":"string","description":"Order number. Replaces the challan's value when sent (not empty)."},"PU_Remarks_2":{"type":"string","description":"Remarks 1, 2 and 3 of the voucher. Replace the challan's remarks when sent (not empty)."},"LstItems":{"type":"array","items":{"type":"object","properties":{"LogicUser_Code":{"type":"string","description":"The item code shown in Logic ERP (`UserCode` in Get Item Master)."},"ScannedQty":{"type":"integer","description":"Quantity to bill. Must be above `0`."},"LotNo":{"type":"string","description":"The lot number exactly as on the challan line – same capitals, no extra spaces. Without it the line does not match the challan and the request is refused."}}},"description":"The items and quantities to bill from the challan – see below. `ListItems` is accepted as another name for the same list."}}}}}},"responses":{"200":{"description":"Always HTTP 200. Check Status and Message.","content":{"application/json":{"schema":{"type":"object","properties":{"LastSavedDocNo":{"type":"string","description":"The voucher's GRN number – prefix, a hyphen and the number with two decimals, for example `GRN-13.00`. Empty (`null`) when not saved."},"Status":{"type":"boolean","description":"`true` when the voucher was saved."},"Message":{"type":"string","description":"Empty when saved; the reason when not saved."},"LastSavedCode":{"type":"integer","description":"Logic ERP's internal number of the new purchase voucher; `0` when not saved."},"request_ID":{"type":"string","description":"The ID of this request – quote it to support."}}}}}},"401":{"description":"No login was sent."}}}}}}
```

### **Response**

| Field            | Type         | Meaning                                                                                                                               |
| ---------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| `Status`         | true / false | `true` when the voucher was saved.                                                                                                    |
| `Message`        | text         | Empty when saved; the reason when not saved.                                                                                          |
| `LastSavedCode`  | number       | Logic ERP's internal number of the new purchase voucher; `0` when not saved.                                                          |
| `LastSavedDocNo` | text         | The voucher's GRN number – prefix, a hyphen and the number with two decimals, for example `GRN-13.00`. Empty (`null`) when not saved. |
| `request_ID`     | text         | The ID of this request – quote it to support.                                                                                         |

### **Example response**

```json
{
  "LastSavedDocNo": "GRN-13.00",
  "Status": true,
  "Message": "",
  "LastSavedCode": 287,
  "request_ID": "3f2a7c1e-9b44-4d8e-a6f0-1c2d3e4f5a6b"
}
```

### **Messages you may see**

Messages from checks made while the voucher is being saved (marked \*) come back with technical text before the reason and technical detail after it – look for the reason in the first line.

| Message                                                                                                                                                                                   | Meaning                                                                                                                                                                                                                             | What to do                                                                                  |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| `Default Configuration Not Defined..`                                                                                                                                                     | No purchase series is chosen for purchase vouchers against purchase challans in your API site's settings.                                                                                                                           | Ask your Logic ERP team to choose the Default Configuration.                                |
| `Account Code Not Defined...` / `Invalid Account User Code...`                                                                                                                            | `AccountCode` is missing or not found.                                                                                                                                                                                              | Send the supplier's party code.                                                             |
| `Invalid Supplier Code Defined...`                                                                                                                                                        | `SupplierCode` was sent but not found.                                                                                                                                                                                              | Leave `SupplierCode` out.                                                                   |
| `Invalid Godown Name […]. Please Check...`                                                                                                                                                | `Godown_Name` does not exist.                                                                                                                                                                                                       | Leave `Godown_Name` empty.                                                                  |
| `Invalid Invoice Date Defined...` / `Invalid Bill Date...` / `Invalid Party Bill Date...`                                                                                                 | A date could not be read.                                                                                                                                                                                                           | Send dates as `yyyy-MM-dd`.                                                                 |
| `Invalid Challan Code...`                                                                                                                                                                 | `Challan_Code` is `0` or missing.                                                                                                                                                                                                   | Send the challan's internal number.                                                         |
| `Invalid Challan Code […]...`                                                                                                                                                             | No challan has that number.                                                                                                                                                                                                         | Check `Challan_Code`.                                                                       |
| `Challan Code […] is not a Purchase Challan...`                                                                                                                                           | The number belongs to another kind of challan, for example a purchase challan return.                                                                                                                                               | Send the internal number of a purchase challan.                                             |
| `Challan Code […] belongs to another branch...`                                                                                                                                           | The challan was saved in another branch than the one you sent.                                                                                                                                                                      | Send the challan's own branch.                                                              |
| `Account Code […] is not the account of Challan Code […]...`                                                                                                                              | `AccountCode` is not the challan's supplier.                                                                                                                                                                                        | Send the challan's supplier, or leave `AccountCode` out.                                    |
| `Logic User Code/Additional Item Code Not Defined for Item No : …`                                                                                                                        | An entry in `LstItems` has neither code.                                                                                                                                                                                            | Send `LogicUser_Code` or `AddlItemCode`.                                                    |
| `Invalid Logic User Code : '…' Defined for Item No : …` / `Invalid Additional Item Code : '…' Defined for Item No : …`                                                                    | The item code is not found.                                                                                                                                                                                                         | Send the code exactly as in Logic ERP.                                                      |
| `Quantity Not Defined For : '…' Item No : …`                                                                                                                                              | `ScannedQty` is `0` or less.                                                                                                                                                                                                        | Send a quantity above `0`.                                                                  |
| `Invoice Date Date not Within Financial Year.Please Check....`                                                                                                                            | `InvoiceDate` (today when left out) is outside the current financial year.                                                                                                                                                          | Send a date in the current financial year.                                                  |
| `Challan No.… is Pending for approval. Cannot Retrieve.`                                                                                                                                  | The challan is waiting for approval.                                                                                                                                                                                                | Approve it in Logic ERP first.                                                              |
| `No Pending Item Present....`                                                                                                                                                             | The challan has no open line for the items you sent – it is billed already, the number is wrong, or the items are not on it.                                                                                                        | Check `Challan_Code` and the items.                                                         |
| `Default Tax Region not Set.Please Check....`                                                                                                                                             | The challan has no tax region.                                                                                                                                                                                                      | Correct the challan in Logic ERP.                                                           |
| `Item/Lot not pending in Purchase Challan. Key : …`                                                                                                                                       | An item and lot you sent has no open line on the challan – or `LotNo` does not match exactly. The key is Logic ERP's internal item number and the lot number.                                                                       | Send the lot numbers exactly as on the challan.                                             |
| `Requested quantity is more than the quantity pending in Purchase Challan. Key : … Short by : …`                                                                                          | The quantity sent for an item and lot is more than the challan still has open; `Short by` is the excess.                                                                                                                            | Send at most the open quantity.                                                             |
| `No Item Present Purchase Challan.`                                                                                                                                                       | None of the challan's lines could be billed.                                                                                                                                                                                        | Check the challan in Logic ERP.                                                             |
| `Invalid Agent […] .Please Check`, `Unable to found Cost Center […] .Please Check`, `Transporter Name [ … ] not found. Please Check...`, `Currency Name [ … ] not found. Please Check...` | A name was not found.                                                                                                                                                                                                               | Send it exactly as in Logic ERP.                                                            |
| `M.R.P. Entry is mandatory......Row No: …` \*                                                                                                                                             | The purchase series needs an MRP and the lot has none.                                                                                                                                                                              | Correct the lot or the series in Logic ERP.                                                 |
| `Purchase Rate entry is mandatory.... Row No:…` / `Sale Rate entry is mandatory.... Row No:…` \*                                                                                          | The purchase series needs a rate and the line has none.                                                                                                                                                                             | Correct the lot's rates in Logic ERP.                                                       |
| `Unable to identify taxes of Item at Row No.:…` \*                                                                                                                                        | No tax could be found for an item in the challan's tax region.                                                                                                                                                                      | Check the item's tax set-up in Logic ERP.                                                   |
| `Bill No:… already exists for this supplier... Cannot Continue.` \*                                                                                                                       | The series refuses a supplier bill number that is already used for this supplier.                                                                                                                                                   | Send the correct `Bill_No`.                                                                 |
| `Error while saving voucher` \*                                                                                                                                                           | Saving was stopped inside Logic ERP; nothing was saved. One known cause: the supplier bill number already exists for this supplier and the purchase series is set to ask before accepting it – the API cannot answer that question. | Check `Bill_No`; otherwise retry once and, if it repeats, send the `request_ID` to support. |
| Another technical error \*                                                                                                                                                                | Saving failed inside Logic ERP; nothing was saved.                                                                                                                                                                                  | Retry once; if it repeats, send the `request_ID` to support.                                |
| `Voucher not saved. The challan may be pending approval, or the item-wise amounts could not be calculated.`                                                                               | Saving stopped without a reason. Nothing was saved.                                                                                                                                                                                 | Check the challan in Logic ERP; send the `request_ID` to support.                           |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/purchase/push/save-a-purchase-voucher-against-a-purchase-challan.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
