優化: 門市叫貨模組 UI 調整、權限標籤中文化及調撥單動態導覽

This commit is contained in:
2026-02-13 10:39:10 +08:00
parent 882091ce5f
commit 097708aab7
17 changed files with 2359 additions and 6 deletions

View File

@@ -99,7 +99,7 @@ class TransferOrderController extends Controller
public function show(InventoryTransferOrder $order)
{
$order->load(['items.product.baseUnit', 'fromWarehouse', 'toWarehouse', 'createdBy', 'postedBy']);
$order->load(['items.product.baseUnit', 'fromWarehouse', 'toWarehouse', 'createdBy', 'postedBy', 'storeRequisition']);
$orderData = [
'id' => (string) $order->id,
@@ -113,6 +113,10 @@ class TransferOrderController extends Controller
'remarks' => $order->remarks,
'created_at' => $order->created_at->format('Y-m-d H:i'),
'created_by' => $order->createdBy?->name,
'requisition' => $order->storeRequisition ? [
'id' => (string) $order->storeRequisition->id,
'doc_no' => $order->storeRequisition->doc_no,
] : null,
'items' => $order->items->map(function ($item) use ($order) {
// 獲取來源倉庫的當前庫存
$stock = Inventory::where('warehouse_id', $order->from_warehouse_id)