<!DOCTYPE html>
<html lang="{{ str_replace('_','-',app()->getLocale()) }}">

    {{-- Control Variables --}}
    @php
      // Imports
        use Carbon\Carbon;
        use App\Helpers\Database\SatCatalogsHelper;

        use App\Helpers\Environment\SystemFeaturesHelper;

        use App\Helpers\Support\PdfResourcesHelper;
        use App\Helpers\Support\TaxCertificateHelper;

        use App\Helpers\Formats\AddressFormatterHelper;
        use App\Helpers\Formats\FormatCurrencyHelper;
        use App\Helpers\Formats\QuantityConverterHelper;
        use App\Helpers\Formats\TextTransformHelper;

        use App\Enums\Invoicing\BillableService;

      // Variables
        // Controls
        $reduce_invoice = SystemFeaturesHelper::getFeatureStatus("reduced_invoices");
        $is_global_invoice = $invoice->receptor->tax_id === "XAXX010101000" && !is_null($invoice->global);

        // Classes
        $contrast_color = PdfResourcesHelper::getTextContrastColor($invoice->taxFormat->base_color ?? "#0D6889");

        // Header
        $tax_folio = $invoice->sat_uuid ?? "0000XXXX-00XX-00XX-00XX-000000XXXXXX";
        $cds_issuer = TaxCertificateHelper::serialHexToSatCertificateNumber($issuer->cer_serial_number);
        $emission_date = Carbon::parse($invoice->date)->format('d/m/Y H:i:s');
        $certification_date = Carbon::parse($invoice->certification_date ?? "2099-01-01")->format('d/m/Y H:i:s');

        $serie_folio = ($invoice->taxFormat->serie ?? $invoice->invoice_type)."-X";
            if (!in_array(null, [$invoice->system_service_id, $invoice->system_service_type], true)) {
                $label = BillableService::labelFrom($invoice->system_service_type);

                if ($label)
                    $serie_folio .= " | ".$label." #{$invoice->system_service_id}";
            }

        // Global Data
        if($is_global_invoice)
            $global = (object) $invoice->global;

        // Receiver
        $receiver_address = (object) $invoice->receptor->tax_address;
        $receiver_sample_address = AddressFormatterHelper::format(
            [
                "street" => $receiver_address->street,
                "exterior" => $receiver_address->exterior,
                "interior" => $receiver_address->interior,
                "neighborhood" => $receiver_address->neighborhood,
                "city" => $receiver_address->city,
                "municipality" => $receiver_address->municipality,
                "state" => $receiver_address->state ?? null,
                "country" => $receiver_address->country,
                'zip' => $invoice->receptor->zip,
            ],
            ['ext_label' => 'No.', 'int_label' => 'Int.', 'zip_label' => 'C.P.' ]
        );

    @endphp

<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>{{ $title }}</title>

    @include('invoicing.invoices.pdf.resources.invoice-styles')
</head>

