File manager - Edit - /home/linknsbh/proffy.online/resources/views/pdf/ar/sale-pdf.blade.php
Back
<html lang="ar" dir="rtl"> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <meta charset="UTF-8"> <title>{{ __('messages.sale_pdf') }}</title> <style> body { font-family: 'XBRiyaz', sans-serif; font-size: 14px; color: #333; margin: 0px; direction: rtl; text-align: right; } .table { width: 100%; border-collapse: collapse; margin-top: 20px; text-align: right; } .table th, .table td { border-bottom: 1px solid #ccc; border-top: 1px solid #ccc; padding: 8px; vertical-align: top; } .table th { background: #f3f4f6; } .number-align { text-align: left; /* keep numbers on left in RTL */ } .text-center { text-align: center; } .text-right { text-align: right; } .text-success { color: green; } .text-danger { color: red; } .text-warning { color: purple; } .logo img { max-width: 120px; max-height: 70px; } .icon-style { font-family: DejaVu Sans, sans-serif !important; } </style> </head> <body> <!-- Header --> <table width="100%"> <tr> <!-- Logo (right in RTL) --> <td width="30%" style="text-align: right;"> <img src="{{ $companyLogo }}" alt="Company Logo" width="100px"> </td> <!-- Reference Code Center --> <td width="40%" style="text-align: center; vertical-align: middle;"> <h2 style="color: dodgerblue; margin:0; padding:0; font-size: 20px;"> {{ $sale->reference_code }} </h2> </td> <!-- Sale Info (left in RTL) --> <td width="30%" style="text-align: right;"> <table style="width:100%; border-collapse: collapse;"> <tr> <td><b>{{ __('messages.pdf.date') }}</b> : {{ getFormattedDate($sale->created_at) }} </td> </tr> <tr> <td><b>{{ __('messages.pdf.number') }}</b> : {{ $sale->reference_code }}</td> </tr> <tr> <td><b>{{ __('messages.pdf.payment_status') }}</b> : <span class="{{ $sale->payment_status == \App\Models\Sale::PAID ? 'text-success' : ($sale->payment_status == \App\Models\Sale::PARTIAL_PAID ? 'text-warning' : 'text-danger') }}"> {{ $sale->payment_status == \App\Models\Sale::PAID ? __('messages.pdf.paid') : ($sale->payment_status == \App\Models\Sale::PARTIAL_PAID ? __('messages.pdf.partial') : __('messages.pdf.unpaid')) }} </span> </td> </tr> </table> </td> </tr> </table> <!-- Company & Customer Info --> <table style="width:100%; margin-top:20px; border-collapse: collapse;"> <tr> <!-- Company Info --> <td style="width:48%; vertical-align: top;"> <table class="table"> <thead> <tr> <th style="text-align:right;">{{ __('messages.pdf.company_info') }}</th> </tr> </thead> <tbody> <tr> <td> <b>{{ getActiveStoreName() }}</b><br> @if ($taxes->count() > 0) @foreach ($taxes as $tax) <p style="margin: 0; padding: 0;"> <span style="color: grey;">{{ $tax->number }}</span> : <b>{{ $tax->name }}</b> </p> @endforeach @endif <b>{{ __('messages.pdf.address') }}</b> : {{ getSettingValue('store_address') ?? 'N/A' }} <br> <b>{{ __('messages.pdf.phone') }}</b> : {{ getSettingValue('store_phone') ?? 'N/A' }} <br> <b>{{ __('messages.pdf.email') }}</b> : {{ getSettingValue('store_email') ?? 'N/A' }} </td> </tr> </tbody> </table> </td> <td style="width:4%"></td> <!-- Customer Info --> <td style="width:48%; vertical-align: top;"> <table class="table"> <thead> <tr> <th style="text-align:right;">{{ __('messages.pdf.customer_info') }}</th> </tr> </thead> <tbody> <tr> <td> <b>{{ __('messages.pdf.name') }}</b> : {{ $sale->customer->name ?? 'N/A' }} <br> <b>{{ __('messages.pdf.phone') }}</b> : {{ $sale->customer->phone ?? 'N/A' }} <br> <b>{{ __('messages.pdf.address') }}</b> : {{ $sale->customer->address ?? '' }} {{ $sale->customer->city ?? '' }} {{ $sale->customer->country ?? '' }} <br> <b>{{ __('messages.pdf.email') }}</b> : {{ $sale->customer->email ?? 'N/A' }} </td> </tr> </tbody> </table> </td> </tr> </table> <!-- Products Table --> <table class="table" style="margin-top: 40px;"> <thead> <tr> <th style="text-align: right;">{{ __('messages.pdf.product') }}</th> <th class="text-center">{{ __('messages.pdf.unit_price') }}</th> <th class="text-center">{{ __('messages.pdf.quantity') }}</th> <th class="text-center">{{ __('messages.heading_discount') }}</th> <th class="text-center">{{ __('messages.pdf.tax') }}</th> <th class="number-align">{{ __('messages.heading_total') }}</th> </tr> </thead> <tbody> @foreach ($sale->saleItems as $saleItem) <tr> <td style="text-align: right;">{{ $saleItem->product->name }}</td> <td class="text-center icon-style"> {{ currencyAlignment(number_format((float) $saleItem->net_unit_price, 2)) }}</td> <td class="text-center">{{ $saleItem->quantity }}</td> <td class="text-center icon-style"> {{ currencyAlignment(number_format((float) $saleItem->discount_amount, 2)) }}</td> <td class="text-center icon-style"> {{ currencyAlignment(number_format((float) $saleItem->tax_amount, 2)) }}</td> <td class="number-align icon-style"> {{ currencyAlignment(number_format((float) $saleItem->sub_total, 2)) }}</td> </tr> @endforeach </tbody> </table> <!-- Summary --> <table class="table" style="width:40%; margin-top: 20px; float: left;"> <tbody> <tr> <td><strong>{{ __('messages.pdf.order_tax') }}</strong> :</td> <td class="number-align icon-style"> {{ currencyAlignment(number_format((float) $sale->tax_amount, 2)) }}</td> </tr> <tr> <td><strong>{{ __('messages.pdf.discount') }}</strong> :</td> <td class="number-align icon-style">{{ currencyAlignment(number_format((float) $sale->discount, 2)) }} </td> </tr> <tr> <td><strong>{{ __('messages.pdf.shipping') }}</strong> :</td> <td class="number-align icon-style">{{ currencyAlignment(number_format((float) $sale->shipping, 2)) }} </td> </tr> @if ($sale->payment_status == \App\Models\Sale::PAID || $sale->payment_status == \App\Models\Sale::PARTIAL_PAID) <tr> <td><strong>{{ __('messages.pdf.paid_amount') }}</strong> :</td> <td class="number-align icon-style"> {{ currencyAlignment(number_format((float) $sale->payments->sum('amount'), 2)) }}</td> </tr> @endif <tr> <td><strong>{{ __('messages.pdf.total') }}</strong> :</td> <td class="number-align icon-style"> <b>{{ currencyAlignment(number_format((float) $sale->grand_total, 2)) }}</b> </td> </tr> </tbody> </table> <!-- Notes --> @if ($sale->note) <div style="text-align: right; clear: both; margin-top: 30px; padding: 10px 20px; border-right: 3px solid dodgerblue; background: #f8f8f8;"> <b>{{ __('messages.pdf.notes') }}:</b><br> {{ $sale->note }} </div> @endif </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 8.2.31 | Generation time: 1.41 |
proxy
|
phpinfo
|
Settings