@php $selected_branches = request('branches')?? []; @endphp
@php $selected_show_type = request('show_type')?? 'detailed'; @endphp

@lang('accounting/warehouses/reports/general-sales-invoices.sales_invoices_report')

@lang('accounting/warehouses/reports/general-sales-invoices.download_pdf') @php $query = (count(request()->all()) > 0)? '?' . explode('?', request()->fullUrl())[1] : "" @endphp @lang('accounting/warehouses/reports/general-sales-invoices.export_excel')
@php $from_date = request('from_date') ?? $active_year->from; $to_date = request('to_date') ?? $active_year->to; @endphp
@if(request()->from_date)

@lang('accounting/warehouses/reports/sales-and-profit.from_date') {{ $from_date }}

@endif @if(request()->to_date)

@lang('accounting/warehouses/reports/sales-and-profit.to_date') {{ $to_date }}

@endif
@php $table_options = [ 'lang' => ['noAvailableData' => __('noAvailableData.no_data')], ]; @endphp @if ($selected_show_type == 'detailed') @endif @if ($selected_show_type == 'detailed') @else @endif @php $total= 0; @endphp @foreach ($invoicesItems as $result) @if ($selected_show_type == 'detailed') @endif @if ($selected_show_type == 'detailed') @else @endif @php if ($selected_show_type == 'detailed') { $total += $result->price * $result->quantity; } else { $total += $result->avg_price * $result->quantity; } @endphp @endforeach @if (count($invoicesItems) > 0) @if ($selected_show_type == 'detailed') @endif @endif
@lang('accounting/warehouses/reports/general-sales-invoices.item')@lang('accounting/warehouses/reports/general-sales-invoices.invoice_number') @lang('accounting/warehouses/reports/general-sales-invoices.invoice_date') @lang('accounting/warehouses/reports/general-sales-invoices.supplier')@lang('accounting/warehouses/reports/general-sales-invoices.quantity')@lang('accounting/warehouses/reports/general-sales-invoices.unit_cost')@lang('accounting/warehouses/reports/general-sales-invoices.price') @lang('accounting/warehouses/reports/general-sales-invoices.total')
{{ $result->barcode?->number . ' - ' . $result->barcode?->ar_name }} {{ $result->sales_invoice->bond_number }} {{ $result->sales_invoice->date }} {{ $result->sales_invoice->client_name }}{{ $result->quantity }}{{ dn($result->price) }} {{ dn($result->price * $result->quantity) }}{{ dn($result->avg_price) }} {{ dn($result->avg_price * $result->quantity) }}
@lang('accounting/warehouses/reports/general-sales-invoices.sum') {{ dn($total) }}