last changes since 6-2023

This commit is contained in:
Kevin Adametz 2023-07-03 10:07:08 +02:00
parent 0341c9c189
commit 04d677d37a
142 changed files with 7895 additions and 2855 deletions

View file

@ -11,10 +11,6 @@ use App\Services\HTMLHelper;
class PaymentInvoiceController extends Controller
{
private $startYear;
private $endYear;
private $rangeYears;
private $activeYear;
public function __construct()
{
@ -60,22 +56,17 @@ class PaymentInvoiceController extends Controller
->where('user_invoices.year', '=', Request::get('invoice_filter_year'));
if(Request::get('invoice_filter_name')){
$query->where('shopping_order.shopping_user.billing_firstname', 'LIKE', '%'.Request::get('invoice_filter_name').'%');
$query->where('shopping_order.shopping_user.billing_lastname', 'LIKE', '%'.Request::get('invoice_filter_name').'%');
$query->where('shopping_order.shopping_user.billing_email', 'LIKE', '%'.Request::get('invoice_filter_name').'%');
$query->whereHas('shopping_order.shopping_user', function ($query) {
return $query->where('billing_firstname', 'LIKE', '%'.Request::get('invoice_filter_name').'%')->orWhere('billing_lastname', 'LIKE', '%'.Request::get('invoice_filter_name').'%')->orWhere('billing_email', 'LIKE', '%'.Request::get('invoice_filter_name').'%');
})->get();
}
//->orderBy('created_at', 'DESC');
/* $query = FlexHour::leftJoin("flex_hour_items", function($join) {
$join->on("flex_hour_items.flex_hour_id","=","flex_hours.id");
$join->where("flex_hour_items.date","=", FlexHourItemBot::$date);
})*/
return $query;
}
public function datatable(){
$query = $this->initSearch();
return \DataTables::eloquent($query)
->addColumn('id', function (UserInvoice $UserInvoice) {
if($UserInvoice->shopping_order->auth_user_id){