商品成本:口径不一致行全部计算成本 #492

Merged
chenxi merged 2 commits from feature/chenxi-product-cost-include-unit-mismatch into main 2026-10-24 14:34:09 +08:00
Collaborator

任务范围

  • 移除商品数量与商品单价之间的 3 倍倍率拦截。
  • 匹配到有效单价的行全部按商品数量 × 商品单价计算成本。
  • 删除页面“口径不一致不计成本”统计与旧口径说明。
  • 缺单价行继续保留待核验,不按 0 计入。

修改文件

  • app/Console/Commands/SyncStoreReceiptProductCost.php
  • app/Http/Controllers/Business/Pages.php
  • resources/views/business/pages/financial-operations/product-costs.blade.php
  • tests/Unit/StoreReceiptProductCostLineTest.php

验证证据

  • 已合入最新 origin/main,无冲突。
  • 相关单元测试通过:5 tests / 18 assertions。
  • PHP 语法检查与 git diff --check 通过。
  • 已使用隔离批处理容器重跑 7、8、9 月;原 336 行倍率异常全部恢复计价,待核验数量不变。
  • 页面实际渲染已确认新口径生效且旧统计卡片已移除。

风险检查

  • 不涉及权限、审批、数据库迁移、生产配置或原始数据修改。
  • 未提交密码、Token、真实财务明细、日志或构建产物。
## 任务范围 - 移除商品数量与商品单价之间的 3 倍倍率拦截。 - 匹配到有效单价的行全部按商品数量 × 商品单价计算成本。 - 删除页面“口径不一致不计成本”统计与旧口径说明。 - 缺单价行继续保留待核验,不按 0 计入。 ## 修改文件 - `app/Console/Commands/SyncStoreReceiptProductCost.php` - `app/Http/Controllers/Business/Pages.php` - `resources/views/business/pages/financial-operations/product-costs.blade.php` - `tests/Unit/StoreReceiptProductCostLineTest.php` ## 验证证据 - 已合入最新 `origin/main`,无冲突。 - 相关单元测试通过:5 tests / 18 assertions。 - PHP 语法检查与 `git diff --check` 通过。 - 已使用隔离批处理容器重跑 7、8、9 月;原 336 行倍率异常全部恢复计价,待核验数量不变。 - 页面实际渲染已确认新口径生效且旧统计卡片已移除。 ## 风险检查 - 不涉及权限、审批、数据库迁移、生产配置或原始数据修改。 - 未提交密码、Token、真实财务明细、日志或构建产物。
chenxi added 2 commits 2026-10-24 14:33:57 +08:00
chenxi merged commit ab308fe388 into main 2026-10-24 14:34:09 +08:00
chenxi deleted branch feature/chenxi-product-cost-include-unit-mismatch 2026-10-24 14:34:09 +08:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: WuYongJie/CaiWuXiTong#492
No description provided.