修正庫存報表分頁參數衝突導致明細顯示為空的問題

This commit is contained in:
2026-02-10 16:07:31 +08:00
parent 8b950f6529
commit 593ce94734
15 changed files with 1210 additions and 30 deletions

View File

@@ -26,7 +26,9 @@ class InventoryTransaction extends Model
];
protected $casts = [
'actual_time' => 'datetime',
// actual_time 不做時區轉換,保留原始字串格式(台北時間)
// 原因:資料庫儲存的是台北時間,但 MySQL 時區為 UTC
// 若使用 datetime castLaravel 會誤當作 UTC 再轉回台北時間,造成偏移
'unit_cost' => 'decimal:4',
];