Gutschriften manuell hinzufügen, Yard 0& tax
This commit is contained in:
parent
e670b92f5d
commit
c02fffd883
24 changed files with 497 additions and 68 deletions
45
resources/views/admin/modal/add_credit.blade.php
Normal file
45
resources/views/admin/modal/add_credit.blade.php
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{!! Form::open(['url' => route('admin_payments_credit'), 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">
|
||||
{{ __('Gutschrift') }}
|
||||
<span class="font-weight-light">hinzufügen</span>
|
||||
</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="action" value="{{$data['action']}}">
|
||||
<input type="hidden" name="id" value="{{$data['id']}}">
|
||||
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-12">
|
||||
<label for="member_id" class="form-label">{{ __('Vertriebspartner auswählen') }}*</label>
|
||||
<select class="selectpicker" name="member_id" data-style="btn-light" data-live-search="true" required>
|
||||
{!! HTMLHelper::getMembersOptions(0, true) !!}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-12">
|
||||
<label class="form-label" for="credit">{{ __('Betrag') }} netto*</label>
|
||||
{{ Form::text('credit', '', array('placeholder'=>__('in Euro'), 'class'=>'form-control', 'required'=>true)) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-12">
|
||||
<label class="form-label" for="message">{{ __('Mitteilung') }}*</label>
|
||||
{{ Form::textarea('message', '' , array('placeholder'=>__('Mitteilung'), 'class'=>'form-control', 'rows'=>4, 'required'=>true)) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
|
||||
<button type="submit" class="btn btn-primary">{{__('Gutschrift hinzufügen')}}</button>
|
||||
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
|
||||
<script type="text/javascript">
|
||||
$( document ).ready(function() {
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
@ -20,12 +20,12 @@
|
|||
</div>
|
||||
|
||||
<div class="form-group col-12">
|
||||
<label class="form-label" for="credit">{{ __('Betrag') }}</label>
|
||||
<label class="form-label" for="credit">{{ __('Betrag') }}*</label>
|
||||
{{ Form::text('credit', '', array('placeholder'=>__('in Euro'), 'class'=>'form-control', 'required'=>true)) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-12">
|
||||
<label class="form-label" for="message">{{ __('Mitteilung') }}</label>
|
||||
<label class="form-label" for="message">{{ __('Mitteilung') }}*</label>
|
||||
{{ Form::textarea('message', '' , array('placeholder'=>__('Mitteilung'), 'class'=>'form-control', 'rows'=>4, 'required'=>true)) }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -46,7 +46,12 @@
|
|||
<td><a class="btn btn-secondary btn-xs" href="{{ route('admin_sales_users_detail', [$user_pay_credit->shopping_order_id]) }}"><i class="ion ion-md-eye"></i></a></td>
|
||||
@else
|
||||
@if($user_pay_credit->status === 3 && $deleteTime = $user_pay_credit->deleteTime())
|
||||
<td><div class="no-line-break"><a class="btn btn-danger btn-xs" href="{{ route('admin_payments_paycredit_delete', [$user_pay_credit->id]) }}"><i class="ion ion-ios-trash"></i></a> noch {{ $deleteTime }} min.</div>
|
||||
<td>
|
||||
<div class="no-line-break">
|
||||
<a class="btn btn-danger btn-xs" href="{{ route('admin_payments_paycredit_delete', [$user_pay_credit->id]) }}" onclick="return confirm('Wirklich löschen?');">
|
||||
<i class="ion ion-ios-trash"></i>
|
||||
</a> noch {{ $deleteTime }} min.
|
||||
</div>
|
||||
</td>
|
||||
@else
|
||||
<td>-</td>
|
||||
|
|
|
|||
|
|
@ -2,10 +2,37 @@
|
|||
|
||||
@section('content')
|
||||
|
||||
<style>
|
||||
.td-entry-table-margin {
|
||||
padding-bottom: 6px;
|
||||
border-bottom: 1px solid rgb(221, 221, 221);
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
</style>
|
||||
<div class="card">
|
||||
<h6 class="card-header">
|
||||
Zahlungen / offene Gutschriften
|
||||
|
||||
<div class="float-right">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="new"
|
||||
data-action="add-user-credit"
|
||||
data-back="{{url()->current()}}"
|
||||
data-route="{{ route('modal_load') }}"><span class="far fa-plus-circle"></span> Gutschrift hinzufügen
|
||||
</button>
|
||||
</div>
|
||||
</h6>
|
||||
|
||||
@if(isset($add_credit_error) && $add_credit_error)
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-danger p-2 mt-2">
|
||||
<ul>
|
||||
<li>{{ $add_credit_error }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="card-datatable table-responsive pt-0">
|
||||
<table class="datatables-style table table-striped table-bordered">
|
||||
<thead>
|
||||
|
|
@ -14,7 +41,7 @@
|
|||
<th>{{__('Nachname') }}</th>
|
||||
<th>{{__('E-Mail') }}</th>
|
||||
<th>{{__('Betrag') }}</th>
|
||||
<th>{{__('Aus Bestellung')}}</th>
|
||||
<th>{{__('aus Bestellung / Gutschrift')}}</th>
|
||||
<th>{{__('#')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
@ -24,19 +51,34 @@
|
|||
<td>{{ $ShoppingOrderMargin->first_name }}</td>
|
||||
<td>{{ $ShoppingOrderMargin->last_name }}</td>
|
||||
<td>{{ $ShoppingOrderMargin->email }}</td>
|
||||
<td>{!! \App\Services\UserMarign::getMontlyPartnerCommissionOpenByID($ShoppingOrderMargin->user_id, null, true) !!} €</td>
|
||||
<td>{!! \App\Services\UserMarign::getMontlyPartnerCommissionOpenByID($ShoppingOrderMargin->user_id, null, true, true) !!} €</td>
|
||||
<td>
|
||||
@foreach (\App\Services\UserMarign::getOrderFromPartnerCommissionByID($ShoppingOrderMargin->user_id) as $order)
|
||||
@if($order->shopping_order)
|
||||
<a href="{{ route('admin_sales_customers_detail', [$order->shopping_order->id]) }}">
|
||||
<div class="td-entry-table-margin"><a href="{{ route('admin_sales_customers_detail', [$order->shopping_order->id]) }}">
|
||||
{{$order->shopping_order->shopping_user->billing_firstname }}
|
||||
{{$order->shopping_order->shopping_user->billing_lastname }}
|
||||
/ {{ $order->shopping_order->getLastShoppingPayment('reference') }}
|
||||
/ {{ $order->shopping_order->getFormattedTotalWithoutCredit()." €" }}
|
||||
/ {{ $order->shopping_order->created_at->format("d.m.Y") }}
|
||||
</a> <br>
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
@foreach (\App\Services\UserMarign::getUserCreditMarginByID($ShoppingOrderMargin->user_id) as $creditMaring)
|
||||
<div class="td-entry-table-margin">
|
||||
<i class="fa fa-plus-circle text-secondary"></i>
|
||||
{!! nl2br($creditMaring->message) !!}
|
||||
/ {{ $creditMaring->created_at->format("d.m.Y") }}
|
||||
@if($deleteTime = $creditMaring->deleteTime())
|
||||
/ <span class="no-line-break">
|
||||
<a class="btn btn-danger btn-xs" href="{{ route('admin_payments_credit_delete', [$creditMaring->id, 'user_credit_margin']) }}" onclick="return confirm('Wirklich löschen?');">
|
||||
<i class="ion ion-ios-trash"></i>
|
||||
</a> noch {{ $deleteTime }} min.
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-credit"
|
||||
|
|
@ -49,6 +91,39 @@
|
|||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@foreach ($onlyUserCreditMargins as $user_id => $onlyUserCreditMargin)
|
||||
<tr>
|
||||
<td>{{ $onlyUserCreditMargin['first_name'] }}</td>
|
||||
<td>{{ $onlyUserCreditMargin['last_name'] }}</td>
|
||||
<td>{{ $onlyUserCreditMargin['email'] }}</td>
|
||||
<td>{!! formatNumber($onlyUserCreditMargin['sum']) !!} €</td>
|
||||
<td>
|
||||
@foreach ($onlyUserCreditMargin['entries'] as $key => $creditMaring)
|
||||
<div class="td-entry-table-margin">
|
||||
<i class="fa fa-plus-circle text-secondary"></i>
|
||||
{!! nl2br($creditMaring->message) !!}
|
||||
/ {{ $creditMaring->created_at->format("d.m.Y") }}
|
||||
@if($deleteTime = $creditMaring->deleteTime())
|
||||
/ <span class="no-line-break">
|
||||
<a class="btn btn-danger btn-xs" href="{{ route('admin_payments_credit_delete', [$creditMaring->id, 'user_credit_margin']) }}" onclick="return confirm('Wirklich löschen?');">
|
||||
<i class="ion ion-ios-trash"></i>
|
||||
</a> noch {{ $deleteTime }} min.
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-credit"
|
||||
data-userid="{{ $onlyUserCreditMargin['user_id'] }}"
|
||||
data-email="{{ $onlyUserCreditMargin['email'] }}"
|
||||
data-back="{{url()->current()}}"
|
||||
data-action="create_credit">
|
||||
<span class="far fa-file-invoice-dollar"></span> <strong>Gutschrift erstellen</strong>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -82,14 +157,15 @@
|
|||
<td>
|
||||
@foreach (\App\Services\UserMarign::getOrderFromPartnerCommissionPendingByID($ShoppingOrderMarginPending->user_id) as $order)
|
||||
@if($order->shopping_order)
|
||||
<div class="td-entry-table-margin"><a href="{{ route('admin_sales_customers_detail', [$order->shopping_order->id]) }}">
|
||||
<a href="{{ route('admin_sales_customers_detail', [$order->shopping_order->id]) }}">
|
||||
{{$order->shopping_order->shopping_user->billing_firstname }}
|
||||
{{$order->shopping_order->shopping_user->billing_lastname }}
|
||||
/ {{ $order->shopping_order->getLastShoppingPayment('reference') }}
|
||||
/ {{$order->shopping_order->getFormattedTotalWithoutCredit()." €" }}
|
||||
/ {{ $order->shopping_order->created_at->format("d.m.Y") }}
|
||||
|
||||
</a> <br>
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</td>
|
||||
|
|
@ -130,7 +206,7 @@
|
|||
<th>{{__('Betrag') }}</th>
|
||||
<th>{{__('Datum') }}</th>
|
||||
<th>{{__('Zahlung')}}</th>
|
||||
<th>{{__('aus Bestellung')}}</th>
|
||||
<th>{{__('aus Bestellung / Gutschrift')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
|||
|
|
@ -343,6 +343,17 @@
|
|||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
@foreach($user_credits->credits as $credit)
|
||||
<tr class="item">
|
||||
<td class="small text-left">
|
||||
{!! nl2br($credit->message) !!} / {{ $credit->created_at }}
|
||||
</td>
|
||||
<td class="text-right small">
|
||||
{{ \App\Services\Util::formatNumber($credit->net) }} €*
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="fullline">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue