> 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/global-settings/document-types/edi/zugferd/zugferd-2-3-2.md).

# ZUGFeRD 2.3.2 映射

## 概述

ZUGFeRD 2.3.2 是 2.3 标准的维护版本，确保与最新的 CII 更新兼容。

## 页眉字段映射

### 发票标识

| ZUGFeRD CII 路径                    | DocBits 字段       | Infor BOD 字段       | 类型     | 描述     |
| --------------------------------- | ---------------- | ------------------ | ------ | ------ |
| `ExchangedDocument/ID`            | `INVOICE_NUMBER` | `DocumentID`       | STRING | 发票编号   |
| `ExchangedDocument/IssueDateTime` | `INVOICE_DATE`   | `DocumentDateTime` | DATE   | 发票开具日期 |

### 文档类型和子类型（由 TRA 驱动）

默认的 TRANSFORMATION XSLT 会生成两个派生字段：

| DocBits 字段         | 来源                                                                                                         | 逻辑                                                  |
| ------------------ | ---------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
| `INVOICE_TYPE`     | `CrossIndustryInvoice/ExchangedDocument/TypeCode`                                                          | UNCL 1001 `381` 或 `261` → **贷项通知单**；其他任何代码 → **发票** |
| `INVOICE_SUB_TYPE` | `SupplyChainTradeTransaction/ApplicableHeaderTradeAgreement/BuyerOrderReferencedDocument/IssuerAssignedID` | 非空 → **采购发票**；为空或缺失 → **成本发票**                      |

### 税额明细（按层级分类）

`ApplicableTradeTax` 块按税率分配到三个层级（而非按位置使用 `[1]`/`[2]`/`[3]`）：标准税率字段（`TAX_RATE` / `NET_AMOUNT` / `TAX_AMOUNT`）捕获税率 ≥ 19 的数据；减税率字段（`*_2`）捕获 0 < 税率 < 19 的数据；零税率字段（`*_3`）捕获税率 = 0 的数据。完整字段列表请参阅[ZUGFeRD 税额明细](/chinese/guan-li-yu-she-zhi/settings/global-settings/document-types/edi/zugferd.md#tax-breakdown-tier-classified)。

| ZUGFeRD CII 路径                                   | DocBits 字段   | Infor BOD 字段    | 类型     | 描述            |
| ------------------------------------------------ | ------------ | --------------- | ------ | ------------- |
| `ApplicableTradeTax/RateApplicablePercent`（层级 1） | `TAX_RATE`   | `TaxPercent`    | NUMBER | 标准税率增值税（≥ 19） |
| `ApplicableTradeTax/BasisAmount`（层级 1）           | `NET_AMOUNT` | `TaxableAmount` | AMOUNT | 标准税率净额        |
| `ApplicableTradeTax/CalculatedAmount`（层级 1）      | `TAX_AMOUNT` | `TaxAmount`     | AMOUNT | 标准税率税额        |

## 行项目映射

| ZUGFeRD CII 路径                           | DocBits 字段     | Infor BOD 字段       | 类型     | 描述    |
| ---------------------------------------- | -------------- | ------------------ | ------ | ----- |
| `AssociatedDocumentLineDocument/LineID`  | `POSITION`     | `LineNumber`       | STRING | 行编号   |
| `SpecifiedTradeProduct/Name`             | `DESCRIPTION`  | `ItemDescription`  | STRING | 项目描述  |
| `BilledQuantity`                         | `QUANTITY`     | `InvoicedQuantity` | NUMBER | 计费数量  |
| `NetPriceProductTradePrice/ChargeAmount` | `UNIT_PRICE`   | `UnitPrice`        | AMOUNT | 不含税单价 |
| `LineTotalAmount`                        | `TOTAL_AMOUNT` | `ExtendedAmount`   | AMOUNT | 行项目总额 |


---

# 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/global-settings/document-types/edi/zugferd/zugferd-2-3-2.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.
