> 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/orders/push/save-a-sale-invoice-against-a-delivery-order.md).

# Save a Sale Invoice Against a Delivery Order

Bills a **delivery order** or **packing slip** that is already in Logic ERP. A delivery order (or packing slip) sets aside the goods to be dispatched – items, lots, godowns and quantities – but posts nothing to the customer's account. This endpoint takes the lines of that document that are not billed yet, prices and taxes them, and saves them as a **sale invoice** made out to its customer. You send the document's internal number; you do not send the items.

To bill straight from a sale order, use [Save a Sale Invoice Against a Sale Order](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/orders/push/save-a-sale-invoice-against-a-sale-order.md). To bill goods without an order, use [Save a Sale Invoice](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/sale/push/save-a-sale-invoice.md).

### **Endpoint**

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

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). Delivery orders are made in Logic ERP itself; their stock is assigned there or with [Assign Stock to a Delivery Order](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/orders/push/assign-stock-to-a-delivery-order.md). Packing slips are saved with [Save a Packing Slip Against a Sale Order](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/orders/push/save-a-packing-slip-against-a-sale-order.md) or [Save a Packing Slip Allowing Items Outside the Sale Order](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/orders/push/save-a-packing-slip-allowing-items-outside-the-sale-order.md), or in Logic ERP.

### **Request fields**

The request has the same shape as [Save a Sale Invoice](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/sale/push/save-a-sale-invoice.md), and most header fields mean the same (see that page). This table lists only what is **different**. Field names are not case-sensitive. Names are looked up without regard to capitals; spaces around them are not trimmed (only `Tax_Region` and `TransporterName` are trimmed). Spaces around the item codes (`LogicUserCode` / `AddlItemCode`) are removed before the item is looked up.

