feat: 統一進貨單 UI、修復庫存異動紀錄與廠商詳情顯示報錯
All checks were successful
Koori-ERP-Deploy-System / deploy-demo (push) Successful in 51s
Koori-ERP-Deploy-System / deploy-production (push) Has been skipped

This commit is contained in:
2026-01-27 17:23:31 +08:00
parent a7c445bd3f
commit 95d8dc2e84
24 changed files with 1613 additions and 466 deletions

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
// Update old statuses to 'approved'
DB::table('purchase_orders')
->whereIn('status', ['processing', 'shipping', 'confirming'])
->update(['status' => 'approved']);
}
/**
* Reverse the migrations.
*/
public function down(): void
{
// Cannot easily reverse without knowing original status,
// but typically we can revert 'approved' back to 'processing' as a safeguard if needed,
// or just leave it since 'approved' is broader.
// For strict reversal, we might try to map back, but effectively this is a one-way consolidation.
// We will leave it as is for down/safe side.
}
};