@@ -66,6 +66,8 @@ function nativeOfficePurchaseState(array $fixture): array
|
||||
'order' => $order ? ['id' => $order->id, 'total_minor' => $order->total_minor,
|
||||
'items' => $order->items()->orderBy('id')->get(['id', 'quantity'])->toArray(),
|
||||
'account_assignments' => $order->snapshot['account_assignments'] ?? null,
|
||||
'capital_assignments' => $order->snapshot['capital_assignments'] ?? null,
|
||||
'budget_checked' => $order->snapshot['budget_checked'] ?? null,
|
||||
'receipts' => GoodsReceipt::query()->where('purchase_order_id', $order->id)->orderBy('id')->get(['id', 'status'])->toArray()] : null,
|
||||
'stock' => $stock ? ['id' => $stock->id, 'quantity_milli' => (int) DB::table('stock_movements')->where('stock_item_id', $stock->id)->sum('quantity_milli'),
|
||||
'movements' => DB::table('stock_movements')->where('stock_item_id', $stock->id)->count()] : null,
|
||||
|
||||
Reference in New Issue
Block a user