deplay phase 1
This commit is contained in:
parent
e3dc1afd8e
commit
5a7478907e
68 changed files with 2831 additions and 818 deletions
|
|
@ -400,10 +400,10 @@ class ReportController extends Controller
|
|||
$price = 0;
|
||||
$isset = [];
|
||||
foreach ($all as $v){
|
||||
if(!in_array($v->booking->inquiry_id, $isset)){
|
||||
if(!in_array($v->booking->lead_id, $isset)){
|
||||
$price += $v->booking->isCanceled() ? $v->booking->getPriceCanceledRaw() : $v->booking->getPriceRaw();
|
||||
}
|
||||
$isset[] = $v->booking->inquiry_id;
|
||||
$isset[] = $v->booking->lead_id;
|
||||
|
||||
}
|
||||
return Util::_number_format($price);
|
||||
|
|
@ -416,8 +416,8 @@ class ReportController extends Controller
|
|||
$price = 0;
|
||||
$isset = [];
|
||||
foreach ($all as $v){
|
||||
$price += in_array($v->booking->inquiry_id, $isset) ? 0 : $v->booking->getPriceTotalRaw();
|
||||
$isset[] = $v->booking->inquiry_id;
|
||||
$price += in_array($v->booking->lead_id, $isset) ? 0 : $v->booking->getPriceTotalRaw();
|
||||
$isset[] = $v->booking->lead_id;
|
||||
}
|
||||
return Util::_number_format($price);
|
||||
})
|
||||
|
|
@ -429,8 +429,8 @@ class ReportController extends Controller
|
|||
$proceeds = 0;
|
||||
$isset = [];
|
||||
foreach ($all as $v){
|
||||
$proceeds += in_array($v->booking->inquiry_id, $isset) ? 0 : $v->booking->proceeds(true);
|
||||
$isset[] = $v->booking->inquiry_id;
|
||||
$proceeds += in_array($v->booking->lead_id, $isset) ? 0 : $v->booking->proceeds(true);
|
||||
$isset[] = $v->booking->lead_id;
|
||||
}
|
||||
return Util::_number_format($proceeds);
|
||||
/*$all = $query->get();
|
||||
|
|
@ -562,7 +562,7 @@ class ReportController extends Controller
|
|||
$ctemps[$export->booking->id][] = array(
|
||||
'Zähler' => $new ? $export->getCounter() : "",
|
||||
'MyJack Nr.' => $new ? $export->booking->merlin_order_number : "",
|
||||
'CRM Nr' => $new ? $export->booking->inquiry_id : "",
|
||||
'CRM Nr' => $new ? $export->booking->lead_id : "",
|
||||
'Kunde' => $new ? $export->booking->customer->name : "",
|
||||
'Reisedatum' => $new ? $export->booking->getStartDateFormat() : "",
|
||||
'Organisation' => $new ? ($export->booking->isCanceled() ? $export->booking->price_canceled : $export->booking->price) : "",
|
||||
|
|
@ -630,7 +630,7 @@ class ReportController extends Controller
|
|||
$ctemps[$export->booking->id][] = array(
|
||||
'Zähler' => $new ? $export->getCounter() : "",
|
||||
'MyJack Nr.' => $new ? $export->booking->merlin_order_number : "",
|
||||
'CRM Nr' => $new ? $export->booking->inquiry_id : "",
|
||||
'CRM Nr' => $new ? $export->booking->lead_id : "",
|
||||
'Kunde' => $new ? $export->booking->customer->name : "",
|
||||
'Reisedatum' => $new ? $export->booking->getStartDateFormat() : "",
|
||||
'Reiseland' => $new && $export->booking->travel_country ? $export->booking->travel_country->name : "",
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class ReportLeadsController extends Controller
|
|||
{
|
||||
|
||||
$query = Lead::with('customer')->with('sf_guard_user')->with('status')
|
||||
->select('inquiries.*');
|
||||
->select('lead.*');
|
||||
//->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', 'inquiries.id')
|
||||
->whereColumn('lead_id', 'lead.id')
|
||||
->orderBy('sent_at', 'DESC')
|
||||
->limit(1)
|
||||
, $order);
|
||||
|
|
|
|||
|
|
@ -104,10 +104,10 @@ class ReportProviderController extends Controller
|
|||
$price = 0;
|
||||
$isset = [];
|
||||
foreach ($all as $v){
|
||||
if(!in_array($v->booking->inquiry_id, $isset)){
|
||||
if(!in_array($v->booking->lead_id, $isset)){
|
||||
$price += $v->booking->isCanceled() ? $v->booking->getPriceCanceledRaw() : $v->booking->getPriceRaw();
|
||||
}
|
||||
$isset[] = $v->booking->inquiry_id;
|
||||
$isset[] = $v->booking->lead_id;
|
||||
|
||||
}
|
||||
return Util::_number_format($price);
|
||||
|
|
@ -120,8 +120,8 @@ class ReportProviderController extends Controller
|
|||
$price = 0;
|
||||
$isset = [];
|
||||
foreach ($all as $v){
|
||||
$price += in_array($v->booking->inquiry_id, $isset) ? 0 : $v->booking->getPriceTotalRaw();
|
||||
$isset[] = $v->booking->inquiry_id;
|
||||
$price += in_array($v->booking->lead_id, $isset) ? 0 : $v->booking->getPriceTotalRaw();
|
||||
$isset[] = $v->booking->lead_id;
|
||||
}
|
||||
return Util::_number_format($price);
|
||||
})
|
||||
|
|
@ -133,8 +133,8 @@ class ReportProviderController extends Controller
|
|||
$proceeds = 0;
|
||||
$isset = [];
|
||||
foreach ($all as $v){
|
||||
$proceeds += in_array($v->booking->inquiry_id, $isset) ? 0 : $v->booking->proceeds(true);
|
||||
$isset[] = $v->booking->inquiry_id;
|
||||
$proceeds += in_array($v->booking->lead_id, $isset) ? 0 : $v->booking->proceeds(true);
|
||||
$isset[] = $v->booking->lead_id;
|
||||
}
|
||||
return Util::_number_format($proceeds);
|
||||
/*$all = $query->get();
|
||||
|
|
@ -272,7 +272,7 @@ class ReportProviderController extends Controller
|
|||
$ctemps[$export->booking->id][] = array(
|
||||
'Zähler' => $new ? $export->getCounter() : "",
|
||||
'MyJack Nr.' => $new ? $export->booking->merlin_order_number : "",
|
||||
'CRM Nr' => $new ? $export->booking->inquiry_id : "",
|
||||
'CRM Nr' => $new ? $export->booking->lead_id : "",
|
||||
'Kunde' => $new ? $export->booking->customer->name : "",
|
||||
'Reisedatum' => $new ? $export->booking->getStartDateFormat() : "",
|
||||
'bis' => $new ? $export->booking->getEndDateFormat() : "",
|
||||
|
|
@ -346,7 +346,7 @@ class ReportProviderController extends Controller
|
|||
$ctemps[$export->booking->id][] = array(
|
||||
'Zähler' => $new ? $export->getCounter() : "",
|
||||
'MyJack Nr.' => $new ? $export->booking->merlin_order_number : "",
|
||||
'CRM Nr' => $new ? $export->booking->inquiry_id : "",
|
||||
'CRM Nr' => $new ? $export->booking->lead_id : "",
|
||||
'Kunde' => $new ? $export->booking->customer->name : "",
|
||||
'Reisedatum' => $new ? $export->booking->getStartDateFormat() : "",
|
||||
'bis' => $new ? $export->booking->getEndDateFormat() : "",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue