優化: 門市叫貨模組 UI 調整、權限標籤中文化及調撥單動態導覽
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user