@ -40,7 +40,9 @@ class DashboardController extends Controller
->get();
$products = PayrollItem::selectRaw('product_id, SUM(quantity) as count')
->whereBetween(DB::raw('DATE(created_at)'), [$startDate, $endDate])
->whereHas('payroll', function ($query) use ($startDate, $endDate) {
return $query->whereBetween('date', [$startDate, $endDate]);
})
->groupBy('product_id')
->with(['product'])
@ -1856,14 +1856,14 @@ html {
margin-left: auto;
margin-right: auto;
}
.mx-1 {
margin-left: 0.25rem;
margin-right: 0.25rem;
.my-auto {
margin-top: auto;
margin-bottom: auto;
.my-2 {
margin-top: 0.5rem;
margin-bottom: 0.5rem;
@ -1987,9 +1987,6 @@ html {
.max-h-96 {
max-height: 24rem;
.max-h-11 {
max-height: 2.75rem;
.min-h-screen {
min-height: 100vh;
@ -2367,12 +2364,12 @@ html {
.pb-8 {
padding-bottom: 2rem;
.pl-2 {
padding-left: 0.5rem;
.pb-4 {
padding-bottom: 1rem;
.text-left {
text-align: left;
@ -2610,6 +2607,7 @@ html {
.react-datepicker-popper {
inset: 0px 0px auto auto !important;
z-index: 40;
width: 18rem;
border-radius: 0.25rem;
@ -6,6 +6,7 @@
@apply z-40 w-72 text-sm bg-white shadow px-3 py-2 border-2 border-gray-200 rounded;