feat(formula): 首日计提比例取整 10‰(#14 答复——图示口径覆盖公式)
- salesperson_rate 首日特判:第 1 天不递减直接取起始值(原公式 9.9889‰ 作废) - 第 2 天起公式段不变、360 天=6‰ 锚点与 361 天=4‰ 分界不变;preview/核算共用一处 - 用例反转:首日断言改 Fraction(10,1000),补第 2 天公式段边界 Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
1 parent
cb4f38dfd9
commit
7a460cb682
2 files changed
+14
-3
No files matched your search
@@ -61,9 +61,14 @@ class TestSalespersonRate:
|
||||
# 公式外推为 5.989‰,业务确认「360 为分界线,360 以后按千分之四」
|
||||
assert _sp_rate(361) == Fraction(4, 1000)
|
||||
|
||||
def test_第1天按公式为899比90000_非取整为10(self) -> None:
|
||||
# 需规图示「第 1 天对应 10‰」为上限参考;公式值 = (10 − 4/360)/1000 = 899/90000
|
||||
assert _sp_rate(1) == Fraction(899, 90000)
|
||||
def test_首日取整10千分_图示口径裁决(self) -> None:
|
||||
# 需规图示「第 1 天 10‰」2026-10-19 裁决覆盖公式(公式值 9.9889‰ 作废):
|
||||
# 首日不递减、直接取起始值;第 2 天起才进入公式段
|
||||
assert _sp_rate(1) == Fraction(10, 1000)
|
||||
|
||||
def test_第2天起进入公式递减段(self) -> None:
|
||||
# 10‰ − 2×4/360‰ = 9.9778‰(首日取整裁决只影响第 1 天,第 2 天起不变)
|
||||
assert _sp_rate(2) == Fraction(10, 1000) - Fraction(2 * 4, 360 * 1000)
|
||||
|
||||
def test_第180天线性段中点千分之8(self) -> None:
|
||||
assert _sp_rate(180) == Fraction(8, 1000)
|
||||
|
||||
Reference in new issue
Block a user