This commit is contained in:
Server D3 Linksehat
2025-03-24 13:25:45 +07:00
parent 277802c708
commit 6ffd34a409

View File

@@ -119,12 +119,9 @@ class AutocompleteController extends Controller {
$drugs = Drug::query()
->where([
'atc_code' => $request->provider, // ini untuk menggunakan list obat yang baru
<<<<<<< HEAD
'active' => 1, // ini untuk menggunakan list obat yang baru
=======
'active' => 1
>>>>>>> origin/staging
])
->whereNotNull('id_setara')
->where(function ($query) use ($search) {
$query->where('name', 'like', "%$search%")
->orWhere('code', 'like', "%$search%");
@@ -139,6 +136,7 @@ class AutocompleteController extends Controller {
'code' => $drug->code,
'price' => $drug->price,
'unit' => $drug->unit,
'multiply_jual' => $drug->multiply_jual,
];
});
return Helper::responseJson(data: $manipulatedDrugs);