@extends('sales::layouts.exporting.print.master') @if(LaravelLocalization::getCurrentLocale() === 'ar') @include('companyuser::includes.pdf-headrtl') @else @include('companyuser::includes.pdf-head') @endif @section('title', __('sales::invoices.invoices')) @section('extra-styles') @include('sales::invoices.partials.shared-head-assets') @include('sales::invoices.partials.embedded-xml') @endsection @section('koolreport')
{!! $formDesign->header !!}
@if($invoiceConditions['isStudent']) @include('draft') @endif @isset($invoice) @php $title = $invoice->pdfTitle; @endphp @endisset

@lang($title, [], 'en')

@lang($title, [], 'ar')

@isset($invoice)
@endisset
@php if(mb_strlen($settings->name) > 150){ $name = mb_substr($settings->name,0, 150,'utf-8')."..."; } else { $name = $settings->name; } @endphp
Name
{{$name}}
الاسم
@if($settings->taxable && $settings->tax_id_number)
Vat Number
{{$settings->tax_id_number}}
الرقم الضريبى
@endif
@if($settings->address) @php if(mb_strlen($settings->address) > 100){ $address = mb_substr($settings->address ,0, 100,'utf-8')."..."; } else { $address = $settings->address; } @endphp
Address
{!! str_replace("\r\n","
", $address) !!}
العنوان
@endif
@if($companyInfo->zatca_comply)
Commercial Register
{{$settings->commercial_number}}
السجل التجاري
@else @if($formDesign->commercial_number && $settings->commercial_number && $settings->commercial_number != '0')
Commercial Register
{{$settings->commercial_number}}
السجل التجاري
@endif @endif
@if($settings->img) company logo @else
@endif
Client:
{{isset($invoice)? $invoice->customer->name : ".................."}}
:العميل
Invoice Number:
{{isset($invoice)? $invoice->reference : $formDesign->reference}}
:رقم الفاتورة
Invoice Date:
{{ isset($invoice)? $invoice->formatDate($invoice->date): ".................."}}
:تاريخ الفاتورة
@if($invoiceConditions['shouldDisplayInvoiceTime'])
Invoice Time:
{{ isset($invoice)? $invoice->formatTime($invoice->date): ".................."}}
:وقت الفاتورة
@endif
@if($invoiceConditions['shouldDisplayCustomerVatNumber'] && $invoice->customer->tax_number)
VAT Number:
{{$invoice->customer->tax_number}}
:الرقم الضريبي
@endif
@if($invoiceConditions['shouldDisplayCustomerCommercialNumber'])
@lang('sales::invoice_template.commercial_schema.'.$invoice->customer->commercial_schema, [], 'en')
{{$invoice->customer->commercial_number}}
@lang('sales::invoice_template.commercial_schema.'.$invoice->customer->commercial_schema, [], 'ar')
@endif
@php $mobile = '' ; @endphp @if(isset($invoice)) @php $mobile = $invoice->customer->mobile ? str_replace("+", "00", App\Enums\PhoneCode::get($invoice->customer->country_code)) . '-' . $invoice->customer->mobile : '' @endphp @endif @if($formDesign->customer_phone_number)
Phone Number :
{{ ($mobile) ? $mobile : '..................' }}
:رقم الجوال
@endif
@if($formDesign->customer_email)
Email :
{{isset($invoice) ? $invoice->customer->email : '..................'}}
:البريد الالكتروني
@endif
@if ($invoice->customer->postal_code)
Postal Code :
{{isset($invoice) ? $invoice->customer->postal_code : '..................'}}
:الرقم البريدي
@endif
@if(isset($invoice) && ($invoice->customer->street || $invoice->customer->city || $invoice->customer->country))
Address :
{{ $invoiceMetadata['customerAddress'] }}
: العنوان
@endif
@if($formDesign->payment_account)
Payment Account :
{{$invoice->paymentAccount->name ?? ''}}
:حساب الدفع
@endif
@if($formDesign->payment_term)
Payment Plan:
{{isset($invoice)? ($invoice->paymentTerm ? $invoice->paymentTerm->name : __('sales::invoices.cash')) : ".................."}}
: خطة الدفع
@endif
@php $costCenter = ''; @endphp @if(isset($invoice)) @endif @if($formDesign->cost_center)
Cost Center :
{{$costCenter?$costCenter['code'] . ' - ' . $costCenter['name_' . app()->getLocale()]: __('products::cost_center.main center') }}
: مركز التكلفة
@endif
{{-- Related Invoice (only applies for credit notes and debit notes) --}} @if($invoice->invoice)
Related Invoice:
{{$invoice->invoice->reference}}
الفاتورة المرتبطة:
@endif @if($invoice->parent)
Related Invoice:
{{$invoice->parent->reference}}
:الفاتورة المرتبطة
@endif
@if($formDesign->description)
Details :
{{isset($invoice)? $invoice->description : ".................." }}
: التفاصيل
@endif
@php $feeServiceActivities = isset($feeServiceActivities) ? $feeServiceActivities : ($invoice->feeServiceActivities ?? []); @endphp @php // The values here are hardcoded because this template has 2 languages $productTypeTitleAr = ''; $productTypeTitleEn = ''; if(isset($productsTypes) && array_key_exists(\Modules\Products\Enums\ProductTypeEnum::PRODUCT, $productsTypes)){ $productTypeTitleAr .= 'منتج'; $productTypeTitleEn .= 'Product'; } if(isset($productsTypes) && array_key_exists(\Modules\Products\Enums\ProductTypeEnum::SERVICE, $productsTypes)){ $productTypeTitleAr = 'منتج / خدمة'; $productTypeTitleEn = 'Product / Service'; } if(!isset($invoice)){ $productTypeTitleAr .= 'منتج'; $productTypeTitleEn .= 'Product'; } $totalDiscountAmount=0; $totalAmount=0; $counterOfColumn=9; if(!$formDesign->product_description) { $counterOfColumn--; } if(!$formDesign->discount) { $counterOfColumn--; } if(!$formDesign->unit) { $counterOfColumn--; } if(!$formDesign->tax_amount) { $counterOfColumn--; } if(!$formDesign->product_image) { $counterOfColumn--; } @endphp @if ($formDesign->product_image) @endif @if($description) @endif @if($formDesign->discount) @endif @if($invoiceConditions['shouldDisplayProductVatAmount']) @endif @if($invoiceConditions['shouldDisplayProductTotalWithVat']) @endif @isset($invoice) @foreach($invoice->invoiceDetails as $record) @php $descArray = str_split($record->shortDescription, 1000); @endphp @if($formDesign->product_image) @endif @if($formDesign->product_description) @endif @if($formDesign->discount)
الصورة
Image
{{ $productTypeTitleAr }}
{{ $productTypeTitleEn }}
التفاصيل
Description
الكمية
Quantity
سعر الوحدة
Item Price
الخصم
Discount
الضريبة
VAT
قيمة الضريبة
VAT value
القيمة
Price
الاجمالي
Total
Product Image{{ $record->product->name_ar }}
{{ $record->product->name_en }}
@if(count($descArray)){{ $descArray[0] }}@endif{{ number_format($record->quantity,2,".",",") }} {{ number_format($record->price,2,".",",") }}