<?php $__env->startSection('title','Payout Invoice'); ?>
<?php $__env->startSection('subtitle',$payout->reference); ?>
<?php $__env->startSection('content'); ?>
<div class="invoice-actions">
    <a href="<?php echo e(route('disbursements')); ?>">
        <i data-lucide="arrow-left"></i>Back to payouts </a>
    <div>
        <a href="<?php echo e(route('disbursements.proof',$payout)); ?>">
            <i data-lucide="paperclip"></i>Download proof </a>
        <button onclick="window.print()">
            <i data-lucide="printer"></i>Print invoice </button>
    </div>
</div>
<article class="invoice-sheet">
    <header>
        <img src="<?php echo e(asset('images/desxpert-logo.png')); ?>" alt="Desxpert">
        <div>
            <b>PAYOUT INVOICE</b>
            <strong><?php echo e($payout->reference); ?></strong>
            <span><?php echo e($payout->paid_at?->format('M d, Y g:i A')); ?></span>
        </div>
    </header>
    <section class="invoice-party">
        <div>
            <small>PAYMENT TO</small>
            <h2><?php echo e($payout->professional?->user?->profile?->full_name); ?></h2>
            <p><?php echo e($payout->professional?->profession?->name); ?></p>
            <p><?php echo e($payout->professional?->user?->email); ?></p>
        </div>
        <div>
            <small>STATUS</small>
            <span class="payout-status paid">
                <i></i>Paid </span>
        </div>
    </section>
    <table>
        <thead>
            <tr>
                <th>Booking</th>
                <th>Client</th>
                <th>Consultation date</th>
                <th>Gross</th>
                <th>Desxpert fee</th>
                <th class="amount-column">Net payout</th>
            </tr>
        </thead>
        <tbody><?php $__currentLoopData = $payout->bookings; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $booking): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr>
                <td>#<?php echo e(strtoupper(substr($booking->uuid,0,8))); ?></td>
                <td><?php echo e($booking->client?->profile?->full_name??'Client'); ?></td>
                <td><?php echo e($booking->date?->format('M d, Y')??'On-demand'); ?></td>
                <td>₱<?php echo e(number_format($booking->amount,2)); ?></td>
                <td>₱<?php echo e(number_format($booking->platform_fee_amount??0,2)); ?></td>
                <td class="amount-column">₱<?php echo e(number_format($booking->payoutAmount(),2)); ?></td>
            </tr><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody>
    </table>
    <footer>
        <div>
            <small>PROOF OF PAYMENT</small>
            <p><?php echo e($payout->proof_original_name); ?></p>
        </div>
        <div>
            <span>Total payout</span>
            <strong>₱<?php echo e(number_format($payout->amount,2)); ?></strong>
        </div>
    </footer>
</article>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/dev/desxpert-admin/resources/views/admin/payout-invoice.blade.php ENDPATH**/ ?>