feat: 整合門市領料日誌、API 文件存取、修改庫存與併發編號問題、供應商商品內聯編輯及日誌 UI 優化
All checks were successful
ERP-Deploy-Demo / deploy-demo (push) Successful in 1m0s
All checks were successful
ERP-Deploy-Demo / deploy-demo (push) Successful in 1m0s
This commit is contained in:
@@ -186,8 +186,14 @@ class InventoryController extends Controller
|
||||
]);
|
||||
|
||||
return DB::transaction(function () use ($validated, $warehouse) {
|
||||
// 修正時間精度:手動入庫亦補上當下時分秒
|
||||
$inboundDateTime = $validated['inboundDate'] . ' ' . date('H:i:s');
|
||||
// 修正時間精度:使用 Carbon 解析,若含時間則保留並補上秒數,若只有日期則補上當前時間
|
||||
$dt = \Illuminate\Support\Carbon::parse($validated['inboundDate']);
|
||||
if ($dt->hour === 0 && $dt->minute === 0 && $dt->second === 0) {
|
||||
$dt->setTimeFrom(now());
|
||||
} else {
|
||||
$dt->setSecond(now()->second);
|
||||
}
|
||||
$inboundDateTime = $dt->toDateTimeString();
|
||||
|
||||
$this->inventoryService->processIncomingInventory($warehouse, $validated['items'], [
|
||||
'inboundDate' => $inboundDateTime,
|
||||
|
||||
Reference in New Issue
Block a user