Rule 遅延の請求額 v1
事業者間の代金の支払いが遅れたとき、売り手が請求できるもの。取り立ての費用としての定額と、基準金利に 8% を足した率で一日ずつ数える法定の利息。Late Payment of Commercial Debts (Interest) Act 1998 の第 5A 条 (2) と、GOV.UK の事業者間の請求の利息の手引きを、この例として読んだもの。法令の読み方を示すものではない。late_payment_charges.rule の日本語の版
Try a case
Enter the inputs: the rows that match light up and the outputs appear. What runs is the generated code itself, and the line it would write to a log is shown as it is.
Inputs
| Name | Type | Range | Notes |
|---|---|---|---|
| 債権額 | money[GBPc] | 1GBPc to 100_000_000GBPc | |
| 遅れた日数 | number | 1 to 1500 | |
| 基準金利 | rate | 0% to 15% |
Outputs
| Name | Type | Rounding | Notes |
|---|---|---|---|
| 定額の補償 | money[GBP] | down(1GBP) (rounded down to 1GBP) | |
| 利息 | money[GBPc] | down(1GBPc) (rounded down to 1GBPc) |
Derived Values and Definitions
Intermediate values that can be placed in a table column. The expressions are as written in the source file, and the ranges are the declared ones.
| Name | Kind | Expression | Range | Notes |
|---|---|---|---|---|
| 一日の利息 | Definition | half_up(債権額 × (8% + 基準金利) ÷ 365, 1GBPc) ((債権額 × (8% + 基準金利)) ÷ 365 rounded half up to 1GBPc) | Source: 手引き | |
| 利息 | Definition | 一日の利息 × 遅れた日数 |
Table 定額 (policy unique)
Source: 法令 (sources/late-payment-act-1998.md, sha256:d328938a26fc0ab4)
| Column | Source |
|---|---|
| 債権額 | Input |
| → 定額の補償 | Output of this rule |
| # | 債権額 | → 定額の補償 (money[GBP] / down(1GBP)) | Notes |
|---|---|---|---|
| 1 | <100_000GBPc (less than 100_000GBPc) | 40GBP | Source: 手引き table1 |
| 2 | >=100_000GBPc <1_000_000GBPc (100_000GBPc or more and less than 1_000_000GBPc) | 70GBP | Source: 手引き table1 |
| 3 | >=1_000_000GBPc (1_000_000GBPc or more) | 100GBP | Source: 手引き table1 |
What rulec check verified
- Every combination of inputs matches some row (E101 completeness)
- There is no row that can never match (E102 unreachable row)
- No input matches two or more rows at once (E105 overlap). Reordering the rows does not change the meaning
Examples (verified)
| 債権額 | 遅れた日数 | 基準金利 | → 定額の補償 | 利息 |
|---|---|---|---|---|
| 100_000GBPc | 50 | 0.5% | 70GBP | 1150GBPc |
| 99_999GBPc | 1 | 0% | 40GBP | 22GBPc |
| 1_000_000GBPc | 30 | 4% | 100GBP | 9870GBPc |
rulec check ran these 3 examples through the reference evaluator, and every one produced the declared values (E107). The examples are an executable specification.