salesentry filters

This commit is contained in:
Sampanna Rimal
2024-09-17 16:34:40 +05:45
parent afb2c202d6
commit 0b438e302d
19 changed files with 303 additions and 50 deletions

View File

@ -94,4 +94,16 @@ class StockController extends Controller
return response()->json(['status' => true, 'message' => 'Stock Deleted Successfully']);
}
public function getStocksByProduct(Request $request)
{
$productId = $request->product_id;
try {
$stocks = $this->stockRepository->getStocksByProduct($productId);
} catch (\Throwable $th) {
toastr()->error($th->getMessage());
}
return response()->json(['stocks' => $stocks]);
}
}