mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 11:41:09 -04:00
refactor sales reports
This commit is contained in:
@ -26,8 +26,7 @@ class ReportController extends Controller
|
||||
$query->whereBetween(
|
||||
'invoice_date',
|
||||
[$start->format('Y-m-d'), $end->format('Y-m-d')]
|
||||
)
|
||||
->where('paid_status', Invoice::STATUS_PAID);
|
||||
);
|
||||
}])
|
||||
->customer()
|
||||
->whereCompany($company->id)
|
||||
|
||||
@ -60,7 +60,7 @@ class InvoiceItem extends Model
|
||||
$query->whereBetween(
|
||||
'invoice_date',
|
||||
[$start->format('Y-m-d'), $end->format('Y-m-d')]
|
||||
)->where('paid_status', Invoice::STATUS_PAID);
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -216,7 +216,7 @@ class User extends Authenticatable implements HasMedia
|
||||
$query->whereBetween(
|
||||
'invoice_date',
|
||||
[$start->format('Y-m-d'), $end->format('Y-m-d')]
|
||||
)->where('paid_status', Invoice::STATUS_PAID);
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user