Work to invoice
This commit is contained in:
parent
224bf9e951
commit
02e78e7255
101 changed files with 23483 additions and 154 deletions
|
|
@ -3,15 +3,14 @@
|
|||
<!-- Status -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6 mb-1">
|
||||
<div class="col-md-4 mb-1">
|
||||
<strong class="mr-2">Status:</strong>
|
||||
<span class="text-big">
|
||||
{!! \App\Services\Payment::getShoppingOrderBadge($shopping_order); !!}
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-6 mb-1">
|
||||
<div class="col-md-4 mb-1">
|
||||
<strong class="mr-2">Versand:</strong>
|
||||
|
||||
@if($isAdmin)
|
||||
<button type="button" class="btn btn-sm btn-{{$shopping_order->getShippedColor()}}" data-toggle="modal" data-target="#modals-shipped"
|
||||
data-id="{{ $shopping_order->id }}"
|
||||
|
|
@ -26,6 +25,29 @@
|
|||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-md-4 mb-1">
|
||||
<strong class="mr-2">Rechnung:</strong>
|
||||
@if($isAdmin)
|
||||
@if(App\Services\Invoice::isInvoice($shopping_order))
|
||||
<a href="{{ route('storage_file', [$shopping_order->id, 'invoice', 'download']) }}" class="btn btn-primary btn-sm"><i class="fa fa-download"></i></a>
|
||||
<a href="{{ route('storage_file', [$shopping_order->id, 'invoice', 'stream']) }}" target="_blank" class="btn btn-warning btn-sm"><i class="fa fa-eye"></i></a>
|
||||
@else
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-invoice"
|
||||
data-id="{{ $shopping_order->id }}"
|
||||
//TODO
|
||||
// data-invoice="{{ $shopping_order->invoice_status }}"
|
||||
data-back="{{url()->current()}}"
|
||||
data-action="create_invoice">
|
||||
<span class="far fa-file-invoice"></span> <strong>Rechnung erstellen</strong>
|
||||
</button>
|
||||
@endif
|
||||
@else
|
||||
@if(App\Services\Invoice::isInvoice($shopping_order))
|
||||
<a href="{{ route('storage_file', [$shopping_order->id, 'invoice', 'download']) }}" class="btn btn-primary btn-sm"><i class="fa fa-download"></i></a>
|
||||
<a href="{{ route('storage_file', [$shopping_order->id, 'invoice', 'stream']) }}" target="_blank" class="btn btn-warning btn-sm"><i class="fa fa-eye"></i></a>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -587,7 +609,6 @@
|
|||
<label class="form-label" for="shipped">{{ __('Versand') }}</label>
|
||||
{{ Form::select('shipped', \App\Models\ShoppingOrder::$shippedTypes, $shopping_order->shipped, array('data-live-search'=>'false', 'class'=>'selectpicker') ) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||
|
|
@ -596,7 +617,38 @@
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="modals-invoice">
|
||||
<div class="modal-dialog">
|
||||
<form class="modal-content" action="{{ route('admin_sales_invoice') }}" method="post">
|
||||
@csrf
|
||||
<input type="hidden" name="id" value="{{$shopping_order->id}}">
|
||||
<input type="hidden" name="action" value="create_invoice">
|
||||
<input type="hidden" name="back" value="{{url()->current()}}">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{{__('Rechnung')}}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group col-sm-12">
|
||||
{{ Form::select('invoice_option', ['create'=>'Rechnung erstellen'], false, array('data-live-search'=>'false', 'class'=>'selectpicker') ) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="invoice_date">{{ __('Rechnungsdatum') }}</label>
|
||||
{!! Form::text('invoice_date', $shopping_order->created_at->format("d.m.Y"), ['class'=>'form-control datepicker-base']) !!}
|
||||
</div>
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="invoice_number">{{ __('Rechnungsnummer') }}</label>
|
||||
{!! Form::text('invoice_number', App\Services\Invoice::getInvoiceNumber(), ['class'=>'form-control']) !!}
|
||||
<em> nächste Rechnungsnummer <a href="{{ route('admin_settings') }}"><i class="fa fa-edit"></i></a></em>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="modals-txaction">
|
||||
<div class="modal-dialog">
|
||||
<form class="modal-content" action="{{ route('admin_sales_store') }}" method="post">
|
||||
|
|
@ -615,7 +667,6 @@
|
|||
<label class="form-label" for="txaction">{{ __('Zahlung') }}</label>
|
||||
{{ Form::select('txaction', \App\Services\Payment::$txaction_invoice, 'open', array('data-live-search'=>'false', 'class'=>'selectpicker') ) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue