> For the complete documentation index, see [llms.txt](https://docs.sandbox.com.vn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sandbox.com.vn/7.-khach-hang/7.1-danh-sach-khach-hang/7.1.1-danh-sach-khach/cong-no.md).

# Công nợ

1. Ở thanh menu chọ&#x6E;**. Khách hàng -> Danh sách khách hàng:**

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

1. Chọn khách hàng bất kì có nợ hóa đơn (3), tại tab "Công nợ" (4) hiển thị danh sách các hóa đơn nợ và các phiếu đã trả thành công của khách.
2. Nhấn "Tạo thu nợ" (5) để mở ra popup tạo phiếu trả nợ:

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

* Tổng nợ: hiển thị tổng các hóa đơn nợ của khách.
* Phương thức: khách hàng có thể chọn trả tiền nợ bằng tiền mặt, chuyển khoản, quẹt thẻ hoặc khác.
* Anh/chị nhập số tiền khách trả vào ô văn bản bên cạnh phương thức trả nợ.
* Hóa đơn nợ: anh/chị có thể chọn 1 hóa đơn nợ để trả.
* Ngày thu: nhập vào ngày tạo hóa đơn trả nợ.
* Mã phiếu thu: mã của phiếu thu nợ.
* Ghi chú: nhập ghi chú hóa đơn.

Sau khi nhập đủ thông tin, nhấn vào nút "**Lưu**" để lưu dữ liệu tạo phiếu trả nợ vừa thêm.

{% hint style="info" %}

* **Không thể trả số tiền lớn hơn tổng nợ.**
* **Nếu có nhiều hóa đơn nợ. Có thể trả số tiền lớn hơn số tiền nợ của 1 hóa đơn nợ. Khi đó hóa đơn được chọn sẽ được ưu tiên trả hết nợ và sẽ sinh ra 1 bản ghi trả nợ cho hóa đơn thứ 2.**
  {% endhint %}


---

# 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://docs.sandbox.com.vn/7.-khach-hang/7.1-danh-sach-khach-hang/7.1.1-danh-sach-khach/cong-no.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.
