@extends('admin.main')
@section('content')
<style>
    .previewImage {
        height: 150px;
        width: 95%;
        overflow: hidden;
        object-fit: contain;
    }
</style>
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
    <h1>
        Commission
        <!-- <small>Optional description</small> -->
    </h1>
    <ol class="breadcrumb">
        <li><a href="{{ url ('admin') }}"><i class="fa fa-dashboard"></i> Dashboard</a></li>
        <li class="active"> Reports</li>
        <li class="active"> Commission</li>
    </ol>
    </section>

    <!-- Main content -->
    <section class="content container-fluid">
        <div class="row">
            <div class="col-md-12">
                <div class="box">
                    <div class="box-header with-border">
                       <h4 class="box-title">Commission</h4>
                    </div>
                    <div class="box-body">
                        <div class="row">
                            <div class="col-md-3">
                                <div class="form-group">
                                    <label class="control-label">Filter By Store</label>
                                    <div id="store_filter"></div>
                                </div>
                            </div>
                            <div class="col-md-12">
                                
                                <table class="table table-bordered table-condensed nowrap" id="tbl_commission">
                                    <thead>
                                        <tr>
                                            <th>Teamstore</th>
                                            <th>Invoice No.</th>
                                            <th>Total</th>
                                            <th>Subtotal</th>
                                            <th>Tax</th>
                                            <th>Currency</th>
                                            <th>Commission Rate</th>
                                            <th>25%</th>
                                            <th>5%</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        @foreach($array_commission as $c)
                                            <tr>
                                                <td>{{ $c->StoreName }}</td>
                                                <td><a href="{{ url('admin/orders/view') . '/' . $c->CartKey }}">{{ $c->InvoiceNumber }}</a></td>
                                                <td>{{ $c->Total }}</td>
                                                <td>{{ $c->SubTotal }}</td>
                                                <td>{{ $c->Tax }}</td>
                                                <td>{{ $c->Currency }}</td>
                                                <td>{{ $c->commission_rate }}</td>
                                                <td>{{ $c->twenty_five_percent }}</td>
                                                <td>{{ $c->five_percent }}</td>
                                            </tr>
                                        @endforeach
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <!-- /.content -->
</div>
<div class="modal fade" id="modal_store_order_details" role="dialog">
    <div class="modal-dialog modal-lg">

        <!-- Modal content-->
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">Order Details</h4>
            </div>
            <div class="modal-body">
                <div id="modal_store_order_details_body_content">
                    <p> Loading content <i class="fa fa-spinner fa-spin"></i> </p>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>
@endsection