> For the complete documentation index, see [llms.txt](https://help.arito.vn/tai-chinh-ke-toan/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.arito.vn/tai-chinh-ke-toan/ban-hang/ban-hang-theo-don-dat-hang/lap-hoa-don-tu-don-hang-ban.md).

# Lập hóa đơn từ đơn hàng bán

Khi bán hàng theo đơn đặt hàng, thì khi xuất hóa đơn người dùng sẽ kế thừa từ đơn đặt hàng.

## Các bước thực hiện

**Bước 1:** Lập hóa đơn bán hàng hoá theo đường dẫn: ***Bán hàng/ Nhập liệu/ Hóa đơn bán ra/ Hóa đơn bán hàng hoá.*** Chọn nút **Thêm** trên thanh công cụ để thêm mới phiếu.

**Bước 2:** Nhập mã khách hàng và chọn nút kế thừa **Đơn hàng.**

<figure><img src="/files/eMwJKLqcSybcJC7qcktr" alt=""><figcaption><p>Chọn nút kế thừa trên hóa đơn bán hàng</p></figcaption></figure>

**Bước 3:** Nhập ngày lọc đơn hàng và nhấn nút tìm kiếm ở trường Số chứng từ.

**Bước 4:** Tick chọn đơn hàng cần lấy dữ liệu và nhấn **Đồng ý**.

<figure><img src="/files/YpUNrzoE2ZhJGzJZXH9A" alt=""><figcaption><p>Chọn đơn hàng cần kế thừa</p></figcaption></figure>

**Các thông tin cần chú ý:**

* Ngày lọc đơn hàng là ngày chứng từ của đơn hàng.
* Nút tick ở dòng tên cột là nút tick chọn tất cả chứng từ.

**Bước 5:** Chọn các dòng vật tư muốn kế thừa và nhấn **Đồng ý**.

<figure><img src="/files/S4AkqFr21Rjcqr81o3Bn" alt=""><figcaption></figcaption></figure>

**Các thông tin cần lưu ý:**

* Có 2 loại Xử lý:
  * **Thêm vào chi tiết**: Giữ nguyên các dòng đã nhập và thêm các dòng vật tư kế thừa xuống phía dưới.
  * **Xóa hết chi tiết và thêm mới**: Xóa hết các dòng đã nhập và thêm các dòng vật tư kế thừa.
* Số lượng lấy: là số lượng lấy lên đơn hàng, có thể nhập lại số này.&#x20;
* Số lượng còn lại = Số lượng - Số lượng đã lấy trước đó.&#x20;
* Nếu không kế thừa hết số lượng trên đơn hàng thì đơn hàng này sẽ chuyển trạng thái đang thực hiện và có thể kế thừa tiếp số lượng còn lại bằng hóa đơn khác.

**Bước 6:** Nhập các thông tin khác trên hóa đơn và nhấn **Lưu.**

<figure><img src="/files/E2ulqOw29OLAfptBaXoz" alt=""><figcaption></figcaption></figure>


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.arito.vn/tai-chinh-ke-toan/ban-hang/ban-hang-theo-don-dat-hang/lap-hoa-don-tu-don-hang-ban.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