| Field                                                                                                                                                                                                                                | Type         | Required                                | Default                             | Meaning                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------ | --------------------------------------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Doc_Code`                                                                                                                                                                                                                           | number       | Yes (or `OrderNo`)                      | `0`                                 | Logic ERP's internal number of the delivery order or packing slip – the `LastSavedCode` you got when it was saved. With neither `Doc_Code` nor `OrderNo`, the request is refused.                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `OrderNo`                                                                                                                                                                                                                            | text         | No                                      | empty                               | With `Doc_Code` `0`: Logic ERP looks for a delivery order of the branch in `BranchCode` (or `BranchShortName`) that still has something to bill and was made from a sale order whose party order number (`Party_Order_No` of Save a Sale Order) equals `OrderNo`. When more than one such delivery order is found, the request is refused – send `Doc_Code`. Packing slips are not found this way. It is also kept on the invoice as its order number. When the duplicate order number check is on for this endpoint, `OrderNo` is required even with `Doc_Code`.                                           |
| `BranchCode`                                                                                                                                                                                                                         | number       | No – ignored once the document is found | `0`                                 | The invoice is always saved in the **document's branch**, with that branch's API settings. Used only for the look-up by `OrderNo`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `Bill_Date`                                                                                                                                                                                                                          | date         | No                                      | today                               | Date of the invoice, `yyyy-MM-dd`; decides the financial year.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `BillSeries`                                                                                                                                                                                                                         | text         | No                                      | see rules                           | A sale series (not a stock transfer series) of the document's branch, by name.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `Bill_Number`, `Ext_Bill_No`                                                                                                                                                                                                         | number, text | No                                      | `0`, empty                          | As on Save a Sale Invoice.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `LstItems`                                                                                                                                                                                                                           | list         | No                                      | empty list                          | Leave it empty to bill every open line. When you send it, the total `Quantity` you list for each item must equal what Logic ERP bills of that item from the document, and every item it bills must be listed – otherwise the request is refused and nothing is saved. When the bill series is set up in Logic ERP to choose items while bringing in a delivery order, only the items you list are billed (in their full open quantity) and the others are left open. Each line you send is also checked (item code, quantity above `0`, lot number exists for the item), and a wrong one stops the request. |
| `BillingAddress`, `ShippingAddress`                                                                                                                                                                                                  | object       | No                                      | none                                | Billing and shipping address of the invoice, as on Save a Sale Invoice.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `GST_State_Code`                                                                                                                                                                                                                     | text         | No                                      | Logic ERP's value                   | Place-of-supply state code. Used whenever sent – no API setting is needed on this endpoint.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `Tax_Region`                                                                                                                                                                                                                         | text         | No                                      | the default of the series and party | The tax region, by name. `"AUTO"` is not supported.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `ActEntryPartyUserCode`                                                                                                                                                                                                              | text         | No                                      | the document's customer             | A different account to post the invoice to in the accounts, by its code.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `AgentName`, `CostCenter`, `Tax_Form_Name`, `TransporterName`, `TransportMode`, `WayBillNo`, `CurrencyName`, `ExchangeRate`, `CreditDays`, `PaymentMode`                                                                             |              | No                                      |                                     | As on Save a Sale Invoice.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `CD_P`, `TD_P`, `SpCD_P`, `Freight`, `SpDiscountRs`, `Adjustment_Rs`, `Handling`, `Ext_NetSale_Value`                                                                                                                                | number       | No                                      | `0`                                 | Invoice-level discounts, charges and the net amount check, as on Save a Sale Invoice.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `Remarks1`–`Remarks3`, `DeliveryAt`, `DeliveryAdd1`, `DeliveryAdd2`, `Cases`, `Weight`, `PVTMark`, `GRNo`, `GRDate`, `Challan_No`, `Challan_Date`, `Insurance_Policy_No`, `Declaration_No`, `DeclarationNo`, `OrderDate`, `Order_Id` |              | No                                      | empty                               | Kept on the invoice, as on Save a Sale Invoice.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `TenderDetails`                                                                                                                                                                                                                      | list         | No                                      | empty list                          | How the bill was paid, as on Save a Sale Invoice. `[]`, `null` or left out = none.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `Godown_Name`                                                                                                                                                                                                                        | text         | No                                      | empty                               | Not used – the lines keep the document's godowns – but a name that does not exist still stops the request. Leave it empty.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `RCU_First_Name`, `RCU_State`                                                                                                                                                                                                        | text         | No                                      | empty                               | Used only in one case: without `RCU_Mobile_No` and `RCU_Email`, when both are the same word, the invoice is linked to the one retail customer with that first name in that state. Otherwise no retail customer is created or looked up.                                                                                                                                                                                                                                                                                                                                                                     |
| `Request_ID`, `DisplayError`                                                                                                                                                                                                         | text         | No                                      | empty, `"0"`                        | As on Save a Sale Invoice.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |

**Ignored fields.** `PartyUserCode` (the invoice is made out to the document's customer), `BranchShortName` once the document is found, `Doc_Type`, `Token_No`, `STBranchCode`, `InvoiceType`, `EntrySource`, `Billing_Address1`, `Billing_Address2`, `Sale_BillNo`, `Sale_Bill_Date` (read but not saved), the other `RCU_…` fields, and in `LstItems` the rate, MRP, discounts, description and godown of each line are accepted but not used (the quantity is only compared, see `LstItems`).

### **Rules Logic ERP applies**

* **What can be billed.** Delivery orders made from a sale order (only the goods whose stock has been assigned to the delivery order), and packing slips (with or without a sale order). The document must be **approved**. Every line with an open quantity is billed – with the document's items, lots, godowns and open quantities; filters set on the bill series in Logic ERP (godowns the series and the API user may use, default companies, party item groups) can leave some lines out. You cannot change the quantities or bill only part of a line.
* **Customer and branch come from the document.** The invoice is made out to the delivery order's customer and saved in its branch; `PartyUserCode` is ignored. A customer locked for billing, or over its credit limit when Logic ERP stops bills over the limit, is refused.
* **Rates and taxes.** Each line gets the rate Logic ERP's sale bill screen takes for the series; when the series is set to take the rate, the discounts or both from the sale order, those of the sale order line behind the delivery order line are used. Invoice-level discounts you send are added on top. Logic ERP applies its schemes, works out GST and other taxes for the tax region, adds TCS when the customer is set up for it and rounds the total, as on the sale bill screen.
* **Stock** was set aside by the delivery order or packing slip; the invoice uses those lots and godowns.
* **After billing** the billed quantities are no longer open on the delivery order or packing slip. A line that has been billed is not billed again, so sending the same `Doc_Code` twice does not bill the lines twice; the second request finds nothing left to bill.
* **Series and number.** The series is, in this order: the sale series your Logic ERP team has linked in the API site setup to the document's prefix, else the `BillSeries` you send, else the series linked to the customer for sale bills, else the API site's default series for this endpoint. A `BillSeries` that is not found for the document's branch is refused. The invoice gets the next number of that series in the year of `Bill_Date` unless you send `Bill_Number`.
* **API site settings.** This endpoint has its own settings (default series, series links, duplicate order number check, saving in the background or later), separate from Save a Sale Invoice, read for the document's branch.
* **Duplicates of `OrderNo`.** If your Logic ERP team switches on "do not allow duplicate order number" for this endpoint, `OrderNo` becomes required and a second invoice with the same `OrderNo` for the same branch and customer in the year is refused.
* **All or nothing.** The invoice and all its lines are saved together. If anything fails, nothing is saved.
* Your Logic ERP team can set the API site to save in the background or keep requests for later processing, as on Save a Sale Invoice. This endpoint always uses the standard save routine (there is no newer routine for it). Do not use an apostrophe (`'`) in codes, names or order numbers.

