> 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/workflow/cards-overview/and/compare-with-purchase-order/promised-delivery-date-for-line-items-in-table-with-promised-delivery-date/key-concept-tolerance-window.md).

# 核心概念：容差窗口

在了解运算符之前，首先需要理解容差窗口的计算方式。

## 什么是容差窗口？

容差窗口定义了采购订单承诺交货日期前后可接受的日期范围。

**示例：**

* 采购订单日期：**1 月 9 日**
* 容差天数：**3**
* 容差窗口：**1 月 6 日 → 1 月 12 日**

> <mark style="color:red;">计算此窗口时，只统计所选的</mark> <mark style="color:red;">**允许的容差日**</mark> <mark style="color:red;">（工作日）。</mark>

### 时间轴示例

```
← Past                           Future →
|-----|-----|-----|-----|-----|-----|-----|
     6 Jan      9 Jan      12 Jan
   (Start)    (PO Date)     (End)
```

### 运算符行为示例说明

* **等于 (=)**
  * **含义：**\
    行项目交货日期必须\_在\_容差窗口\_内\_。
  * **有效日期：**
    * 1 月 6 日至 **1 月 12 日**之间的任意日期（含首尾日期）
  * **无效日期：**
    * **1 月 6 日之前**的任意日期
    * **1 月 12 日之后**的任意日期
* **不等于 (≠)**
  * **含义：**\
    行项目交货日期必须\_在\_容差窗口\_外\_。
  * **有效日期：**
    * **1 月 6 日之前**的任意日期
    * **1 月 12 日之后**的任意日期
  * **无效日期：**
    * **1 月 6 日至 1 月 12 日之间**的日期
* **大于或等于 (≥)**
  * **含义：**\
    行项目交货日期必须在**容差窗口的开始日期**当天或之后。
  * **有效日期：**
    * **1 月 6 日 → 任意未来日期**
  * **无效日期：**
    * **1 月 6 日之前**的任意日期
  * <mark style="color:red;">**重要：**</mark>\
    此运算符允许容差窗口\_内\_及窗口之后的日期。
* **小于或等于 (≤)**
  * **含义：**\
    行项目交货日期必须在**容差窗口的结束日期**当天或之前。
  * **有效日期：**
    * 过去的任意日期，直至 **1 月 12 日**
  * **无效日期：**
    * **1 月 12 日之后**的任意日期
* **大于 (>)**
  * **含义：**\
    行项目交货日期必须\_严格晚于\_容差窗口。
  * **有效日期：**
    * **1 月 13 日 → 任意未来日期**
  * **无效日期：**
    * **1 月 12 日当天或之前**的任意日期
* **小于 (<)**
  * **含义：**\
    行项目交货日期必须\_严格早于\_容差窗口。
  * **有效日期：**
    * **1 月 6 日之前**的任意日期
  * **无效日期：**
    * **1 月 6 日当天或之后**的任意日期

## “允许的容差日”如何影响容差窗口

计算容差窗口时，**只统计所选的工作日**。\
未选中的日期（例如周末或排除的工作日）会被**完全跳过**。

#### 示例：按工作日计算容差

**配置：**

* 采购订单日期：**1 月 9 日，星期三**
* 容差天数：**3**
* 允许的容差日：**星期一、星期二、星期三、星期四、星期五**
* 周末（星期六、星期日）：**未选中**

#### 分步计算

从采购订单日期（**1 月 9 日**）开始：

**向前倒数（3 个容差日）：**

* 1 月 8 日，星期二 → **第 1 天**
* 1 月 7 日，星期一 → **第 2 天**
* 1 月 6 日，星期日 → *跳过（不允许）*
* 1 月 5 日，星期六 → *跳过（不允许）*
* 1 月 4 日，星期五 → **第 3 天**

➡ **容差开始日期：1 月 4 日，星期五**

**向后顺数（3 个容差日）：**

* 1 月 10 日，星期四 → **第 1 天**
* 1 月 11 日，星期五 → **第 2 天**
* 1 月 12 日，星期六 → *跳过*
* 1 月 13 日，星期日 → *跳过*
* 1 月 14 日，星期一 → **第 3 天**

➡ **容差结束日期：1 月 14 日，星期一**

#### 容差窗口结果

```
4 January  →  14 January
```

#### 为什么这很重要

如果“允许的容差日”配置不正确：

* 交货日期可能会**意外地被判定为有效或无效**
* 可能无法正确检测提前或延迟交货


---

# 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/workflow/cards-overview/and/compare-with-purchase-order/promised-delivery-date-for-line-items-in-table-with-promised-delivery-date/key-concept-tolerance-window.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.
