HEX
Server: LiteSpeed
System: Linux s3.sitechai.com 4.18.0-553.51.1.lve.1.el8.x86_64 #1 SMP Wed May 14 14:34:57 UTC 2025 x86_64
User: workzeni (2217)
PHP: 8.1.32
Disabled: mail, show_source, system, shell_exec, passthru, exec, eval, shell
Upload Files
File: /home/workzeni/agency-erp-05.workzenix.com/resources/views/admin/transaction/invoice.blade.php
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Invoice INV-{{ str_pad($transaction->id, 4, '0', STR_PAD_LEFT) }}</title>
    <style>
        @page {
            margin: 20px;
        }

        body {
            font-family: 'DejaVu Sans', sans-serif;
            color: #333;
            font-size: 12px;
            margin: 0;
            padding: 0;
            position: relative;
            min-height: 100%;
        }

        .invoice-container {
            width: 100%;
            padding: 10px 15px 60px;
            /* bottom space for footer */
            box-sizing: border-box;
        }

        .header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            border-bottom: 1px solid #ccc;
            padding-bottom: 8px;
            margin-bottom: 10px;
        }

        .header .left {
            max-width: 65%;
        }

        .header .right img {
            max-height: 50px;
        }

        .invoice-title {
            font-size: 16px;
            font-weight: bold;
        }

        .section {
            margin-bottom: 12px;
        }

        .section h3 {
            font-size: 14px;
            margin: 0 0 5px;
            border-bottom: 1px solid #ccc;
            padding-bottom: 3px;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 6px;
        }

        table th,
        table td {
            border: 1px solid #ddd;
            padding: 6px;
            text-align: left;
            vertical-align: top;
        }

        .text-right {
            text-align: right;
        }

        .note {
            background: #f5f5f5;
            padding: 8px;
            border-left: 3px solid #999;
            font-size: 12px;
        }

        .footer {
            position: absolute;
            bottom: 10px;
            left: 0;
            right: 0;
            width: 100%;
            font-size: 10px;
            color: #666;
            text-align: center;
            border-top: 1px solid #ccc;
            padding-top: 5px;
        }

        .qr-code {
            margin-top: 10px;
            text-align: right;
        }

        /* Container for QR code with logo overlay */
        .qr-code-container {
            position: relative;
            width: 150px;
            height: 150px;
            margin-top: 10px;
            margin-left: auto;
        }

        .qr-code-container img.qr-image {
            width: 150px;
            height: 150px;
            display: block;
        }

        .qr-code-container img.logo-overlay {
            position: absolute;
            top: 50%;
            left: 50%;
            width: 40px;
            height: 40px;
            transform: translate(-50%, -50%);
            pointer-events: none;
            border-radius: 8px;
            background: white;
            padding: 2px;
            box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
        }

        .qr-label {
            font-size: 10px;
            margin-top: 3px;
            text-align: right;
        }
    </style>
</head>

<body>

    <div class="invoice-container">

        {{-- Header --}}
        <div class="header">
            <div class="right">
                @if (!empty($transaction->agency->logo))
                    <img src="{{ public_path($transaction->agency->logo) }}" alt="{{ $transaction->agency->name }}">
                @endif
            </div>
            <div class="left">
                <div class="invoice-title">Transaction Invoice</div>
                <div>Date: {{ \Carbon\Carbon::parse($transaction->created_at)->format('d M Y') }}</div>
                <div>Invoice ID: INV-{{ str_pad($transaction->id, 4, '0', STR_PAD_LEFT) }}</div>
            </div>
        </div>

        {{-- Agency Info --}}
        <div class="section">
            <h3>Agency Information</h3>
            <table>
                <tr>
                    <th>Name</th>
                    <td>{{ $transaction->agency->name ?? 'N/A' }}</td>
                </tr>
                <tr>
                    <th>Agency ID</th>
                    <td>{{ $transaction->agency->code ?? 'N/A' }}</td>
                </tr>
            </table>
        </div>

        {{-- Transaction Info --}}
        <div class="section">
            <h3>Transaction Details</h3>
            <table>
                <tr>
                    <th>Type</th>
                    <td>{{ $transaction->tnx_type }}</td>
                    <th>Currency</th>
                    <td>{{ $transaction->currency }}</td>
                </tr>
                <tr>
                    <th>Amount</th>
                    <td class="text-right">{{ number_format($transaction->amount, 2) }} {{ $transaction->currency }}
                    </td>
                    <th>Old Balance</th>
                    <td class="text-right">{{ number_format($transaction->old_balance, 2) }}
                        {{ $transaction->currency }}</td>
                </tr>
                <tr>
                    <th>New Balance</th>
                    <td class="text-right" colspan="3">{{ number_format($transaction->new_balance, 2) }}
                        {{ $transaction->currency }}</td>
                </tr>
            </table>
        </div>

        {{-- Source Info --}}
        @if ($source)
            <div class="section">
                <h3>Source Details ({{ ucfirst($transaction->source_table) }})</h3>
                <table>
                    @if ($transaction->source_table === 'payments')
                        <tr>
                            <th>Payment Type</th>
                            <td>{{ $source->type }}</td>
                            <th>Bank Name</th>
                            <td>{{ $source->bank_name ?? 'N/A' }}</td>
                        </tr>
                        <tr>
                            <th>Transaction ID</th>
                            <td>{{ $source->transaction_id }}</td>
                            <th>Paid On</th>
                            <td>{{ \Carbon\Carbon::parse($source->paid)->format('d M Y') }}</td>
                        </tr>
                    @elseif($transaction->source_table === 'fund_transfers')
                        <tr>
                            <th>Transfer ID</th>
                            <td>{{ $source->transaction_id }}</td>
                            <th>Transfer Date</th>
                            <td>{{ \Carbon\Carbon::parse($source->transferred_date)->format('d M Y') }}</td>
                        </tr>
                        <tr>
                            <th>BDT Amount</th>
                            <td>{{ number_format($source->bdt_amount, 2) }} BDT</td>
                            <th>SAR Amount</th>
                            <td>{{ number_format($source->sar_amount, 2) }} SAR</td>
                        </tr>
                        <tr>
                            <th>Currency Rate</th>
                            <td colspan="3">{{ number_format($source->currency_rate, 3) }} (SAR to BDT)</td>
                        </tr>
                    @endif

                    @if (!empty($source->note))
                        <tr>
                            <th>Note</th>
                            <td colspan="3">{{ $source->note }}</td>
                        </tr>
                    @endif
                </table>
            </div>
        @endif

        {{-- Transaction Note --}}
        <div class="section">
            <h3>Note</h3>
            <div class="note">
                {{ $transaction->note ?? 'N/A' }}
            </div>
        </div>



    </div>

    {{-- Footer --}}
    <div class="footer">
        Powered by <strong>Taibaal Alliance</strong> &mdash; <a href="https://taibaalliance.com"
            target="_blank">taibaalliance.com</a>
    </div>

</body>

</html>