Steuerberater Modul tax
This commit is contained in:
parent
0f82fea88a
commit
245c281541
22 changed files with 1489 additions and 139 deletions
|
|
@ -1,111 +1,120 @@
|
|||
|
||||
<!-- Info -->
|
||||
<div class="card-body pb-1">
|
||||
<div class="row">
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('tables.start_date') }}</div>
|
||||
{{ $user_abo->start_date }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('tables.next_date') }}</div>
|
||||
<strong>{{ $user_abo->next_date }}</strong>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('tables.abo_delivery_day') }}</div>
|
||||
<strong>{{ \App\Services\HTMLHelper::getAboStrLang($user_abo->abo_interval) }}</strong>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('tables.last_date') }}</div>
|
||||
{{ $user_abo->last_date }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- Info -->
|
||||
<div class="card-body pb-1">
|
||||
<div class="row">
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('tables.start_date') }}</div>
|
||||
{{ $user_abo->start_date }}
|
||||
</div>
|
||||
<hr class="m-0">
|
||||
<div class="card-body pb-1">
|
||||
<div class="row">
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('tables.status') }} / {{ __('tables.active') }}</div>
|
||||
{!! $user_abo->getStatusFormated() !!} {!! get_active_badge($user_abo->active) !!}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('tables.abo_delivery') }}</div>
|
||||
{{ $user_abo->getCountPaidOrders() }} / {{ \App\Models\Setting::getContentBySlug('abo-min-duration') }}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('tables.payment') }}</div>
|
||||
{{ $user_abo->getPaymentType() }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('tables.amount') }}</div>
|
||||
<span class="text-nowrap" id="value-amount">{{ $user_abo->getFormattedAmount() }}</span> €
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('tables.next_date') }}</div>
|
||||
<strong>{{ $user_abo->next_date }}</strong>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('tables.abo_delivery_day') }}</div>
|
||||
<strong>{{ \App\Services\HTMLHelper::getAboStrLang($user_abo->abo_interval) }}</strong>
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('tables.last_date') }}</div>
|
||||
{{ $user_abo->last_date }}
|
||||
</div>
|
||||
|
||||
<hr class="m-0">
|
||||
@if($isAdmin)
|
||||
<div class="card-body pb-1">
|
||||
<div class="row">
|
||||
<div class="col-md-3 mb-3">
|
||||
<button type="button" class="btn btn-sm btn-secondary" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="{{ $user_abo->id }}"
|
||||
data-action="abo_update_settings"
|
||||
data-view="admin"
|
||||
data-route="{{ route('modal_load') }}"><span class="fa fa-edit"></span>{{ __('abo.abo_settings') }}</button>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 mb-3">
|
||||
@if(isset($user_abo->shopping_user) && $user_abo->shopping_user->member_id > 0)
|
||||
<div class="text-muted small">{{ __('tables.adviser') }}</div>
|
||||
{!! '<a href="'.route('admin_lead_edit', [$user_abo->shopping_user->member_id]).'">'.$user_abo->shopping_user->member->getFullName().'</a>' !!}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="m-0">
|
||||
<div class="card-body pb-1">
|
||||
<div class="row">
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('tables.status') }} / {{ __('tables.active') }}</div>
|
||||
{!! $user_abo->getStatusFormated() !!} {!! get_active_badge($user_abo->active) !!}
|
||||
@if ($user_abo->status === 3 && $user_abo->active)
|
||||
<button type="button" class="btn btn-sm btn-danger mt-3" data-toggle="modal"
|
||||
data-target="#modal-retry-abo-payment">
|
||||
<span class="fa fa-redo"></span> {{ __('abo.retry_payment') }}
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('tables.abo_delivery') }}</div>
|
||||
{{ $user_abo->getCountPaidOrders() }} / {{ \App\Models\Setting::getContentBySlug('abo-min-duration') }}
|
||||
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('tables.is_for') }}</div>
|
||||
{!! $user_abo->getIsForFormated() !!}
|
||||
@if($user_abo->is_for === 'me')
|
||||
<a class="btn btn-xs btn-secondary" href="{{ route('admin_lead_edit', $user_abo->user_id) }}"><i class="fa fa-edit"></i></a>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('tables.payment') }}</div>
|
||||
{{ $user_abo->getPaymentType() }}
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('tables.amount') }}</div>
|
||||
<span class="text-nowrap" id="value-amount">{{ $user_abo->getFormattedAmount() }}</span> €
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="m-0">
|
||||
@if ($isAdmin)
|
||||
<div class="card-body pb-1">
|
||||
<div class="row">
|
||||
<div class="col-md-3 mb-3">
|
||||
<button type="button" class="btn btn-sm btn-secondary" data-toggle="modal"
|
||||
data-target="#modals-load-content" data-id="{{ $user_abo->id }}" data-action="abo_update_settings"
|
||||
data-view="admin" data-route="{{ route('modal_load') }}"><span
|
||||
class="fa fa-edit"></span>{{ __('abo.abo_settings') }}</button>
|
||||
|
||||
@if($user_abo->is_for === 'ot')
|
||||
<a class="btn btn-xs btn-secondary" href="{{ route('admin_customer_edit', $user_abo->shopping_user->id) }}"><i class="fa fa-edit"></i></a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="card-body pb-1">
|
||||
<div class="row">
|
||||
<div class="col-md-6 mb-3">
|
||||
@if(App\Services\AboHelper::canEditAbo($user_abo, $view))
|
||||
<button type="button" class="btn btn-sm btn-secondary" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="{{ $user_abo->id }}"
|
||||
data-action="abo_update_settings"
|
||||
data-view="{{ $view }}"
|
||||
data-route="{{ route('modal_load') }}"><span class="fa fa-edit"></span>{{ __('abo.abo_settings') }}</button>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 mb-3">
|
||||
{!! $user_abo->getIsForFormated() !!}
|
||||
@if($user_abo->is_for === 'me')
|
||||
<a class="btn btn-xs btn-secondary" href="{{ route('user_edit') }}"><i class="fa fa-edit"></i></a>
|
||||
|
||||
@endif
|
||||
|
||||
@if($user_abo->is_for === 'ot')
|
||||
<a class="btn btn-xs btn-secondary" href="{{ route('user_customer_edit', $user_abo->shopping_user->id) }}"><i class="fa fa-edit"></i></a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
@if (isset($user_abo->shopping_user) && $user_abo->shopping_user->member_id > 0)
|
||||
<div class="text-muted small">{{ __('tables.adviser') }}</div>
|
||||
{!! '<a href="' .
|
||||
route('admin_lead_edit', [$user_abo->shopping_user->member_id]) .
|
||||
'">' .
|
||||
$user_abo->shopping_user->member->getFullName() .
|
||||
'</a>' !!}
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">{{ __('tables.is_for') }}</div>
|
||||
{!! $user_abo->getIsForFormated() !!}
|
||||
@if ($user_abo->is_for === 'me')
|
||||
<a class="btn btn-xs btn-secondary" href="{{ route('admin_lead_edit', $user_abo->user_id) }}"><i
|
||||
class="fa fa-edit"></i></a>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($user_abo->is_for === 'ot')
|
||||
<a class="btn btn-xs btn-secondary"
|
||||
href="{{ route('admin_customer_edit', $user_abo->shopping_user->id) }}"><i
|
||||
class="fa fa-edit"></i></a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="card-body pb-1">
|
||||
<div class="row">
|
||||
<div class="col-md-6 mb-3">
|
||||
@if (App\Services\AboHelper::canEditAbo($user_abo, $view))
|
||||
<button type="button" class="btn btn-sm btn-secondary" data-toggle="modal"
|
||||
data-target="#modals-load-content" data-id="{{ $user_abo->id }}"
|
||||
data-action="abo_update_settings" data-view="{{ $view }}"
|
||||
data-route="{{ route('modal_load') }}"><span
|
||||
class="fa fa-edit"></span>{{ __('abo.abo_settings') }}</button>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 mb-3">
|
||||
{!! $user_abo->getIsForFormated() !!}
|
||||
@if ($user_abo->is_for === 'me')
|
||||
<a class="btn btn-xs btn-secondary" href="{{ route('user_edit') }}"><i class="fa fa-edit"></i></a>
|
||||
@endif
|
||||
|
||||
@if ($user_abo->is_for === 'ot')
|
||||
<a class="btn btn-xs btn-secondary"
|
||||
href="{{ route('user_customer_edit', $user_abo->shopping_user->id) }}"><i
|
||||
class="fa fa-edit"></i></a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
|
|
|||
|
|
@ -41,9 +41,18 @@
|
|||
|
||||
<th>{{__('tables.rf_no')}}</th>
|
||||
</tr>
|
||||
@php
|
||||
$executionColspan = (!isset($only_show_products) || !$only_show_products) ? 13 : 12;
|
||||
@endphp
|
||||
@if($user_abo->user_abo_orders)
|
||||
@foreach($user_abo->user_abo_orders()->orderBy('id', 'desc')->get() as $user_abo_order)
|
||||
@if($user_abo_order->shopping_order)
|
||||
@php
|
||||
$paymentErrorTransaction = $user_abo_order->shopping_order->getLastShoppingPaymentTransaction();
|
||||
$hasPaymentError = ! $user_abo_order->paid
|
||||
&& $paymentErrorTransaction
|
||||
&& ($paymentErrorTransaction->errorcode || $paymentErrorTransaction->errormessage || $paymentErrorTransaction->customermessage);
|
||||
@endphp
|
||||
<tr class="border-top">
|
||||
<td>
|
||||
@if($isAdmin)
|
||||
|
|
@ -113,6 +122,25 @@
|
|||
{{ $user_abo_order->shopping_order->getLastShoppingPayment('reference') }}
|
||||
</td>
|
||||
</tr>
|
||||
@if($hasPaymentError)
|
||||
<tr>
|
||||
<td colspan="{{ $executionColspan }}" class="pt-0">
|
||||
<div class="alert alert-danger py-2 px-3 mb-2">
|
||||
<strong>{{ __('payment.payment_error') }}:</strong>
|
||||
@if($paymentErrorTransaction->errorcode)
|
||||
<span class="badge badge-danger">{{ $paymentErrorTransaction->errorcode }}</span>
|
||||
@endif
|
||||
{{ $paymentErrorTransaction->errormessage ?: $paymentErrorTransaction->customermessage }}
|
||||
@if($paymentErrorTransaction->error_description)
|
||||
<span class="text-muted">({{ $paymentErrorTransaction->error_description }})</span>
|
||||
@endif
|
||||
<div class="small text-muted mt-1">
|
||||
{{ $paymentErrorTransaction->created_at->format('d.m.Y H:i') }}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
|
|
|
|||
|
|
@ -25,6 +25,15 @@
|
|||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@if (Session::has('alert-success'))
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-success p-2 mt-2">
|
||||
<ul>
|
||||
<li>{{ Session::get('alert-success') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="card">
|
||||
@include('admin.abo._detail')
|
||||
</div>
|
||||
|
|
@ -39,10 +48,11 @@
|
|||
'action' => route('user_abos_update', [$view, $user_abo->id]),
|
||||
'class' => 'form-horizontal',
|
||||
'id' => 'cart-order-form',
|
||||
'data-add-only-mode' => '0',
|
||||
]) !!}
|
||||
<input type="hidden" name="is_for" value="{{ $user_abo->is_for }}">
|
||||
<div class="card mt-3">
|
||||
@include('admin.abo._order_abo')
|
||||
@include('admin.abo._order_abo', ['add_only_mode' => false])
|
||||
</div>
|
||||
|
||||
@if ($comp_products && Yard::instance('shopping')->getNumComp() > 0)
|
||||
|
|
@ -109,6 +119,51 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($user_abo->status === 3 && $user_abo->active)
|
||||
<div class="modal fade" id="modal-retry-abo-payment" tabindex="-1" role="dialog" aria-labelledby="modal-retry-abo-payment-label" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
{!! Form::open(['action' => route('admin_abos_retry_payment', [$user_abo->id])]) !!}
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modal-retry-abo-payment-label">{{ __('abo.retry_payment') }}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-warning">
|
||||
<strong>{{ __('abo.retry_payment_confirm_title') }}</strong><br>
|
||||
{{ __('abo.retry_payment_confirm_copy') }}
|
||||
</div>
|
||||
<table class="table table-sm mb-0">
|
||||
<tr>
|
||||
<td class="font-weight-bold">{{ __('navigation.abo') }}:</td>
|
||||
<td>#{{ $user_abo->id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font-weight-bold">{{ __('tables.payment') }}:</td>
|
||||
<td>{{ $user_abo->getPaymentType() }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font-weight-bold">{{ __('tables.amount') }}:</td>
|
||||
<td>{{ $user_abo->getFormattedAmount() }} €</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font-weight-bold">{{ __('tables.next_date') }}:</td>
|
||||
<td>{{ $user_abo->next_date }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ __('close') }}</button>
|
||||
<button type="submit" class="btn btn-warning">{{ __('abo.retry_payment_confirm_button') }}</button>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
|
|
|
|||
|
|
@ -23,8 +23,34 @@
|
|||
{!! HTMLHelper::getAboDeliveryOptions($user_abo->abo_interval) !!}
|
||||
</select>
|
||||
</div>
|
||||
@if($data['view'] === 'admin')
|
||||
@php
|
||||
$selectedNextMonth = $user_abo->getRawOriginal('next_date')
|
||||
? \Carbon\Carbon::parse($user_abo->getRawOriginal('next_date'))->format('Y-m')
|
||||
: now()->format('Y-m');
|
||||
@endphp
|
||||
<div class="col-sm-6">
|
||||
<label for="abo_next_month" class="form-label">{{ __('validation.attributes.month') }}*</label>
|
||||
<select class="custom-select" name="abo_next_month" id="abo_next_month" required>
|
||||
@foreach(range(0, 3) as $monthOffset)
|
||||
@php
|
||||
$executionMonth = now()->copy()->startOfMonth()->addMonths($monthOffset);
|
||||
@endphp
|
||||
<option value="{{ $executionMonth->format('Y-m') }}" @if($executionMonth->format('Y-m') === $selectedNextMonth) selected @endif>
|
||||
{{ \App\Services\HTMLHelper::getMonth($executionMonth->month) }} {{ $executionMonth->year }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@endif
|
||||
<div class="col-sm-12 mt-1">
|
||||
<i class="text-muted">{{ __('abo.abo_copy_abo_interval') }}</i>
|
||||
<i class="text-muted">
|
||||
@if($data['view'] === 'admin')
|
||||
{{ __('abo.admin_abo_copy_next_date') }}
|
||||
@else
|
||||
{{ __('abo.abo_copy_abo_interval') }}
|
||||
@endif
|
||||
</i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue