@extends('layouts.master') @section('css') @endsection @section('title') {{__('home.print')}} @stop @section('content')
{{ Namear ?? '' }}

{{ describtionar ?? '' }}

{{ STar ?? '' }}

{{ Taxar ?? '' }}

@php $logo = camplogo ?? 'logo.png'; @endphp Logo
المملكة العربية السعودية
{{ Nameen ?? '' }}

{{ describtionen ?? '' }}

{{ STen ?? '' }}

{{ Taxen ?? '' }}

تقرير مرتجعات المبيعات

الفترة من: {{ $start ?? '' }} إلى: {{ $end ?? '' }} | تاريخ الإصدار: {{ date('Y-m-d') }}
@php $avt_data = App\Models\Avt::find(1); $saleavt = $avt_data->AVT ?? 0.15; $grandTotalBeforeTax = 0; $grandTotalTax = 0; $i = 0; @endphp @foreach($Invoices as $invoiceId => $items) @php $i++; $invoiceQty = 0; $invoiceDiscount = 0; $subTotalBeforeTax = 0; $invoiceDate = ''; $collectionItems = is_iterable($items) ? $items : [$items]; foreach($collectionItems as $item) { if($item && is_object($item)) { $qty = $item->return_quantity ?? 0; $price = $item->return_Unit_Price ?? 0; $dVal = $item->discountvalue ?? 0; $dInv = $item->discountoninvoice ?? 0; $invoiceQty += $qty; $invoiceDiscount += ($dVal + $dInv); $subTotalBeforeTax += ($price * $qty) - ($dVal + $dInv); if(empty($invoiceDate) && isset($item->created_at) && $item->created_at) { $invoiceDate = $item->created_at->format('Y-m-d'); } } } $taxAmount = $subTotalBeforeTax * $saleavt; $totalWithTax = $subTotalBeforeTax + $taxAmount; $grandTotalBeforeTax += $subTotalBeforeTax; $grandTotalTax += $taxAmount; @endphp @endforeach
م {{__('report.date')}} {{__('report.invoiceNo')}} {{__('home.quantity')}} {{__('home.price')}} (صافي) {{__('home.addedValue')}} {{__('home.discount')}} {{__('home.total')}}
{{ $i }} {{ $invoiceDate }} {{$item->invoice_id }} {{ number_format($invoiceQty, 0) }} {{ number_format($subTotalBeforeTax, 2) }} {{ number_format($taxAmount, 2) }} {{ number_format($invoiceDiscount, 2) }} {{ number_format($totalWithTax, 2) }}
{{__('report.totalpricewithoudtax')}} {{ number_format($grandTotalBeforeTax, 2) }}
{{__('report.totaltax')}} {{ number_format($grandTotalTax, 2) }}
{{__('report.totalallprice')}} {{ number_format($grandTotalBeforeTax + $grandTotalTax, 2) }}

ختم المنشأة / اعتماد الإدارة

التوقيع والختم
@endsection @section('js') @endsection