> **Known issue – a customer marked for stock transfer gets a stock transfer.** If the document's customer is set up in Logic ERP as a stock-transfer party, the document is saved as a stock transfer, not a sale invoice. Check `Invoice_No` and the document in Logic ERP for such customers.

> **Known issue – the request status loses the invoice number.** When your API site saves this endpoint in the background, asking for the result with `TokenStatus` returns only `Status`, `Message`, `LastSavedCode` and `request_ID` – not `Invoice_No`, `Order_No` or `PartyOrderNo`. Read the invoice with Get Sale Invoices using `LastSavedCode`.

* **Switched off.** When your Logic ERP team has switched this endpoint off for the document's branch, nothing is saved and the answer is `"Status": false` with `Request cannot be processed. API Template is marked as In-Active in the configuration.` in `Message`.

### **Example request**

```json
{
  "Doc_Code": 7342,
  "Bill_Date": "2026-10-29",
  "BillSeries": "WSL",
  "Bill_Number": 0,
  "OrderNo": "WEB-100245",
  "TransporterName": "SAFEXPRESS",
  "GRNo": "LR-55821",
  "GRDate": "2026-10-29",
  "Remarks1": "Dispatch against DO-118",
  "LstItems": [],
  "TenderDetails": []
}
```

### **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. The example's test packing slip is already billed, so the example is refused – first save a test packing slip with Save a Packing Slip Against a Sale Order and send its internal number in `Doc_Code`.

## Save a Sale Invoice Against a Delivery Order

> Bills a delivery order or packing slip that is already in Logic ERP. A delivery order (or packing slip) sets aside the goods to be dispatched – items, lots, godowns and quantities – but posts nothing to the customer's account. This endpoint takes the lines of that document that are not billed yet, prices and taxes them, and saves them as a sale invoice made out to its customer. You send the document's internal number; you do not send the items.

```json
{"openapi":"3.0.3","info":{"title":"Logic ERP API","version":"1.0"},"tags":[{"name":"Orders - 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":{"/SaveInvoiceAgainstDO":{"post":{"tags":["Orders - Push"],"operationId":"SaveInvoiceAgainstDO","summary":"Save a Sale Invoice Against a Delivery Order","description":"Bills a delivery order or packing slip that is already in Logic ERP. A delivery order (or packing slip) sets aside the goods to be dispatched – items, lots, godowns and quantities – but posts nothing to the customer's account. This endpoint takes the lines of that document that are not billed yet, prices and taxes them, and saves them as a sale invoice made out to its customer. You send the document's internal number; you do not send the items.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"Doc_Code":{"type":"integer","description":"Logic ERP's internal number of the delivery order or packing slip – the `LastSavedCode` you got when it was saved. With neither `Doc_Code` nor `OrderNo`, the request is refused."},"OrderNo":{"type":"string","description":"With `Doc_Code` `0`: Logic ERP looks for a delivery order of the branch in `BranchCode` (or `BranchShortName`) that still has something to bill and was made from a sale order whose party order number (`Party_Order_No` of Save a Sale Order) equals `OrderNo`. When more than one such delivery order is found, the request is refused – send `Doc_Code`. Packing slips are not found this way. It is also kept on the invoice as its order number. When the duplicate order number check is on for this endpoint, `OrderNo` is required even with `Doc_Code`."},"Bill_Date":{"type":"string","description":"Date of the invoice, `yyyy-MM-dd`; decides the financial year."},"Bill_Number":{"type":"integer","description":"As on Save a Sale Invoice."},"Remarks1":{"type":"string","description":"Kept on the invoice, as on Save a Sale Invoice."},"LstItems":{"type":"array","items":{"type":"object"},"description":"Leave it empty to bill every open line. When you send it, the total `Quantity` you list for each item must equal what Logic ERP bills of that item from the document, and every item it bills must be listed – otherwise the request is refused and nothing is saved. When the bill series is set up in Logic ERP to choose items while bringing in a delivery order, only the items you list are billed (in their full open quantity) and the others are left open. Each line you send is also checked (item code, quantity above `0`, lot number exists for the item), and a wrong one stops the request."},"TenderDetails":{"type":"array","items":{"type":"object"},"description":"How the bill was paid, as on Save a Sale Invoice. `[]`, `null` or left out = none."}}}}}},"responses":{"200":{"description":"Always HTTP 200. Check Status and Message.","content":{"application/json":{"schema":{"type":"object","properties":{"PrintFile":{"type":"string","description":"Always empty."},"Invoice_No":{"type":"string","description":"The invoice number given, or your `Ext_Bill_No`."},"Order_No":{"type":"string","description":"The delivery order's or packing slip's number – its prefix and number, for example `DO-118`. Empty when not saved."},"PartyOrderNo":{"type":"string","description":"The `OrderNo` you sent (also when not saved)."},"Status":{"type":"boolean","description":"`true` when the invoice was saved."},"Message":{"type":"string","description":"Empty when saved, unless your Logic ERP shows the document number after saving. It can then also carry notes from follow-up steps, for example `Export Virtual Txns : Branch/Supplier STI Settings Not Found...`, while `Status` is still `true` – go by `Status` and `LastSavedCode`, not by the text. The reason when not saved."},"LastSavedCode":{"type":"integer","description":"Logic ERP's internal number of the new invoice; `0` when not saved."},"request_ID":{"type":"string","description":"Filled once Logic ERP has started on the request, also when it then fails."}}}}}},"401":{"description":"No login was sent."}}}}}}
```

