> For the complete documentation index, see [llms.txt](https://lenef.gitbook.io/erpfactory/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lenef.gitbook.io/erpfactory/quan-ly-mua-hang/quan-ly-don-hang.md).

# Quản lý đơn hàng

Hệ thống ERP cung cấp cho người dùng nhiều cách để có thể tạo được đơn mua hàng với nhà cung cấp như đơn hàng từ yêu cầu báo giá hoặc tạo trực tiếp đơn hàng. Người dùng có thể Xác nhận đơn hàng từ Yêu cầu báo giá, hoặc tạo trực tiếp.

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

Tạo mới đơn hàng tương tự như tạo yêu cầu báo giá:

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

Sau khi tạo xong đơn hàng và xác nhận, 1 phiếu nhập kho sẽ được tạo ra để quản lý việc nhập kho. Người dùng bên quản lý kho sẽ xác nhận để hoàn tất việc nhập kho.

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

**Lên hóa đơn công nợ**: Sau khi đã hoàn thành việc nhập kho, người dùng thực hiện lên hóa đơn công nợ với NCC.

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

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

Kích nút Xác nhận để xác nhận hóa đơn và chuyển trạng thái sang **Đã vào sổ**. Lúc này hệ thống ghi nhận tổng tiền hóa đơn vào công nợ với NCC.

Hóa đơn cũng sẽ được gắn với đơn hàng để người dùng có thể dễ dàng quản lý và kiểm tra. Người dùng có thể tạo nhiều hóa đơn công nợ với NCC phụ thuộc vào tình hình nhập hàng thực tế.

Hệ thống tự động tính toán và hiển thị số lượng sản phẩm đã nhận dựa vào các phiếu nhập kho hoàn thành và số lượng đã có hóa đơn dựa vào các hóa đơn đã được vào sổ.


---

# 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://lenef.gitbook.io/erpfactory/quan-ly-mua-hang/quan-ly-don-hang.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.
