فاتورة ضريبية مبسطة

بيانات الشركة

المصدر: Dream Fitness - حلم الرشاقة

الرقم الضريبي: 311360515100003

رقم الفاتورة: {{ $invoice->number }}

تاريخ الإصدار: {{ $invoice->created_at->format('Y-m-d H:i') }}

رقم خدمة العملاء: +966554249938

بيانات العميل

اسم العميل: {{ $invoice->user?->name ?? '-' }}

رقم العميل: {{ $invoice->user?->mobile ?? '-' }}

@if($invoice->user?->city_id != null)

المدينة: {{ $invoice->user?->city?->name ?? '-' }}

@endif

الفرع: {{ $invoice->branch?->name ?? '-' }}

@if($invoice->type == \App\Enums\InvoiceType::ORDER && $invoice->invoiceable) @if($invoice->invoiceable?->pick_up_branch)

نوع التسليم: استلام من الفرع

@elseif($invoice->invoiceable?->address)

نوع التسليم: توصيل إلى العنوان

@endif @endif
@if($invoice->type == \App\Enums\InvoiceType::ORDER && $invoice->invoiceable)

بيانات الشحن

@if(!$invoice->invoiceable->pick_up_branch)

الشحن: شركة ارميكس

رقم البوليصه : {{$invoice->invoiceable->awb_number ?? "-" }}

@endif @if($invoice->type == \App\Enums\InvoiceType::ORDER && $invoice->invoiceable) @if($invoice->invoiceable?->address)

نوع التسليم: توصيل إلى العنوان

العنوان: {{ $invoice->invoiceable->address->name ?? '-' }}

الشارع: {{ $invoice->invoiceable->address->street_name ?? '-' }}

رقم المبنى: {{ $invoice->invoiceable->address->number ?? '-' }}

الطابق: {{ $invoice->invoiceable->address->floor ?? '-' }}

علامة مميزة: {{ $invoice->invoiceable->address->mark ?? '-' }}

@endif @elseif($invoice->type == \App\Enums\InvoiceType::SUBSCRIPTION)

النوع: {{ $invoice->type?->getLabel() ?? '-' }}

الحالة: {{ $invoice->status?->getLabel() ?? '-' }}

@endif
@endif
@if($invoice->type == \App\Enums\InvoiceType::ORDER && $invoice->invoiceable) @foreach($invoice->invoiceable->items as $index => $item) @php $price = $item->price->getAmount() / 100; $discount = $item->discount->getAmount() / 100; $totalBeforeDiscount = $price * $item->quantity; $total = $item->total->getAmount() / 100; $totalTax = $invoice->tax?->getAmount() / 100 ?? 0; $subtotal = $invoice->price?->getAmount() / 100 ?? 0; @endphp @endforeach
م كود الصنف وصف الصنف الكمية السعر القيمة قبل الخصم قيمة الخصم القيمة بعد الخصم
{{ $index + 1 }} {{ $item->orderable->code ?? '-' }} {{ $item->orderable->name ?? '-' }} {{ $item->quantity }} {{ number_format($price, 2) }} ر.س {{ number_format($totalBeforeDiscount, 2) }} ر.س {{ number_format($discount, 2) }} ر.س {{ number_format($total, 2) }} ر.س
@elseif($invoice->type == \App\Enums\InvoiceType::SUBSCRIPTION && $invoice->invoiceable) @php $price = $invoice->price->getAmount() / 100; $discount = $invoice->discount->getAmount() / 100; $total = $invoice->total->getAmount() / 100; $totalTax = $invoice->tax?->getAmount() / 100 ?? 0; $subtotal = $invoice->price?->getAmount() / 100 ?? 0; $taxPerItem = 0; $taxPercent = $subtotal ? ($totalTax / $subtotal) * 100 : 0; @endphp
م الوصف من الى القيمة قبل الخصم قيمة الخصم القيمة بعد الخصم
1 {{ $invoice->invoiceable->plan->name ?? '-' }} {{ $invoice->invoiceable->starts_at ?? '-' }} {{ $invoice->invoiceable->ends_at ?? '-' }} {{ number_format($price, 2) }} {{ number_format($discount, 2) }} {{ number_format($total, 2) }}
@endif
@php $subtotal = $invoice->price instanceof \Cknow\Money\Money ? $invoice->price->getAmount() / 100 : 0; $discount = $invoice->discount instanceof \Cknow\Money\Money ? $invoice->discount->getAmount() / 100 : 0; $tax = $invoice->tax instanceof \Cknow\Money\Money ? $invoice->tax->getAmount() : 0; $totalBeforeTax = $subtotal - $discount; $totalAfterTaxAndDiscount = $totalBeforeTax + $tax; @endphp {{-- --}} {{-- --}} {{-- --}} {{-- --}}
الإجمالي: {{ number_format($totalBeforeTax, 2) }} ر.س
مجموع الخصم:{{ number_format($discount, 2) }} ر.س
قيمة الضريبة المضافة : {{ $tax }} ر.س
الإجمالي شامل الضريبة : {{ number_format($totalAfterTaxAndDiscount, 2) }} ر.س