<body>
    {{-- Watermark --}}
    <div class="watermark">PREVIEW</div>

    {{-- Header --}}
    <header>
        <div class="row">
            {{-- Logo --}}
            <div class="col-2">
                <img class="logo" src="{{ $logo_src }}" alt="Hotel Logo">
            </div>

            {{-- Issuer Data --}}
            <div class="col-3_5">

                {{-- Legal Name --}}
                <h3 class="mt-0 mb-0_5 main-color">{{ $issuer->legal_name }}</h3>

                {{-- Tax Data --}}
                <p class="issuer-data">
                    {{-- RFC --}}
                    {{ $issuer->tax_id }}<br>

                    {{-- Address --}}
                    {{ $invoice->taxBranch->sample_address }}<br>

                    {{-- email --}}
                    {{ $invoice->taxBranch->email }}<br>
                </p>

            </div>

            {{-- Invoice Header --}}
            <div class="pt-0_5 col-6_5 pale-background ps-2_5">
                <table class="borderless"><tbody>

                    {{-- Versión --}}
                    <tr>
                        <td class="fw-semi-bold text-end">Versión:</td>
                        <td class="fw-semi-bold ps-0_5">4.0</td>
                    </tr>

                    {{-- Folio Fiscal --}}
                    <tr>
                        <td class="fw-semi-bold text-end">Folio Fiscal:</td>
                        <td class="ps-0_5 gray-border-bottom">
                            {{ $tax_folio }}
                        </td>
                    </tr>

                    {{-- CSD del Emisor --}}
                    <tr>
                        <td class="fw-semi-bold text-end">No. de serie del CSD del Emisor:</td>
                        <td class="ps-0_5 gray-border-bottom">
                            {{ $cds_issuer }}
                        </td>
                    </tr>

                    {{-- Datetime Emisión --}}
                    <tr>
                        <td class="fw-semi-bold text-end">Fecha y hora de operación:</td>
                        <td class="ps-0_5 gray-border-bottom">
                            {{ $emission_date }} (Tiempo del Centro)
                        </td>
                    </tr>

                    {{-- Datetime Certificación --}}
                    <tr>
                        <td class="fw-semi-bold text-end">Fecha y hora de Certificación:</td>
                        <td class="ps-0_5 gray-border-bottom">
                            {{ $certification_date }} (Tiempo del Centro)
                        </td>
                    </tr>

                    {{-- Uso de CFDI --}}
                    <tr>
                        <td class="fw-semi-bold text-end">Uso de CFDI:</td>
                        <td class="ps-0_5 gray-border-bottom">
                            {{ SatCatalogsHelper::getItem('c_UsoCFDI', $invoice->cfdi_use, true) }}
                        </td>
                    </tr>

                    {{-- Regimen Fiscal --}}
                    <tr>
                        <td class="fw-semi-bold text-end">Regimen fiscal:</td>
                        <td class="ps-0_5 gray-border-bottom">
                            {{ SatCatalogsHelper::getItem('c_RegimenFiscal', $issuer->tax_system, true) }}
                        </td>
                    </tr>

                    {{-- Tipo de CFDI --}}
                    <tr>
                        <td class="fw-semi-bold text-end">Tipo de CFDI:</td>
                        <td class="ps-0_5 gray-border-bottom">
                            {{ SatCatalogsHelper::getItem('c_TipoDeComprobante', $invoice->invoice_type, true) }}
                        </td>
                    </tr>

                    {{-- Serie y Folio --}}
                    <tr>
                        <td class="fw-semi-bold text-end">Serie y Folio:</td>
                        <td class="ps-0_5 gray-border-bottom">
                            {{ $serie_folio }}
                        </td>
                    </tr>

                </tbody></table>
            </div>
        </div>
    </header>

    {{-- Footer --}}
    <footer class="text-center">
        <a href="https://harsi.mx/" class="no-spacing-text text-muted">
            HARSI HAZLO SIMPLE, HAZLO ÚTIL ©®
        </a>
        {{-- <p></p> --}}
        <p class="no-spacing-text">
            ESTE DOCUMENTO ES UNA REPRESENTACIÓN IMPRESA DE UN CFDI
        </p>
        <a href="https://harsi.mx/" class="no-spacing-text text-muted">
            https://harsi.mx/
        </a>
    </footer>

    {{-- Content --}}
    <main>

        {{-- Receiver - CFDI Data --}}
        <section class="mt-2 row">

            {{-- Receiver Data --}}
            <div class="col-7">
                <p class="mb-0 section-header main-background">
                    Receptor
                </p>

                <p class="px-1 no-spacing-text">
                    <span class="fw-semi-bold">Nombre:</span>
                    {{ $invoice->receptor->legal_name }}
                </p>
                <p class="px-1 no-spacing-text">
                    <span class="fw-semi-bold">RFC:</span>
                    {{ $invoice->receptor->tax_id }}
                </p>
                <p class="px-1 no-spacing-text">
                    {{ $receiver_sample_address }}
                </p>
                <p class="px-1 no-spacing-text">
                    <span class="fw-semi-bold">Régimen Fiscal:</span>
                    {{ SatCatalogsHelper::getItem('c_RegimenFiscal', $invoice->receptor->tax_system, true) }}
                </p>

            </div>

            {{-- CFDI Data --}}
            <div class="col-5">
                <p class="mb-0 section-header main-background">
                    Datos del CFDI
                </p>

                <p class="px-1 no-spacing-text">
                    <span class="fw-semi-bold">Moneda:</span>
                    {{ SatCatalogsHelper::getItem('c_Moneda', $invoice->currency, true) }}
                </p>
                <p class="px-1 no-spacing-text">
                    <span class="fw-semi-bold">Tipo de Cambio:</span>
                    {{ QuantityConverterHelper::removeUnnecessaryDecimal($invoice->exchange_rate) }}
                </p>
                <p class="px-1 no-spacing-text">
                    <span class="fw-semi-bold">Método de Pago:</span>
                    @if ($reduce_invoice)
                        {{ $invoice->payment_method }}
                    @else
                        {{ SatCatalogsHelper::getItem('c_MetodoPago', $invoice->payment_method, true) }}
                    @endif
                </p>
                <p class="px-1 no-spacing-text">
                    <span class="fw-semi-bold">Forma de Pago:</span>
                    {{ SatCatalogsHelper::getItem('c_FormaPago', $invoice->payment_form, !$reduce_invoice) }}
                </p>

                @if (in_array($invoice->invoice_type, ['I', 'E']))
                    <p class="px-1 no-spacing-text">
                        <span class="fw-semi-bold">Exportación:</span>
                        {{ SatCatalogsHelper::getItem('c_Exportacion', $invoice->export, true) }}
                    </p>
                @endif

                @if (
                    in_array($invoice->invoice_type, ['I', 'E', 'N'])
                    && in_array($invoice->payment_method, ['PPD'])
                    && !is_null($invoice->credit_days) && !is_null($invoice->due_date)
                )
                    <p class="px-1 no-spacing-text">
                        <span class="fw-semi-bold">Días de Crédito:</span>
                        {{ $invoice->credit_days }}
                    </p>
                    <p class="px-1 no-spacing-text">
                        <span class="fw-semi-bold">Fecha Límite de Pago:</span>
                        {{ $invoice->due_date }}
                    </p>
                @endif
            </div>

        </section>

        {{-- Global/Generic Data --}}
        @if ($is_global_invoice)
            <section class="mt-2 row">

                {{-- Title --}}
                <div class="row">
                    <div class="col-4">
                        <p class="py-1 mb-0 section-header main-background">
                            Factura Global
                        </p>
                    </div><div class="col-8"></div>
                </div>

                {{-- Data --}}
                <div class="px-1 row">

                    {{-- Periodicity --}}
                    <div class="col-4">
                        <p class="px-1 no-spacing-text">
                            <span class="fw-semi-bold">Periodicidad:</span>

                            @if ($reduce_invoice)
                                {{ SatCatalogsHelper::getItem('c_Periodicidad', $global->periodicity, false) }}
                            @else
                                {{ SatCatalogsHelper::getItem('c_Periodicidad', $global->periodicity, true) }}
                            @endif
                        </p>
                    </div>

                    {{-- Period --}}
                    <div class="col-4">
                        <p class="px-1 no-spacing-text">
                            <span class="fw-semi-bold">Periodo:</span>

                            @if ($reduce_invoice)
                                {{ SatCatalogsHelper::getItem('c_Meses', $global->months, false) }}
                            @else
                                {{ SatCatalogsHelper::getItem('c_Meses', $global->months, true) }}
                            @endif
                        </p>
                    </div>

                    {{-- Year --}}
                    <div class="col-4">
                        <p class="px-1 no-spacing-text">
                            <span class="fw-semi-bold">Año:</span>
                            {{ $global->year }}
                        </p>
                    </div>

                </div>

            </section>
        @endif

        {{-- Notes / Additional Datae --}}
        @if (!in_array($invoice->notes, [null, "", __('neutral_words')['none']]))
            <section class="mt-2 row">

                {{-- Title --}}
                <div class="row">
                    <div class="col-4">
                        <p class="py-1 mb-0 section-header main-background">
                            Información Extra
                        </p>
                    </div><div class="col-8"></div>
                </div>

                {{-- Data --}}
                <div class="px-1 row">

                    {{-- Periodicity --}}
                    <div class="col-11">
                        <p class="px-1 no-spacing-text">
                            {{ $invoice->notes }}
                        </p>
                    </div>

                </div>

            </section>
        @endif

        {{-- Concepts --}}
        <section class="mt-5 row">
            @php
                $include_discount_data = $invoice->taxItems->where("discount_total", ">", 0.00)->count();
                $dynamic_colspan = $include_discount_data ? 5 : 4;
            @endphp

            <table class="text-center row concepts-table">
                <thead class="main-background table-bordered">
                    <tr>
                        <th width="10%" class="py-0_5">Cantidad</th>
                        <th
                            @if ($reduce_invoice)
                                width="7.5%"
                            @else
                                width="13%"
                            @endif
                            class="py-0_5"
                        >Unidad</th>
                        <th class="py-0_5">Concepto</th>
                        <th width="16%" class="py-0_5">Impuesto</th>
                        <th width="12.5%" class="py-0_5">Precio Unitario</th>

                        @if ($include_discount_data)
                            <th width="12%" class="py-0_5">Descuento</th>
                        @endif

                        <th width="12%" class="py-0_5">Total</th>
                    </tr>
                </thead>
                <tbody class="table-bordered">
                    @php
                        $federal_tax_config = [
                            [
                                'label'      => 'IVA Trasladado',
                                'rate_path'  => 'taxes.iva.rate',
                                'charge_path'=> 'taxes.iva',
                            ],
                            [
                                'label'      => 'IEPS Trasladado',
                                'rate_path'  => 'taxes.ieps.rate',
                                'charge_path'=> 'taxes.ieps',
                            ],
                            [
                                'label'      => 'ISR Retenido',
                                'rate_path'  => 'withholding_taxes.isr.rate',
                                'charge_path'=> 'withholding_taxes.isr',
                            ],
                            [
                                'label'      => 'IVA Retenido',
                                'rate_path'  => 'withholding_taxes.iva.rate',
                                'charge_path'=> 'withholding_taxes.iva',
                            ],
                        ];
                    @endphp

                    @foreach ($invoice->taxItems as $concept)
                        @php
                            // Normalizar impuestos federales
                            $federal_taxes        = (array) ($concept->tax_profile ?? []);
                            $federal_tax_charges  = (array) ($concept->tax_charges_summary ?? []);

                            // Normalizar impuestos locales siempre a objeto con propiedades
                            $local_tax_profile = $concept->local_tax_profile ?? (object)[];
                            $local_taxes = is_array($local_tax_profile)
                                ? (object) $local_tax_profile
                                : $local_tax_profile;
                        @endphp

                        <tr>
                            <td scope="row">{{ QuantityConverterHelper::removeUnnecessaryDecimal($concept->quantity) }}</td>

                            <td class="px-0_5">
                                @if ($reduce_invoice)
                                    {{ $concept->unit_key }}
                                @else
                                    {{ SatCatalogsHelper::getUnit($concept->unit_key, true) }}
                                @endif
                            </td>

                            <td class="px-0_5 text-start">
                                @if ($reduce_invoice)
                                    @if (!in_array($concept->description, [__('neutral_words')['none'], __('neutral_words')['none_2']]))
                                        <span>{{ mb_strtoupper($concept->description) }}</span><br>
                                    @else
                                        <span class="fw-semi-bold">{{ $concept->name }}</span><br>
                                    @endif

                                    {{ $concept->prod_serv_key }}<br>
                                    {{ SatCatalogsHelper::getItem('c_ObjetoImp', $concept->object_tax, false) }}<br>

                                    @if ($concept->property_tax_account)
                                        <span class="fw-semi-bold">Cuenta Predial:</span> {{ $concept->property_tax_account }}
                                    @endif
                                @else
                                    <span class="fw-semi-bold">{{ $concept->name }}</span><br>

                                    @if (!in_array($concept->description, [__('neutral_words')['none'], __('neutral_words')['none_2']]))
                                        <span>{{ mb_strtoupper($concept->description) }}</span><br>
                                    @endif

                                    {{ $concept->prod_serv_key }} - {{ $concept->sat_description }}<br>
                                    {{ SatCatalogsHelper::getItem('c_ObjetoImp', $concept->object_tax, true) }}<br>

                                    @if ($concept->property_tax_account)
                                        <span class="fw-semi-bold">Cuenta Predial:</span> {{ $concept->property_tax_account }}
                                    @endif
                                @endif
                            </td>

                            <td class="px-0_5 text-start">
                                {{-- Impuestos federales --}}
                                @if ($concept->object_tax === '04')
                                    <span class="fw-semi-bold">IVA (Exento)</span><br>
                                    {{ QuantityConverterHelper::str_toStrPercentage(0.0) }}
                                    {{ FormatCurrencyHelper::formatCurrency(0.0) }}<br>
                                @else
                                    @foreach ($federal_tax_config as $tax)
                                        @php
                                            $rate   = data_get($federal_taxes, $tax['rate_path']);
                                            $charge = data_get($federal_tax_charges, $tax['charge_path']);
                                        @endphp

                                        @if (!is_null($rate))
                                            <span class="fw-semi-bold">{{ $tax['label'] }}</span><br>
                                            {{ QuantityConverterHelper::str_toStrPercentage($rate) }}
                                            {{ FormatCurrencyHelper::formatCurrency($charge, $invoice->currency) }}<br>
                                        @endif
                                    @endforeach
                                @endif

                                {{-- Impuestos locales --}}
                                @foreach ((array) ($local_taxes->transferred ?? []) as $tr_ltx)
                                    @php $tr_ltx = (array) $tr_ltx; @endphp

                                    <span class="fw-semi-bold">{{ $tr_ltx['name'] }} Transferido</span><br>
                                    {{ QuantityConverterHelper::str_toStrPercentage($tr_ltx['rate'], 2, false) }}
                                    {{ FormatCurrencyHelper::formatCurrency($tr_ltx['charge'], $invoice->currency) }}<br>
                                @endforeach

                                @foreach ((array) ($local_taxes->withheld ?? []) as $rt_ltx)
                                    @php $rt_ltx = (array) $rt_ltx; @endphp

                                    <span class="fw-semi-bold">{{ $rt_ltx['name'] }} Retenido</span><br>
                                    {{ QuantityConverterHelper::str_toStrPercentage($rt_ltx['rate'], 2, false) }}
                                    {{ FormatCurrencyHelper::formatCurrency($rt_ltx['charge'], $invoice->currency) }}<br>
                                @endforeach
                            </td>

                            <td class="px-0_5 text-end">
                                {{ FormatCurrencyHelper::formatCurrency($concept->unit_price, $invoice->currency) }}
                            </td>

                            @if ($include_discount_data)
                                <td class="px-1 text-end">
                                    {{-- {{ QuantityConverterHelper::str_toStrPercentage($concept->discount_value, 6, false) }}<br> --}}
                                    {{ FormatCurrencyHelper::formatCurrency($concept->discount_total, $invoice->currency) }}
                                </td>
                            @endif

                            <td class="px-1 text-end">
                                {{ FormatCurrencyHelper::formatCurrency(($concept->subtotal - $concept->discount_total), $invoice->currency) }}
                            </td>
                        </tr>
                    @endforeach
                </tbody>

                <tfoot>

                    {{-- Subtotal --}}
                    <tr>
                        <td colspan="{{ $dynamic_colspan }}"></td>
                        <td class="px-1 text-start fw-semi-bold cell-with-borders">Subtotal</td>
                        <td class="px-1 text-end cell-with-borders">{{ FormatCurrencyHelper::formatCurrency($invoice->subtotal, $invoice->currency) }}<br></td>
                    </tr>

                    {{-- Taxes Breakdown --}}
                    @php
                        // Federal Taxes
                        $federal_tax_profile = [];
                        foreach ($invoice->taxItems as $item) {
                            $profile = $item->tax_profile ?? [];
                            $charges = $item->tax_charges_summary ?? [];

                            if ($item->object_tax === "04") {
                                $federal_tax_profile["IVA_Trasladado_Exento"] = [
                                    'label'  => "IVA - Exento",
                                    'rate'   => 0.00, 'charge' => 0.0,
                                ];
                            } else {
                                foreach ($federal_tax_config as $ftx) {
                                    $rate   = data_get($profile, $ftx['rate_path']);
                                    $charge = data_get($charges, $ftx['charge_path']);
                                        if ($rate === null || $charge === null) continue;

                                    $key = $ftx['label'] . '_' . $rate;

                                    if (!isset($federal_tax_profile[$key]))
                                        $federal_tax_profile[$key] = [ 'label'  => $ftx['label'], 'rate'   => $rate, 'charge' => 0 ];

                                    $federal_tax_profile[$key]['charge'] += $charge;
                                }
                            }
                        }

                        // Local Taxes
                        $ltx_summary =  is_array($invoice->local_taxes)
                            ? (object) $invoice->local_taxes
                            : $invoice->local_taxes;
                    @endphp
                      {{-- Federal Taxes --}}
                        @foreach ($federal_tax_profile as $label => $ftx_profile)
                            {{-- @dd($ftx_profile) --}}
                            <tr>
                                <td colspan="{{ $dynamic_colspan }}"></td>
                                <td class="px-1 text-start fw-semi-bold cell-with-borders">
                                    {{ $ftx_profile['label'] }}
                                    {{ QuantityConverterHelper::str_toStrPercentage($ftx_profile['rate']) }}
                                </td>
                                <td class="px-1 text-end cell-with-borders">{{ FormatCurrencyHelper::formatCurrency($ftx_profile['charge'], $invoice->currency) }}<br></td>
                            </tr>
                        @endforeach

                      {{-- Local Taxes --}}
                        {{-- Transferred --}}
                        @foreach ($ltx_summary->transferred as $ltx_tr)
                            @php $ltx_tr = (array) $ltx_tr; @endphp

                            <tr>
                                <td colspan="{{ $dynamic_colspan }}"></td>
                                <td class="px-1 text-start fw-semi-bold cell-with-borders">
                                    {{ $ltx_tr['name'] }} Trasladado
                                    {{ QuantityConverterHelper::str_toStrPercentage($ltx_tr['rate'], 2, false) }}
                                </td>
                                <td class="px-1 text-end cell-with-borders">{{ FormatCurrencyHelper::formatCurrency($ltx_tr['charge'], $invoice->currency) }}<br></td>
                            </tr>
                        @endforeach

                        {{-- Withheld --}}
                        @foreach ($ltx_summary->withheld as $ltx_rt)
                            @php $ltx_rt = (array) $ltx_rt; @endphp

                            <tr>
                                <td colspan="{{ $dynamic_colspan }}"></td>
                                <td class="px-1 text-start fw-semi-bold cell-with-borders">
                                    {{ $ltx_rt['name'] }} Retenido
                                    {{ QuantityConverterHelper::str_toStrPercentage($ltx_rt['rate'], 2, false) }}
                                </td>
                                <td class="px-1 text-end cell-with-borders">{{ FormatCurrencyHelper::formatCurrency($ltx_rt['charge'], $invoice->currency) }}<br></td>
                            </tr>
                        @endforeach

                    {{-- Total --}}
                    <tr>
                        <td colspan="{{ $dynamic_colspan }}" class="px-1 text-start">
                            <span class="fw-semi-bold">Importe con Letra:</span>
                            {{ QuantityConverterHelper::convertToPesosText($invoice->total, $invoice->currency) }}
                        </td>
                        <td class="px-1 text-start fw-semi-bold cell-with-borders">
                            Total
                        </td>
                        <td class="px-1 text-end cell-with-borders text-uppercase">
                            {{ FormatCurrencyHelper::formatCurrency($invoice->total, $invoice->currency) }}
                        </td>
                    </tr>

                </tfoot>
            </table>
        </section>

        {{-- Related Documents --}}
        @if ($invoice->related_documents)
            <section class="mt-4_5 row">
                <div class="col-8">
                    <table class="text-center concepts-table">
                        <thead class="main-background table-bordered">
                            <tr>
                                <th colspan="2" class="section-header main-background">
                                    Documentos Relacionados
                                </th>
                            </tr>
                        </thead>

                        <tbody class="table-bordered">
                            <tr class="pale-background">
                                <th>Tipo de Relación</th>
                                <th>Folio Fiscal Relacionado</th>
                            </tr>
                            @foreach ($invoice->related_documents as $rd)
                                @php
                                    $relation_type = collect($document_relations)
                                        ->firstWhere('item_key', $rd->relation_type)?->label;
                                @endphp

                                <tr>
                                    <td class="px-1">{{ TextTransformHelper::trimText($relation_type, 35) }}</td>
                                    <td class="px-1">{{ $rd->uuid }}</td>
                                </tr>
                            @endforeach
                        </tbody>
                    </table>
                </div>
            </section>
        @endif

        {{-- SAT Certificates --}}
        <section class="mt-4_5 row">
            @php
                $illusionary_certificated_data = 'Lorem ipsum dolor sit, amet consectetur adipisicing elit. Repudiandae nemo debitis recusandae maiores natus doloribus quaerat? Delectus quasi nobis reprehenderit vel molestias quis ullam, qui rerum a suscipit nulla harum!';
            @endphp

            <div class="col-8">
                <table class="row concepts-table table-bordered">
                    <tbody>
                        <tr class="main-background">
                            <td width="10%" class="px-1 py-0_5 fw-semi-bold">
                                Sello digital Emisor
                            </td>
                        </tr>

                        <tr>
                            <td class="px-1">{{ $illusionary_certificated_data }}</td>
                        </tr>

                        <tr class="main-background">
                            <td width="10%" class="px-1 py-0_5 fw-semi-bold">
                                Sello digital del SAT
                            </td>
                        </tr>

                        <tr>
                            <td class="px-1">{{ $illusionary_certificated_data }}</td>
                        </tr>

                        <tr class="main-background">
                            <td width="10%" class="px-1 py-0_5 fw-semi-bold">
                                Cadena Original del Complemento de certificación digital del SAT
                            </td>
                        </tr>

                        <tr>
                            <td class="px-1">{{ $illusionary_certificated_data }}</td>
                        </tr>
                    </tbody>
                </table>
            </div>

            <div class="col-4">
                <img class="qr-code" src="{{ $qr_stamp }}" alt="Invoice QR">
            </div>
        </section>

    </main>

</body>

</html>
