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

@ -104,10 +104,10 @@ class ReportProviderController extends Controller
$price = 0;
$isset = [];
foreach ($all as $v){
if(!in_array($v->booking->lead_id, $isset)){
if(!in_array($v->booking->inquiry_id, $isset)){
$price += $v->booking->isCanceled() ? $v->booking->getPriceCanceledRaw() : $v->booking->getPriceRaw();
}
$isset[] = $v->booking->lead_id;
$isset[] = $v->booking->inquiry_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->lead_id, $isset) ? 0 : $v->booking->getPriceTotalRaw();
$isset[] = $v->booking->lead_id;
$price += in_array($v->booking->inquiry_id, $isset) ? 0 : $v->booking->getPriceTotalRaw();
$isset[] = $v->booking->inquiry_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->lead_id, $isset) ? 0 : $v->booking->proceeds(true);
$isset[] = $v->booking->lead_id;
$proceeds += in_array($v->booking->inquiry_id, $isset) ? 0 : $v->booking->proceeds(true);
$isset[] = $v->booking->inquiry_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->lead_id : "",
'CRM Nr' => $new ? $export->booking->inquiry_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->lead_id : "",
'CRM Nr' => $new ? $export->booking->inquiry_id : "",
'Kunde' => $new ? $export->booking->customer->name : "",
'Reisedatum' => $new ? $export->booking->getStartDateFormat() : "",
'bis' => $new ? $export->booking->getEndDateFormat() : "",