feat(inventory): 完善庫存盤調更新與日誌邏輯,新增「無需盤調」狀態判定
1. 修正 AdjustDocController 缺失 update 方法導致的錯誤。 2. 修正 ActivityDetailDialog 前端 map 渲染 undefined 的 TypeError。 3. 優化盤調單「過帳」日誌,現在會同步包含當時的商品明細快照。 4. 實作盤點單「無需盤調」(no_adjust) 自動判定邏輯: - 當盤點數量與庫存完全一致時,自動標記為 no_adjust 結案。 - 更新前端標籤樣式與操作按鈕對應邏輯。 - 限制 no_adjust 單據不可重複建立盤調單。 5. 統一盤點單與盤調單的日誌配置,優化 ID 轉名稱顯示。
This commit is contained in:
@@ -192,8 +192,8 @@ class CountDocController extends Controller
|
||||
abort(403);
|
||||
}
|
||||
|
||||
if ($doc->status !== 'completed') {
|
||||
return redirect()->back()->with('error', '僅能針對已完成的盤點單重新開啟盤點');
|
||||
if (!in_array($doc->status, ['completed', 'no_adjust'])) {
|
||||
return redirect()->back()->with('error', '僅能針對已完成或無需盤調的盤點單重新開啟盤點');
|
||||
}
|
||||
|
||||
// 執行取消核准邏輯
|
||||
|
||||
Reference in New Issue
Block a user