> For the complete documentation index, see [llms.txt](https://help.safebooks.vn/safebooks/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.safebooks.vn/safebooks/quan-ly-hoa-don/hoa-don-ban-ra/lay-hoa-don.md).

# Lấy hóa đơn

* Lấy và đọc toàn bộ hoá đơn đầu vào của doanh nghiệp, giúp tự động hóa quy trình nhập liệu và giảm thiểu sai sót do nhập liệu thủ công.
* Chuyển đổi các thông tin của hoá đơn đầu vào dưới định dạng XML và hiển thị lên màn hình nhập liệu.
* Hiển thị mẫu in của hoá đơn điện tử.

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

Chương trình tự động lấy hóa đơn từ hộp Mail ( hoặc từ Tổng cục thuế ) về tại màn hình Bán ra.

Các hóa đơn được lấy về cập nhật sẽ có trạng thái **Chờ duyệt.**

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

Trường hợp chương trình chưa kịp cập nhật tự động hoá đơn thì người dùng có thể lấy ngay hoá đơn về bằng cách nhấn **Lấy dữ liệu hoá đơn mới.**

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

<figure><img src="/files/EwDe8LG39KmXpDIgbTZc" 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.safebooks.vn/safebooks/quan-ly-hoa-don/hoa-don-ban-ra/lay-hoa-don.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.
