mivita/resources/views/pdf/credit_details_long.blade.php
2026-01-23 17:35:23 +01:00

851 lines
No EOL
35 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>mivita.care</title>
<style>
/* roboto-300 - latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: url('fonts/roboto/roboto-v20-latin-300.ttf') format('truetype'), /* Safari, Android, iOS */
}
/* roboto-regular - latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: url('fonts/roboto/roboto-v20-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
}
/* roboto-500 - latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: url('fonts/roboto/roboto-v20-latin-500.ttf') format('truetype'), /* Safari, Android, iOS */
}
/* roboto-700 - latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: url('fonts/roboto/roboto-v20-latin-700.ttf') format('truetype'), /* Safari, Android, iOS */
}
html {
width: 100%;
height: 100%;
}
body {
position: relative;
width: 100%;
height: 100%;
margin: 0 auto;
padding: 0;
color: #000;
background: transparent;
font-family: 'Roboto', sans-serif;
font-size: 9.5pt;
font-weight: 400 ;
}
table {
border: none;
}
strong {
font-weight: bold !important;
}
@page {
margin: 0px;
}
@page {
margin-top: 0px;
}
@page {
margin: 30mm 0 15mm 0;
}
main {
width: 100%;
height: 100%;
}
#pdf-page {
background-color: transparent;
position: relative;
}
h3 {
line-height: 1.2em;
}
.font-weight-bold {
font-weight: bold !important;
}
#address_box {
position: relative;
padding-left: 15mm;
width: 90mm;
height: 40mm;
z-index: 1;
line-height: 10pt;
letter-spacing: 0em;
}
#address_box_top {
font-size: 8.5pt;
color:#858585;
margin-bottom: 0.5em;
}
#title_box {
position: relative;
padding-left: 15mm;
width: 180mm;
height: 8mm;
z-index: 2;
text-align: left;
}
#title_box .title {
font-size: 16pt;
line-height: 12pt;
}
#title_box .subtitle {
line-height: 9pt;
}
#detail_box_right {
position: absolute;
top:-4mm;
right: 15mm;
width: 60mm;
height: 30mm;
z-index: 4;
}
#detail_box_right.for_shop {
top:10mm;
}
#detail_box_right table {
width: 100%;
line-height: 9pt;
}
.xsmall {
font-size: 0.9em;
}
.card {
position: relative;
padding-top: 0mm;
margin-left: 15mm;
width: 180mm;
line-height: 10pt;
background: transparent;
background-color: transparent;
}
.card table {
width: 100%;
border-collapse: collapse;
}
.card table tfoot tr {
page-break-after: avoid;
}
.card table tr th {
font-size: 9pt;
}
.card table tr td {
font-size: 9pt;
vertical-align: top;
padding-top: 2mm;
padding-bottom: 2mm;
padding-left: 1.5mm;
padding-right: 1.5mm;
border-top: 0.5pt dotted #1a1a18;
}
.card table tfoot tr td {
border-top: none;
}
.card table tfoot tr.fullline td {
border-top: 0.3pt solid #575755;
}
.card table tfoot tr.doubleline td {
border-top: 2pt double #575755;
}
.card table tfoot tr.fullline td.no-border {
border-top: none;
}
.card table tfoot tr td {
padding-top: 1.2mm;
padding-bottom: 1.2mm;
}
.card table td.small {
width: 1%;
white-space: nowrap;
}
.card table tr.foot-small td {
font-size: 0.9em;
padding-top: 1.2mm;
padding-bottom: 1.2mm;
}
.card table tr td .small {
font-size: 0.9em;
}
.card table tfoot tr.foot-small td {
font-size: 0.9em;
padding-top: 0.9mm;
padding-bottom: 0.9mm;
}
.card table tr th {
line-height: 1.2em;
padding-bottom: 1mm;
padding-left: 1mm;
padding-right: 1mm;
background-color: rgb(227, 227, 227);
text-align: left;
}
.card table td .title {
}
.card table td .description {
padding-top: 1mm;
}
.card table td .price_net {
padding-top: 1mm;
font-size: 10pt;
padding-bottom: 1mm;
}
.card table td .price_tax {
padding-top: 0.7mm;
padding-bottom: 0.7mm;
}
.singel-line-top {
border-top: 1pt solid #1a1a18;
}
.double-line {
border-bottom: 2.5pt double #1a1a18;
}
.dotted-line {
border-bottom: 0.8pt dotted #1a1a18;
}
#footer_box {
position: relative;
top:5mm;
left: 15mm;
width: 180mm;
height: 20mm;
z-index: 6;
text-align: left;
}
.text-right {
text-align: right;
}
.text-left {
text-align: left;
}
.text-center {
text-align: center;
}
.no-line-break {
white-space: nowrap;
}
.td-entry-table-margin {
padding-bottom: 6px;
border-bottom: 1px solid rgb(221, 221, 221);
margin-bottom: 6px;
}
div.card-header {
border-bottom: none;
}
.user-view-table tr:first-child td {
border-top: none;
}
.user-view-table tr:first-child td {
border-top: none;
}
.table th, .table td {
border-top: none;
}
.table tbody th, .table tbody td {
border-bottom: 1px solid #d6d6de;
}
.card hr {
border-color: #d7d700;
margin: 6mm 0;
}
.user-view-table tr td:first-child {
width: 40mm;
}
.badge {
display: inline-block;
padding: 0.1em 0.5em;
font-size: 0.85em;
font-weight: 500;
line-height: 1;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: 0.125rem;
}
.badge-primary {
background-color: #b5c49b;
color: #484e3e;
}
.badge-secondary {
background-color: #d7d700;
color: #565600;
}
.badge-info {
background-color: #28c3d7;
color: #fff;
}
.badge-outline-success {
background-color: #fff;
border-color: #64bc40;
color: #64bc40;
border-radius: 0.125rem;
border: 1px solid #64bc40;
}
.badge-outline-info {
background-color: #fff;
border-color: #28c3d7;
color: #28c3d7;
border-radius: 0.125rem;
border: 1px solid #28c3d7;
}
.badge-outline-warning-dark {
background-color: #fff;
border-color: #FFD950;
color: #FFD950;
border-radius: 0.125rem;
border: 1px solid #FFD950;
}
.badge-outline-dark {
background-color: #fff;
border-color: #292b2d;
color: #292b2d;
border-radius: 0.125rem;
border: 1px solid #292b2d;
}
.font-weight-bolder {
font-weight: 700;
}
.text-dark {
color: #1a1a18;
}
.table-striped tbody tr:nth-of-type(odd) {
background-color: rgba(24, 28, 33, 0.025);
}
.page-break {
page-break-inside: avoid;
}
.page-break-always {
page-break-before: always;
}
</style>
</head>
<body>
<main>
<div id="pdf-page">
<div class="card" style="background-color: transparent;">
<h3 class="card-header" style="background-color: transparent;">
Auszahlungen Details
<br>
{{ __('pdf.credit_note') }} | {{ $user_credit->date }} | {{ $user_credit->full_number }} |
{{ $user_credit->user->account->first_name }} {{ $user_credit->user->account->last_name }}
({{ $user_credit->user->email }})
</h3>
@foreach ($dates as $date => $dateObj)
@if (isset($collection->calc_bot[$date]))
@php($cbot = $collection->calc_bot[$date])
<div class="card-header">
<table class="table user-view-table m-0">
<tbody>
<tr>
<td>{{ __('team.date') }}:</td>
<td>
<strong> {{ HTMLHelper::getMonth($cbot->date->month) }}
{{ $cbot->date->year }}</strong> | {{ __('team.completed') }}
@if ($cbot->business_user->isSave())
<span class="badge badge-outline-success"><i class="fa fa-check-circle"></i></span>
@else
<span class="badge badge-outline-warning-dark"><i class="fa fa-times"></i></span>
@endif
</td>
</tr>
<tr>
<td>{{ __('team.career_level') }}:</td>
<td>
{{ \App\Services\TranslationHelper::transUserLevelName($cbot->business_user->user_level_name) }}
&nbsp;
<span class="badge badge-outline-success"> {{ __('team.KU') }}
{{ $cbot->business_user->qual_kp }} / {{ __('team.PP') }}
{{ formatNumber($cbot->business_user->qual_pp, 0) }}</span>
</td>
</tr>
<tr>
<td>{{ __('team.shop_commission') }}:</td>
<td>
{{ $cbot->business_user->margin_shop }} %
</td>
</tr>
<tr>
<td>{{ __('team.consultant_margin') }}:</td>
<td>
{{ $cbot->business_user->margin }} %
</td>
</tr>
<tr>
<td><strong>{{ __('team.commission_total') }}:</strong></td>
<td>
<span class="badge badge-secondary" style="font-size: 1em;"><strong>{{ formatNumber($cbot->business_user->getCommissionTotal()) }} &euro;</strong></span>
</td>
</tr>
</tbody>
</table>
</div>
<hr>
@endif
{{-- Eigene Marge --}}
@if (isset($collection->own_order[$date]))
<div class="page-break">
@php($order = $collection->own_order[$date])
@if (isset($cbot))
<div class="card-header">
<table class="table user-view-table m-0">
<tbody>
<tr>
<td>
<strong>{{ __('team.own') }} {{ __('tables.margin') }} </strong>
</td>
<td>
<span class="badge badge-info"
style="font-size: 1em;"><strong>
{{ formatNumber($cbot->business_user->getSalesVolumeTotalMargin()) }}
&euro;</strong></span>
&nbsp;
({{ __('team.net_turnover') }}:
{{ formatNumber($cbot->business_user->sales_volume_total) }} &euro; /
{{ $cbot->business_user->margin }} %)
<br>
<em>{{ __('team.consultant_margin_info') }}</em>
</td>
</tr>
</tbody>
</table>
</div>
@endif
<div class="card-body table-responsive pt-0 pb-0">
<table class="datatables-style table table-striped ">
<thead>
<tr>
<th>#</th>
<th>{{ __('Datum') }}</th>
<th>{{ __('Typ') }}</th>
<th>{{ __('Umsatz netto') }}</th>
<th>{{ __('tables.points') }}</th>
<th>{{ __('für') }}</th>
<th>{{ __('VE') }}</th>
<th>{{ __('Bestellung') }}</th>
</tr>
</thead>
<tbody>
@foreach ($order->user_sales_volumes as $user_sales_volume)
<tr>
<td>{{ $user_sales_volume->id }}</td>
<td>{{ $user_sales_volume->date }}</td>
<td>{{ $user_sales_volume->getStatusType() }}</td>
<td>{{ formatNumber($user_sales_volume->total_net) }} &euro;</td>
<td>{{ $user_sales_volume->getFormattedPoints() }}</td>
<td>{{ $user_sales_volume->getStatusPointsType() }}</td>
<td>{{ $user_sales_volume->getStatusTurnoverType() }}</td>
<td>
{{ $user_sales_volume->shopping_order_id }}
@if ($user_sales_volume->shopping_order)
<br><span
class="small">{{ $user_sales_volume->shopping_order->getShoppingUserFullName() }}</span>
@endif
</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<td colspan="3" class="text-right"> {{ __('tables.total') }} </td>
<td><strong>{{ formatNumber($order->credit_total_net) }} &euro;</strong></td>
<td><strong>{{ $order->credit_total_points }}</strong></td>
<td colspan="3"></td>
</tr>
</tfoot>
</table>
</div>
<hr>
</div>
@endif
{{-- Provision Shop --}}
@if (isset($collection->commission_shop[$date]))
<div class="page-break">
@php($cs = $collection->commission_shop[$date])
@if (isset($cbot))
<div class="card-header">
<table class="table user-view-table m-0">
<tbody>
<tr>
<td>
<strong>{{ __('team.commission_shop') }}</strong>
</td>
<td>
<span class="badge badge-primary"
style="font-size: 1em;"><strong>{{ formatNumber($cbot->business_user->commission_shop_sales) }}
&euro;</strong></span>
&nbsp;
({{ __('team.sales_store_net') }}:
{{ formatNumber($cbot->business_user->sales_volume_total_shop) }} &euro; /
{{ $cbot->business_user->margin_shop }} %)
</td>
</tr>
</tbody>
</table>
</div>
@endif
<div class="card-body table-responsive pt-0 pb-0">
<table class="datatables-style table table-striped ">
<thead>
<tr>
<th>#</th>
<th>{{ __('Datum') }}</th>
<th>{{ __('Typ') }}</th>
<th>{{ __('Umsatz netto') }}</th>
<th>{{ __('tables.points') }}</th>
<th>{{ __('für') }}</th>
<th>{{ __('VE') }}</th>
<th>{{ __('Bestellung') }}</th>
</tr>
</thead>
<tbody>
@foreach ($cs->user_sales_volumes as $user_sales_volume)
<tr>
<td>{{ $user_sales_volume->id }}</td>
<td>{{ $user_sales_volume->date }}</td>
<td>{{ $user_sales_volume->getStatusType() }}</td>
<td>{{ formatNumber($user_sales_volume->total_net) }} &euro;</td>
<td>{{ $user_sales_volume->getFormattedPoints() }}</td>
<td>{{ $user_sales_volume->getStatusPointsType() }}</td>
<td>{{ $user_sales_volume->getStatusTurnoverType() }}</td>
<td>
{{ $user_sales_volume->shopping_order_id }}
@if ($user_sales_volume->shopping_order)
<br><span
class="small">{{ $user_sales_volume->shopping_order->getShoppingUserFullName() }}</span>
@endif
</td>
</tr>
@endforeach
@if (isset($collection->commission_credit[$date]))
@php($ccredits = $collection->commission_credit[$date])
@foreach ($ccredits as $credit)
<tr>
<td>{{ $credit->id }}</td>
<td>{{ $credit->date }}</td>
<td>{{ $credit->getStatusType() }}</td>
<td>{{ formatNumber($credit->total_net) }} &euro;</td>
<td>({{ $credit->points }}) -</td>
<td>{{ $credit->getStatusPointsType() }}</td>
<td>{{ $credit->getStatusTurnoverType() }}</td>
<td>{{ $credit->info }}</td>
</tr>
@endforeach
@endif
</tbody>
<tfoot>
<tr>
<td colspan="3" class="text-right"> {{ __('tables.total') }} </td>
<td><strong>{{ formatNumber($cs->user_sales_volumes_total->month_shop_total_net) }}
&euro;</strong></td>
<td><strong>{{ $cs->user_sales_volumes_total->month_shop_points }}</strong></td>
<td colspan="3"></td>
</tr>
</tfoot>
</table>
</div>
<hr>
</div>
@endif
{{-- Points Registration
@if (isset($collection->commission_registration[$date]))
<div class="page-break">
@php($cr = $collection->commission_registration[$date])
<div class="card-header">
<table class="table user-view-table m-0">
<tbody>
<tr>
<td colspan="2">
<strong>{{ __('tables.points') }} {{ __('payment.registration') }}</strong>
</td>
</tr>
</tbody>
</table>
</div>
<div class="card-body table-responsive pt-0 pb-0">
<table class="datatables-style table table-striped ">
<thead>
<tr>
<th>#</th>
<th>{{ __('Datum') }}</th>
<th>{{ __('Typ') }}</th>
<th>{{ __('tables.points') }}</th>
<th>{{ __('für') }}</th>
<th>{{ __('VE') }}</th>
<th>{{ __('Info') }}</th>
</tr>
</thead>
<tbody>
@foreach ($cr->user_sales_volumes as $user_sales_volume)
<tr>
<td>{{ $user_sales_volume->id }}</td>
<td>{{ $user_sales_volume->date }}</td>
<td>{{ $user_sales_volume->getStatusType() }}</td>
<td>{{ $user_sales_volume->getFormattedPoints() }}</td>
<td>{{ $user_sales_volume->getStatusPointsType() }}</td>
<td>{{ $user_sales_volume->getStatusTurnoverType() }}</td>
<td>{{ $user_sales_volume->info }}</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<td colspan="3" class="text-right"> {{ __('tables.total') }} </td>
<td><strong>{{ $cr->credit_total_points }}</strong></td>
<td colspan="4"></td>
</tr>
</tfoot>
</table>
</div>
<hr>
</div>
@endif
--}}
@if (isset($cbot))
{{-- Gesamt
<div class="page-break">
<div class="card-header">
<table class="table user-view-table m-0">
<tbody>
<tr>
<td colspan="2">
<strong>{{ __('tables.total') }} </strong>
</td>
</tr>
<tr>
<td>{{ __('team.net_turnover') }}:</td>
<td>
<strong>{{ formatNumber($cbot->business_user->sales_volume_total_sum) }} &euro;</strong>
({{ __('team.own') }}: {{ formatNumber($cbot->business_user->sales_volume_total) }} &euro; | {{ __('team.shop') }}: {{ formatNumber($cbot->business_user->sales_volume_total_shop) }} &euro;)
</td>
</tr>
<tr>
<td>{{ __('team.customer_points') }}:</td>
<td>
<strong>{{ formatNumber($cbot->business_user->sales_volume_points_KP_sum, 0) }} {{ __('team.KU') }}</strong>
({{ __('team.own') }}: {{ formatNumber($cbot->business_user->sales_volume_KP_points, 0) }} | {{ __('team.shop') }}: {{ formatNumber($cbot->business_user->sales_volume_points_shop, 0) }})
&nbsp; <span class="badge {{ $cbot->business_user->isQualKP() ? 'badge-outline-success' : 'badge-outline-warning-dark' }}"> {{ __('team.KU') }} {{ $cbot->business_user->qual_kp }}</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
}}
{{-- Payline Points / Provision / Tiefenbonus
<div class="page-break">
<div class="card-header">
<table class="table user-view-table m-0">
<tbody>
@if($cbot->business_user->version == 2)
<tr>
<td>{{ __('team.payline_points') }}:</td>
<td>
<strong>{{ formatNumber($cbot->business_user->payline_points, 0) }} {{ __('team.PP') }}</strong>
</td>
</tr>
<tr>
<td>{{ __('team.qualification_points') }} :</td>
<td>
<strong>{{ formatNumber($cbot->business_user->payline_points_qual_kp, 0) }} {{ __('team.PP') }}</strong> (+ {{ __('team.volume_KU') }})
</td>
</tr>
<tr>
<td>{{ __('team.current_commission_level') }}:</td>
<td>
@if($cbot->business_user->isQualLevel())
<span class="badge {{ $cbot->business_user->isQualEqualLevel() ? 'badge-outline-success' : 'badge-outline-info' }}">
{{ __('team.KU') }} {{ formatNumber($cbot->business_user->sales_volume_points_KP_sum, 0) }} /
<strong>{{ formatNumber($cbot->business_user->qual_user_level['qual_kp'], 0) }}</strong> |
{{ __('team.PP') }} {{ formatNumber($cbot->business_user->payline_points_qual_kp, 0) }} /
<strong>{{ formatNumber($cbot->business_user->qual_user_level['qual_pp'], 0) }}</strong>
| {{ \App\Services\TranslationHelper::transUserLevelName($cbot->business_user->qual_user_level['name']) }}</span>
@endif
</td>
</tr>
<tr>
<td><strong>{{ __('team.commission_payline') }}:</strong></td>
<td>
<span class="badge badge-primary" style="font-size: 1em;"><strong>{{ formatNumber($cbot->business_user->commission_pp_total) }} &euro;</strong></span>
</td>
</tr>
<tr>
<td><strong>{{ __('team.commission_WB') }}:</strong></td>
<td>
<span class="badge badge-primary" style="font-size: 1em;"><strong>{{ formatNumber($cbot->business_user->commission_growth_total) }} &euro;</strong></span>
</td>
</tr>
@endif
</tbody>
</table>
</div>
<div class="card-body table-responsive pt-0 pb-0">
<table class="datatables-style table table-striped ">
<thead>
<tr>
<th>{{__('tables.line')}}</th>
<th>{{__('tables.points')}}</th>
<th>{{__('tables.commission')}} %</th>
<th>{{__('tables.commission')}} &euro;</th>
</tr>
</thead>
<tbody>
@foreach ($cbot->business_user->business_lines as $line => $object)
<tr>
<td>
@if($line <= $cbot->business_user->getQualLevelPaylines())
<div class="font-weight-bolder line-height-1 my-2 text-dark badge badge-outline-success">{{ $line }}. {{ __('team.PP') }}</div>
@elseif($line <= $cbot->business_user->isQualLevelGrowth($line))
<div class="font-weight-bolder line-height-1 my-2 text-dark badge badge-outline-warning-dark">{{ $line }}. {{ __('team.WB') }}</div>
@else
<div class="font-weight-bolder line-height-1 my-2 text-dark badge badge-outline-dark">{{ $line }}.</div>
@endif
</td>
<td>{{ formatNumber($cbot->getKeybyLine($line, 'points'), 0) }}</td>
<td>{{ formatNumber($cbot->getKeybyLine($line, 'margin'), 1) }} %</td>
<td>{{ formatNumber($cbot->getKeybyLine($line, 'commission'), 2) }} &euro;</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<td>{{__('tables.total')}}</td>
<td>{{ formatNumber($cbot->business_user->total_pp, 0) }}</td>
<td></td>
<td><strong>{{ formatNumber($cbot->business_user->commission_pp_total, 2) }} &euro;</strong></td>
</tr>
</tfoot>
</table>
</div>
<hr>
--}}
<div class="card-body table-responsive pt-0 pb-0">
<table class="datatables-style table table-striped ">
<thead>
<tr>
<th>{{__('tables.line')}}</th>
<th>{{ __('shop.name') }}</th>
<th>{{ __('tables.email') }}</th>
<th>{{ __('tables.level') }}</th>
<th>{{__('tables.points')}}</th>
<th>{{__('tables.net_sales')}}</th>
</tr>
</thead>
<tbody>
{!! \App\Services\BusinessPlan\SalesPointsVolumeHelper::getBusinessUsersTable($cbot->business_users, 'line') !!}
</tbody>
</table>
</div>
</div>
@endif
@endforeach
</div>
</div>
</main>
<script type="text/php">
if (isset($pdf)) {
$font = null;
$size = 8;
$color = array(0,0,0);
$word_space = 0.0; // default
$char_space = 0.0; // default
$angle = 0.0; // default
$text = "{PAGE_NUM} / {PAGE_COUNT}";
$y = $pdf->get_height() - 40;
$x = $pdf->get_width() - 45;
$pdf->page_text($x, $y, $text, $font, $size, $color, $word_space, $char_space, $angle);
}
</script>
</body>
</html>