Current File : //home/tradevaly/public_html/resources/views/user/pages/invoice/index.blade.php |
@extends('user.ayaan.master')
@push('title','Income Lists ')
@section('css')
<style>
.th-white-space th{
white-space: nowrap;
}
</style>
<!-- DataTables -->
<link href="{{ asset('/assets/libs/datatables/datatables.min.css') }}" rel="stylesheet" type="text/css"/>
@endsection
@section('content')
@component('components.breadcrumb')
@slot('li_1') Dashboards @endslot
@slot('title') My Invoice @endslot
@endcomponent
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="table-responsive">
<table class="table th-white-space" id="datatable-buttons">
<thead>
<tr>
<th class="text-center">#</th>
<th>Order Id</th>
<th>Transaction Type</th>
<th>Payment Method</th>
<th>Status</th>
<th>Discount</th>
<th>Amount</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@foreach ($transactions as $transaction)
<tr>
<td class="text-center">{{$loop->iteration}}</td>
<td>
{{ $transaction->order_id }}
</td>
<td>
{{ $transaction->order_from }} ({{ $transaction->order_status }} )
</td>
<td>
{{ $transaction->payment_method }}
</td>
<td>
<span class="badge bg-{{ $transaction->payment_status == 'paid' ? 'success' : ($transaction->payment_status == 'unpaid' ? 'warning' : 'danger') }}">{{ $transaction->payment_status }}</span>
</td>
<td>
Tk. {{ $transaction->discount_amount }}
</td>
<td>
Tk. {{ $transaction->total_amount }}
</td>
<td>
<!--<div class="btn-group" role="group" aria-label="Basic example">-->
@if(!empty($transaction->subscriber))
<a class="btn btn-info btn-sm d-block mb-2 btn-sm"
href="{{ route('user.subscription.invoice',$transaction->subscriber->id) }}">
Invoice
</a>
@if($transaction->subscriber->payment_status == 'paid')
<a style="white-space: nowrap;" class="btn btn-success mb-2 btn-sm d-block text-nowrap"
href="{{ route('user.subscription.money_receipt',$transaction->subscriber->id) }}">
Money Receipt
</a>
@endif
@endif
@if(!empty($transaction->advertiser))
<a class="btn btn-info btn-sm d-block mb-2 btn-sm"
href="{{ route('user.my.buy.advertiser.invoice_details',$transaction->advertiser->id) }}">
<i class="fa fa-download"></i> Invoice
</a>
@if($transaction->advertiser->payment_status == 'paid')
<a style="white-space: nowrap;" class="btn btn-success mb-2 btn-sm d-block text-nowrap" href="{{ route('user.my.buy.advertiser.money_receipt',$transaction->advertiser->id) }}">
<i class="fa fa-download"></i> Money Receipt
</a>
@endif
@endif
@if(!empty($transaction->order_from == "product"))
<a style="white-space: nowrap;" class="btn btn-info btn-sm d-block mb-2 btn-sm"
href="{{route('user.product.invoice',$transaction->order_id)}}">Invoice
</a>
@if($transaction->payment_status == 'paid')
<a style="white-space: nowrap;" class="btn btn-success mb-2 btn-sm d-block text-nowrap"
href="{{route('user.product.receipt',$transaction->order_id)}}">
<i class="fa fa-download"></i> Money Receipt
</a>
@endif
@endif
<!--</div>-->
</td>
<!-- <div class="btn-group btn-group-sm" role="group" aria-label="Basic example">-->
<!-- <a href="{{ route('admin.transaction.details',$transaction->id) }}" class="btn btn-primary"><i class="fas fa-eye"></i></a>-->
<!--<button type="button" class="btn btn-info"><i class="fas fa-envelope"></i></button>-->
<!-- </div>-->
<!--</td>-->
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- end row -->
@endsection
@section('script')
<!-- Required datatable js -->
<script src="{{ asset('/assets/libs/datatables/datatables.min.js') }}"></script>
<script src="{{ asset('/assets/libs/jszip/jszip.min.js') }}"></script>
<script src="{{ asset('/assets/libs/pdfmake/pdfmake.min.js') }}"></script>
<!-- Datatable init js -->
<script type="text/javascript">
$(function () {
$(document).ready(function () {
var table = $('#datatable-buttons').DataTable({
lengthChange: false,
processing: true,
dom: 'Bfrtip',
buttons: ['copy', 'excel', 'pdf', 'colvis']
});
table.buttons().container().appendTo('#datatable-buttons_wrapper .col-md-6:eq(0)');
$(".dataTables_length select").addClass('form-select form-select-sm');
});
});
</script>
@endsection