> 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/user-access/logic-global-admin/purchase/auto-assign-stock-at-the-time-of-do-generation.md).

# Auto Assign Stock at the time of DO Generation

**YouTube:** [How to Enable Auto Stock Allocation When Generating Delivery Orders?](https://www.youtube.com/watch?v=fW3ROkksxEY)

## How to Enable Auto Stock Allocation When Generating Delivery Orders?

This tutorial explains how to enable and use the **Auto Assign Stock** feature during the generation of a Delivery Order (DO).

***

### **Enable the Auto Assign Stock Feature:**

* Launch **Logic Admin**.
* Navigate to **Global Settings**.
* Go to the **Purchase Settings** tab.
* Locate and enable the option labeled: **"Auto Assign Stock at the Time of DO Generation"**.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FC58WGqeT5PoHp9QJVXPO%2FAdmin%20Setup%20-%20Auto%20Assign%20Stock%20at%20the%20time%20of%20DO%20Generation.png?alt=media&amp;token=c839ddb2-5d3b-4ba6-a70c-17a85aacf8c3" alt=""><figcaption></figcaption></figure>

* Click **Save**.
* Restart the software to apply the changes.

***

### **Generate the Delivery Order with Auto Stock Assignment:**

* Open the **Generate Delivery Note** window.
* Select the **Sales Order** from the list for which you want to generate the Delivery Order.
* Click **Generate Order**.
* Select the generated entry.
* You will notice that the **Auto Assigned Stock** option is now enabled.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FLzMtxpsLj8UwwUtJXx5D%2FAuto%20assign%20Stock.png?alt=media&amp;token=8ce67e5b-dd49-4ccd-8448-4824a86d73bf" alt=""><figcaption></figcaption></figure>

* Once the Delivery Order is saved, the stock is automatically assigned—eliminating the need for manual stock assignment and making the order ready for dispatch.

***

### **Verify Assigned Stock:**

* Open the **Assigned Stock to Delivery Order** window.
* Select the relevant **Delivery Order**.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FTLcI36iQ3sNKs03pBRai%2FAssigned%20stock%20to%20delivery.png?alt=media&amp;token=570e0f6c-7d09-4e4d-9b4e-3216c7261fa7" alt=""><figcaption></figcaption></figure>

* You will see that:
  * The stock has already been assigned.
  * The **Lot/Carton Number** has been generated automatically.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FWrfWO8IPWdUMsaJKht4d%2FLOT%20Carton%20assigned.png?alt=media&amp;token=9df2874b-f81a-477d-8f3a-bab0206e7629" alt=""><figcaption></figcaption></figure>

* Click **Save** to proceed with the dispatch process.


---

# 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/user-access/logic-global-admin/purchase/auto-assign-stock-at-the-time-of-do-generation.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.
