commit compras3 2711
tests / ci (push) Waiting to run

This commit is contained in:
2026-11-27 18:56:24 +02:00
parent 930064269e
commit 9cf9764710
87 changed files with 2856 additions and 195 deletions
@@ -79,7 +79,7 @@ class ProcurementSearchController extends Controller
}
}
if (Gate::forUser($actor)->allows('viewAny', GoodsReceipt::class)) {
$orders = PurchaseOrder::query()->when($actor->departmentScoped(), fn ($query) => $query->whereIn('requisition_id', Requisition::query()->visibleTo($actor)->select('id')));
$orders = PurchaseOrder::query()->when($actor->departmentScoped(), fn ($query) => $query->visibleTo($actor));
$receipts = GoodsReceipt::query()->whereIn('purchase_order_id', $orders->select('id'))->whereRaw("LOWER(delivery_note) LIKE ? ESCAPE '!'", [$pattern])
->latest('id')->paginate(15, ['id', 'delivery_note'], 'receipts_page')->withQueryString()
->through(fn ($row) => ['id' => $row->id, 'title' => 'Recepção #'.$row->id.' · '.$row->delivery_note, 'detail' => 'Recepção', 'href' => '/recepcoes/'.$row->id]);