Files
SupplierSystem/server/tests
Ubuntu 06233ff0b0
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
fix(进销存/自采): 部分抵扣缺口默认自采同样在无采购员时按自由池建单
上一提交(59dcfd5)修的是「主系统导入单无抵扣 ⇒ 默认自采」入口;代码复查发现**同类的第二个入口**:
`ensureSelfPurchaseForCoverGap`(库存部分抵扣后的缺口默认自采,在 reprocessOrderAllocation 内,
导入单提交也会经过)仍调用 createPurchaseOrderForItem 不传 allowMissingPurchaser ⇒ 分公司无采购员时
每行静默返回 false,而 `STOCK_COVER_SUPPLIER_SQL` 已把行标 INTERNAL ⇒ 同样留下
「界面自采、自采表无数据、订单卡 20 待分配」的半成品(与刚修复的事故同类,尚未在真机触发)。

修复:该入口也传 allowMissingPurchaser: true(无采购员按自由池建单);并在
「有行需转自采但 created=0」时打 warn(原先完全静默)。
验证:契约测试 4/4(新增部分抵扣分支断言);typecheck 通过;后端全量 3 failed / 579 passed
(18 failed / 4145 passed,红均为既有 mainSystemReturnCancel/opsGuardHardening/routeLayerBoundary)。
设计文档同步两处入口。未部署。
2026-10-22 15:13:25 +08:00
..