phase 2 dev

This commit is contained in:
Kevin Adametz 2026-04-22 16:01:27 +02:00
parent 5a7478907e
commit ba48745809
59 changed files with 2692 additions and 1994 deletions

View file

@ -49,7 +49,7 @@ class ReportLeadsController extends Controller
{
$query = Lead::with('customer')->with('sf_guard_user')->with('status')
->select('lead.*');
->select('inquiries.*');
//->where('deleted_at', '=', null);
/*
@ -132,7 +132,7 @@ class ReportLeadsController extends Controller
// $q->select('sent_at')->where('sent_at', DB::raw("(select max('sent_at') customer_mails)")); //)
})->orderBy(
LeadMail::select('sent_at')
->whereColumn('lead_id', 'lead.id')
->whereColumn('lead_id', 'inquiries.id')
->orderBy('sent_at', 'DESC')
->limit(1)
, $order);
@ -161,9 +161,9 @@ class ReportLeadsController extends Controller
$orderByNum = [
0 => 'id',
1 => 'customer_id',
2 => 'customer.firstname',
3 => 'customer.name',
4 => 'customer.email',
2 => 'contacts.firstname',
3 => 'contacts.name',
4 => 'contacts.email',
5 => 'request_date',
6 => 'travel_country',
7 => 'sf_guard_user.last_name',