> For the complete documentation index, see [llms.txt](https://docs.docbits.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docbits.com/chinese/guan-li-yu-she-zhi/settings/document-processing/e-documents/validation-rules/validation-error-screen.md).

# 被拒绝电子发票的错误界面

上传有误的电子发票时，DocBits 不会丢弃它。文档的状态会变为 **Error**，错误界面会告诉您问题所在、出现的位置以及接下来该怎么做。本页展示两个示例：格式不正确的 XML 文件，以及违反业务规则的发票。

> 只有在该文档类型已启用验证且验证设为**阻止**时，发票的状态才会变为 **Error**。请参阅[各文档类型的验证](/chinese/guan-li-yu-she-zhi/settings/document-processing/e-documents/validation-rules/validation-per-document-type.md)。

## 示例 1：XML 文件已损坏

供应商发送的 XML 文件中，结束标签与开始标签不匹配。该文件无法读取，因此 DocBits 会在第一个检查 **L1 · 格式正确性**处停止。

<figure><img src="https://1870485400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlPczlNw8zzYNLfjfispX%2Fuploads%2Fgit-blob-c0275bc63367b93085583d5d03542dce5b6c106e%2Feinvoice-error-xml-malformed.png?alt=media" alt="格式不正确的 XML 文件错误界面：左侧显示标出错误行的 XML，右侧显示说明"><figcaption><p>损坏的 XML 文件错误界面。XML 中的错误行已标出。示例文件使用虚构数据。</p></figcaption></figure>

界面分为两部分：

* **左侧：XML 文件。** DocBits 会显示带行号的文件。出现问题的行会标为红色。使用文件上方的按钮复制 XML 或在新标签页中打开。
* **右侧：说明。** **Rejected by** 卡片会显示导致文件处理停止的检查项（此处为 **L1 · 格式正确性**）和规则代码（此处为 `XML-PARSE`）。下方会显示通俗易懂的标题（*XML 格式不正确*）、简短说明和 **Next step** 区块。

选择 **View validation details**，打开完整的[验证报告](/chinese/guan-li-yu-she-zhi/settings/document-processing/e-documents/validation-rules/validation-report.md)。

<figure><img src="https://1870485400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlPczlNw8zzYNLfjfispX%2Fuploads%2Fgit-blob-a9fa04cff576cf0651a474295b56aacaa907cbe1%2Feinvoice-report-xml-malformed.png?alt=media" alt="损坏 XML 文件的验证报告，其中包含发现项 XML-PARSE"><figcaption><p>损坏文件的报告：第 1 级“语法”中有一项错误，并附有技术消息和位置</p></figcaption></figure>

报告会指出准确位置（此处为第 5 行、第 4081 列），并提供 XML 解析器的技术消息。选择 **Show in XML** 可跳转到该行。**How to fix** 提示建议您向发送方索取修正后的文件。

## 示例 2：发票违反业务规则

XML 本身没有问题，但缺少必填字段。例如，没有卖方标识符、注册标识符或 VAT 标识符，因此无法识别卖方（规则 `BR-CO-26`）。

<figure><img src="https://1870485400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlPczlNw8zzYNLfjfispX%2Fuploads%2Fgit-blob-1b21c62dc5fc676b06fbf34311f392365458cb89%2Feinvoice-error-view.png?alt=media" alt="违反业务规则的发票错误界面"><figcaption><p>业务规则错误的错误界面：显示层 **L3 · Business Rules**、规则代码和下一步操作</p></figcaption></figure>

此处的卡片显示层 **L3 · Business Rules** 和代码 `BR-CO-26`。报告会列出该发票的所有发现项，详情请参阅[验证报告](/chinese/guan-li-yu-she-zhi/settings/document-processing/e-documents/validation-rules/validation-report.md)。

## 卡片下方的按钮

| 按钮                     | 功能                          |
| ---------------------- | --------------------------- |
| **Restart Processing** | 重新处理文档，例如在您更改设置后。检查会使用当前设置。 |
| **View DocFlow**       | 显示文档的工作流。                   |
| **Copy Details**       | 复制错误详情，例如用于向管理员发送消息。        |
| **Create ticket**      | 创建包含错误详情的支持工单。              |

在卡片上选择 **Show technical details**，查看原始技术信息。

## 接下来该怎么做

* \*\*错误：\*\*向发送方索取修正后的发票，或[拒绝该文档](/chinese/guan-li-yu-she-zhi/settings/document-processing/e-documents/validation-rules/validation-next-step-and-reject.md)。修正后的发票会作为新文档处理。
* \*\*只有警告：\*\*文档不会被阻止。您可以继续操作。

## 相关页面

* [验证报告](/chinese/guan-li-yu-she-zhi/settings/document-processing/e-documents/validation-rules/validation-report.md)：按级别列出所有发现项。
* [下一步操作并拒绝文档](/chinese/guan-li-yu-she-zhi/settings/document-processing/e-documents/validation-rules/validation-next-step-and-reject.md)
* [各文档类型的验证](/chinese/guan-li-yu-she-zhi/settings/document-processing/e-documents/validation-rules/validation-per-document-type.md)：启用验证并将其设为阻止。


---

# 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://docs.docbits.com/chinese/guan-li-yu-she-zhi/settings/document-processing/e-documents/validation-rules/validation-error-screen.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.
