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

@lang('accounting/warehouses/reports/general-purchase-invoices.purchase_invoices_report')

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

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

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

@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->cost * $result->quantity; } else { $total += $result->avg_cost * $result->quantity; } @endphp @endforeach @if (count($invoicesItems) > 0) @if ($selected_show_type == 'detailed') @endif @endif
@lang('accounting/warehouses/reports/general-purchase-invoices.item') @lang('accounting/warehouses/reports/general-purchase-invoices.invoice_number') @lang('accounting/warehouses/reports/general-purchase-invoices.invoice_date') @lang('accounting/warehouses/reports/general-purchase-invoices.supplier')@lang('accounting/warehouses/reports/general-purchase-invoices.quantity')@lang('accounting/warehouses/reports/general-purchase-invoices.unit_cost')@lang('accounting/warehouses/reports/general-purchase-invoices.cost') @lang('accounting/warehouses/reports/general-purchase-invoices.cost')
{{ $result->barcode->number . ' - ' . $result->barcode->ar_name }} {{ $result->purchase_invoice->bond_number }} {{ $result->purchase_invoice->date }} {{ $result->purchase_invoice->supplier->name }}{{ $result->quantity }}{{ dn($result->cost) }} {{ dn($result->cost * $result->quantity) }}{{ dn($result->avg_cost) }} {{ dn($result->avg_cost * $result->quantity) }}
@lang('accounting/warehouses/reports/general-purchase-invoices.sum') {{ dn($total) }}