MONTHLY SERVICE PROVIDER INVOICE - ZIGZAG
Date: {{ now()->format('d M Y') }}
Invoice #: {{ $invoice->id }}
Month: {{ Carbon\Carbon::parse($invoice->month)->format('F Y') }}
Service Provider Details:
Service Provider ID: {{ $invoice->service_provider_id }}
Name: {{ $serviceProvider->title ?? 'N/A' }}
Address: {{ $serviceProvider->address ?? 'N/A' }}
Description: {{ $serviceProvider->description ?? 'N/A' }}
Invoice Summary:
Total Orders: {{ $invoice->total_orders }}
Period: {{ Carbon\Carbon::parse($invoice->month)->startOfMonth()->format('d M Y') }} - {{ Carbon\Carbon::parse($invoice->month)->endOfMonth()->format('d M Y') }}
Cash Orders: {{ $invoice->total_cash_orders }} ({{ number_format($invoice->total_amount_cash_orders, 2) }} QAR)
Online Orders: {{ $invoice->total_online_orders }} ({{ number_format($invoice->total_amount_online_orders, 2) }} QAR)
Total Sales Amount: {{ number_format($invoice->total_sales_amount, 2) }} QAR
Order Details:
@foreach ($invoice->invoiceItems as $item) @endforeach
Payment ID Order ID Date Customer Amount Commission Payment Type
{{ $item->serviceProviderPayment->id }} {{ $item->serviceProviderPayment->order_id ?? 'N/A' }} {{ $item->serviceProviderPayment->created_at->format('d M Y') }} {{ $item->serviceProviderPayment->payment->user->name ?? 'N/A' }} {{ number_format($item->serviceProviderPayment->amount, 2) }} QAR {{ number_format($item->serviceProviderPayment->commission_amount, 2) }} QAR {{ $item->serviceProviderPayment->payment->paymentType->payment_type ?? 'N/A' }}
PAYMENT CALCULATION
Total Commission ({{ config('app.commission_percentage', '10') }}%): {{ number_format($invoice->commission_total, 2) }} QAR
Total Cash Payments (Collected by Service Provider): {{ number_format($invoice->total_amount_cash_orders, 2) }} QAR
Total Online Payments (Collected by Platform): {{ number_format($invoice->total_amount_online_orders, 2) }} QAR
Commission on Cash Payments (To Be Paid BY Service Provider): {{ number_format($invoice->amount_to_pay_by_service_provider, 2) }} QAR
Online Payments minus Commission (To Be Paid TO Service Provider): {{ number_format($invoice->amount_to_pay_service_provider, 2) }} QAR
@if ($invoice->amount_to_pay_service_provider > $invoice->amount_to_pay_by_service_provider) PLATFORM OWES SERVICE PROVIDER: @else SERVICE PROVIDER OWES PLATFORM: @endif @if ($invoice->amount_to_pay_service_provider > $invoice->amount_to_pay_by_service_provider) {{ number_format($invoice->amount_to_pay_service_provider - $invoice->amount_to_pay_by_service_provider, 2) }} QAR @else {{ number_format($invoice->amount_to_pay_by_service_provider - $invoice->amount_to_pay_service_provider, 2) }} QAR @endif