### **Response**

| Field           | Meaning for this endpoint                                                                                                                                                                                                                                                                                                          |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Status`        | `true` when the invoice was saved.                                                                                                                                                                                                                                                                                                 |
| `Message`       | Empty when saved, unless your Logic ERP shows the document number after saving. It can then also carry notes from follow-up steps, for example `Export Virtual Txns : Branch/Supplier STI Settings Not Found...`, while `Status` is still `true` – go by `Status` and `LastSavedCode`, not by the text. The reason when not saved. |
| `LastSavedCode` | Logic ERP's internal number of the new invoice; `0` when not saved.                                                                                                                                                                                                                                                                |
| `Invoice_No`    | The invoice number given, or your `Ext_Bill_No`.                                                                                                                                                                                                                                                                                   |
| `Order_No`      | The delivery order's or packing slip's number – its prefix and number, for example `DO-118`. Empty when not saved.                                                                                                                                                                                                                 |
| `PartyOrderNo`  | The `OrderNo` you sent (also when not saved).                                                                                                                                                                                                                                                                                      |
| `PrintFile`     | Always empty.                                                                                                                                                                                                                                                                                                                      |
| `request_ID`    | Filled once Logic ERP has started on the request, also when it then fails.                                                                                                                                                                                                                                                         |

### **Example response**

```json
{
  "PrintFile": "",
  "Invoice_No": "WSL-1291",
  "Order_No": "DO-118",
  "PartyOrderNo": "WEB-100245",
  "Status": true,
  "Message": "",
  "LastSavedCode": 48391,
  "request_ID": "a3f09c71-6e2d-4b8a-9d45-7c1e0b2f8d16"
}
```

### **Messages you may see**

All with `Status: false`. With `"DisplayError": "1"`, or when the reason comes from an error inside Logic ERP, the reason may be followed by technical detail – read the first line.

| Message                                                                                                                                                                                                                                                                                                                                                                                                             | Meaning                                                                                                                                 | What to do                                                                        |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| `Unable to Retrieve Delivery Order...`                                                                                                                                                                                                                                                                                                                                                                              | No `Doc_Code`, and `OrderNo` is empty or no open delivery order was found for it in that branch.                                        | Send `Doc_Code`.                                                                  |
| `More than one Delivery Order found for Order No. : … in Branch Code : …..Please send the Delivery Order code (Doc_Code)..`                                                                                                                                                                                                                                                                                         | More than one open delivery order of the branch was made from sale orders with that party order number.                                 | Send `Doc_Code`.                                                                  |
| `No financial year covers the date …` (date as day/month/year)                                                                                                                                                                                                                                                                                                                                                      | `Bill_Date` lies outside every financial year set up in Logic ERP. Nothing was saved.                                                   | Send a date inside a financial year.                                              |
| `Doc_Code (Delivery Order Code) : … not exists..Please Check...`                                                                                                                                                                                                                                                                                                                                                    | No delivery order or packing slip has that internal number.                                                                             | Check `Doc_Code`.                                                                 |
| `Delivery Order Is marked as Un Approved. Cannot allow Bill Creation :…`                                                                                                                                                                                                                                                                                                                                            | The document is not approved yet.                                                                                                       | Approve it in Logic ERP first.                                                    |
| `"Status": false` with `No Items present....`, `No Pending Item Present against Delivery Order..`, another message from Logic ERP, or an empty `Message`                                                                                                                                                                                                                                                            | Nothing is left to bill – the lines are billed already, or none of the items you listed (with item selection on) is open.               | Check the document in Logic ERP.                                                  |
| `Unable to Create Bill for Item Code : … Quantity : … Billing Qty against Delivery Order : …..`                                                                                                                                                                                                                                                                                                                     | The total quantity you listed for that item in `LstItems` differs from what Logic ERP bills of it from the document. Nothing was saved. | List the item's open quantity, or leave `LstItems` empty.                         |
| `Item Code : … (Billing Qty : …) is on the Delivery Order but not in LstItems..`                                                                                                                                                                                                                                                                                                                                    | Logic ERP bills this item from the document, but `LstItems` does not list it. Nothing was saved.                                        | List every billed item, or leave `LstItems` empty.                                |
| `LogicUserCode Or EAN Code Cannot Blank!!`, `Invalid LogicUserCode / EANCode : …`, `Invalid Item Qty : … for Item Code : … EAN Code : …`, `Unable to found LotNo : … againts EAN/Item Code : …`                                                                                                                                                                                                                     | A line in `LstItems` is wrong.                                                                                                          | Leave `LstItems` empty unless you use item selection.                             |
| `Invalid Godown Name […]. Please Check...`                                                                                                                                                                                                                                                                                                                                                                          | `Godown_Name` does not exist.                                                                                                           | Leave `Godown_Name` empty.                                                        |
| `Bill Series : … Not found for Branch Code :… in API Parameter..` / `Default Bill Series Not Set for Branch Code :…`                                                                                                                                                                                                                                                                                                | The `BillSeries` you sent is not a sale series of the document's branch, or no series was found for that branch.                        | Send a sale series of that branch, or ask for a default series for this endpoint. |
| `Cannot allow Bill Saving If Bill Number defined without Bill Series....`, `Bill No. […] against Branch Code : … already exists...Please Check..`                                                                                                                                                                                                                                                                   | As on Save a Sale Invoice.                                                                                                              | Send both or neither; use a free number.                                          |
| `Order No. Cannot be blank....` / `Order No. already exists for same Customer.Please Check`                                                                                                                                                                                                                                                                                                                         | The duplicate order number check is on for this endpoint.                                                                               | Send `OrderNo`, a new one for each invoice.                                       |
| `Sale Bill Locked against Party(Setup New Accounts)` / `The Above Customer has crossed the Credit Limit....Cannot Continue`                                                                                                                                                                                                                                                                                         | The customer is locked for billing or over its credit limit.                                                                            | Ask your Logic ERP team.                                                          |
| `Unable to found Tax Region : …`, `Unable to found A/E Party : …`, `Invalid Agent […] .Please Check`, `Unable to found Cost Center […] .Please Check`, `Invalid Tax Form […] .Please Check`, `Transporter Name [ … ] not found. Please Check...`, `Currency Name : … not found...Please Check...`, `Exchange Rate not Defined for Currency Name :…...Please Check...`, `Card Name [ … ] not found. Please Check...` | A name or code was not found, as on Save a Sale Invoice.                                                                                | Send it exactly as in Logic ERP.                                                  |
| `Way Bill No. :… not found In Branch Code : …` or `Way Bill No. :… is already Finalized..Please Check`                                                                                                                                                                                                                                                                                                              | The way bill does not exist in the branch, or it is already finalized.                                                                  | Send an open way bill of the branch, or leave `WayBillNo` empty.                  |
| `Net Value cannot match with External Net Value...`                                                                                                                                                                                                                                                                                                                                                                 | Logic ERP's net amount differs from `Ext_NetSale_Value`.                                                                                | Check the document's rates; send `0` to skip the check.                           |
| A message from Logic ERP's sale bill checks, for example `Day not open for Addition/Modification.........`                                                                                                                                                                                                                                                                                                          | The bill breaks a rule set up in Logic ERP for sale bills.                                                                              | Correct the request, or ask your Logic ERP team.                                  |
| `Request is pending for processing...`                                                                                                                                                                                                                                                                                                                                                                              | Your API site keeps requests for later processing.                                                                                      | Keep the `request_ID`.                                                            |


---

# 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/orders/push/save-a-sale-invoice-against-a-delivery-order.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.
