@php $grandTotal = 0; @endphp @foreach ($response->items as $item) @if($item->is_accepted) @php $itemTotal = $item->supplied_quantity * $item->price_per_unit; $grandTotal += $itemTotal; @endphp @endif @endforeach @if($response->notes) @endif

فاکتور فروش

شماره فاکتور: {{ $response->id }}
تاریخ صدور: {{ now()->format('Y/m/d') }}
کد درخواست خرید: {{ $response->purchaseRequest->request_code }}
فروشنده:
{{ $response->supplier->company_name }}
{{ $response->supplier->address }}
تلفن: {{ $response->supplier->phone }}
خریدار:
{{ $response->purchaseRequest->requester->currentTeam->name }}
{{-- در اینجا می‌توانید آدرس و تلفن سازمان خریدار را قرار دهید --}}
شرح کالا مقدار قیمت واحد (تومان) جمع کل (تومان) توضیحات
{{ $item->originalItem->item_name }} {{ $item->supplied_quantity }} {{ $item->originalItem->unit }} {{ number_format($item->price_per_unit) }} {{ number_format($itemTotal) }} {{ $item->supplier_notes }}
جمع کل: {{ number_format($grandTotal) }} تومان

یادداشت‌های فروشنده: {{ $response->notes }}