@extends('layouts.master')
@section('main-body')
<div class="row gutters">
    <div class="row">
        <div class="col-sm-12">
            <div class="card">
            <div class="card-body">
                <div>
                <div>
                    <div class="row invo-header">
                    <div class="col-sm-6">
                        <div class="media">
                        <div class="media-left"><a href="https://desxpert.com"><img class="media-object img-60" src="/assets/images/logo/favcon.png" alt=""></a></div>
                        <div class="media-body m-l-20">
                            <h4 class="media-heading f-w-600">Desxpert</h4>
                            <h6 class="media-heading f-w-300">support@desxpert.com</h6>
                            <h6 class="media-heading f-w-300">09351398223</h6>
                        </div>
                        </div>
                        <!-- End Info-->
                    </div>
                    <div class="col-sm-6">
                        <div class="text-md-end text-xs-center">
                        <h3>Payment Ref#: <span class="digits counter">{!! $disbursements['payout_ref'] !!}</span></h3>
                            <p>Issued: {!! date('M') !!}<span class="digits"> {!! date('d, Y') !!}</span><br>
                        </div>
                        <!-- End Title                                 -->
                    </div>
                    </div>
                </div>
                <!-- End InvoiceTop-->
                <div class="row invo-profile mt-5">
                    <div class="col-xl-4">
                    <div class="media">
                        <div class="media-body m-l-20">
                            <h4 class="media-heading f-w-600">
                                {!! $disbursements['professional']->profile->first_name.' '.$disbursements['professional']->profile->last_name!!}
                            </h4>
                            <h6>{!! $disbursements['professional']->user->email !!}</h6>
                            <h6>{!! $disbursements['professional']->profile->mobile_number !!}</h6>
                        </div>
                    </div>
                    </div>
                    <div class="col-xl-8">
                    <div class="text-xl-end" id="project">
                        <h6>Description</h6>
                        <p>Payments for approved and completed transactions.</p>
                    </div>
                    </div>
                </div>
                <!-- End Invoice Mid-->
                <div class="mt-4">
                    <div class="table-responsive invoice-table" id="table">
                    <table class="table table-bordered table-striped">
                        <tbody>
                        <tr>
                            <td class="item">
                                <h6 class="p-2 mb-0">Transactions</h6>
                            </td>
                            <td class="Hours">
                                <h6 class="p-2 mb-0">Professional Fee</h6>
                            </td>
                            <td class="Rate">
                                <h6 class="p-2 mb-0">Desxpert Fee</h6>
                            </td>
                            <td class="subtotal">
                                <h6 class="p-2 mb-0">Sub-total</h6>
                            </td>
                        </tr>
                        @foreach($disbursements['transactions'] as $transaction)
                        <tr>
                            <td>
                                <label>Invoice#: {!! $transaction->invoice !!}</label>
                            </td>
                            <td>
                                <p class="itemtext digits">{!! number_format($transaction->amount - $transaction->convenience_fee, 2) !!}</p>
                            </td>
                            <td>
                                <p class="itemtext digits">{!! number_format($transaction->desxpert_fee, 2) !!}</p>
                            </td>
                            <td>
                                <p class="itemtext digits">{!! number_format($transaction->professional_fee, 2) !!}</p>
                            </td>
                        </tr>
                        @endforeach
                        <tr>
                            <td></td>
                            <td></td>
                            <td class="Rate">
                            <h6 class="mb-0 p-2">Total</h6>
                            </td>
                            <td class="payment digits">
                            <h6 class="mb-0 p-2">{!! number_format($disbursements['total_amount'], 2) !!}</h6>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    </div>
                    <!-- End Table-->
                    <div class="row mt-3">
                        <div class="col-md-12">
                            <div>
                            <p class="legal"><strong>Thank you for your business!</strong></p>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- End InvoiceBot-->
                </div>
                <!-- End Invoice-->
                <!-- End Invoice Holder-->
            </div>
            </div>
        </div>
    </div>
</div>
@endsection
@section('page-script')

@endsection
