feat(invoice-check): 立账凭证优化

This commit is contained in:
sophie committed 2026-09-30 16:12:27 +08:00
1 parent 22b05c91a2
commit 425ed43649
7 files changed
+207 -65

No files matched your search

@@ -291,10 +291,18 @@ def test_send_batch_splits_one_card_per_user(app, monkeypatch):
wecom_ids = {item[0] for item in sent}
assert wecom_ids == {"wx-po-recv", "wx-bl-recv"}
po_body = next(item[2] for item in sent if item[0] == "wx-po-recv")
po_title, po_body = next((item[1], item[2]) for item in sent if item[0] == "wx-po-recv")
bl_body = next(item[2] for item in sent if item[0] == "wx-bl-recv")
# 关键断言:卡片面向销售开票附件,不暴露业务方代号和批次号。
assert po_title == "销售开票附件缺件"
assert "2026年8月" in po_body
assert "缺 2 份,涉及 1 张发票" in po_body
assert "业务方" not in po_body
assert "sales" not in po_body
assert "RUN-VC-NOTIFY-SPLIT" not in po_body
assert "PO订单" in po_body
assert "提单" not in po_body
assert "发票" not in po_body
# 关键断言:「张发票」是计量用语,类型是否出现要看「发票:缺」。
assert "提单:缺" not in po_body
assert "发票:缺" not in po_body
assert "提单" in bl_body
assert "PO订单" not in bl_body
assert "PO订单:缺" not in bl_body