@php $to_date = (request()->to_date)?? $active_year->to; @endphp
@php $selected_branches = request('branches')?? []; @endphp
@php $based_on_list = [ ['label' => 'العائلة', 'value' => 'category'], ['label' => 'المورّد', 'value' => 'supplier'], ['label' => 'المادة', 'value' => 'item'], ['label' => 'بلد المنشأ', 'value' => 'country'], ]; $selected_based_on = request('based_on') ?? 'category'; @endphp
@php $selected_level = request('category_level')?? 5; @endphp

@lang('accounting/warehouses/reports/warehouse-stocktaking.inventory_warehouses')

@lang('accounting/warehouses/reports/warehouse-stocktaking.download_pdf') @php $query = (count(request()->all()) > 0)? '?' . explode('?', request()->fullUrl())[1] : "" @endphp @lang('accounting/warehouses/reports/warehouse-stocktaking.export_excel')
@if (request()->to_date)

@lang('accounting/warehouses/reports/warehouse-stocktaking.inventory_as_of_date') {{ request()->to_date }}

@endif
@php $ignore_rows_amount = $show_items ? true : false; @endphp @foreach ($stocktaking_rows as $stocktaking_row) @php $is_main_item_row = $stocktaking_row['is_main_item_row'] ?? false; @endphp @if ($stocktaking_row['row_type'] == 'header') @elseif ($stocktaking_row['row_type'] == 'sub_barcode') @else @endif @endforeach @if (count($stocktaking_rows) > 0) @php $total_quantity = $total_cost = 0; if ($selected_based_on != 'item') { $total_quantity = collect($stocktaking_rows) ->where('row_type', 'header') ->sum('total_quantity'); $total_cost = collect($stocktaking_rows) ->where('row_type', 'header') ->sum('total_cost'); } else { $total_quantity = collect($stocktaking_rows) ->where('row_type', 'content') ->sum('quantity'); $total_cost = collect($stocktaking_rows) ->where('row_type', 'content') ->sum('total'); } @endphp @endif
@lang('accounting/warehouses/reports/warehouse-stocktaking.item_code') @lang('accounting/warehouses/reports/warehouse-stocktaking.unit_code') @lang('accounting/warehouses/reports/warehouse-stocktaking.item_description') @lang('accounting/warehouses/reports/warehouse-stocktaking.unit_description') @lang('accounting/warehouses/reports/warehouse-stocktaking.quantity') @lang('accounting/warehouses/reports/warehouse-stocktaking.cost') @lang('accounting/warehouses/reports/warehouse-stocktaking.total_cost')
{{ $stocktaking_row['header_name'] }} : {{ $stocktaking_row['header_id'] }} {{ $stocktaking_row['object_name'] }} {{ dn($stocktaking_row['total_quantity']) }} {{ dn($stocktaking_row['total_cost']) }}
الباركود الفرعي {{ $stocktaking_row['barcode']->number }} {{ $stocktaking_row['barcode']->ar_name }} @if (!$is_main_item_row) {{ $stocktaking_row['barcode']->unit?->name }} @endif {{ dn($stocktaking_row['quantity']) }} @if (!$is_main_item_row) {{ dn($stocktaking_row['cost']) }} @endif {{ dn($stocktaking_row['total']) }}
{{ $stocktaking_row['item']->full_number ?? '' }} @if (!$is_main_item_row) {{ $stocktaking_row['item']->main_barcode->number }} @endif {{ $stocktaking_row['item']->ar_name ?? '' }} @if (!$is_main_item_row) {{ $stocktaking_row['barcode']->unit?->name ?? '' }} @endif {{ dn($stocktaking_row['quantity']) }} @if (!$is_main_item_row) {{ dn($stocktaking_row['cost']) }} @endif {{ dn($stocktaking_row['total']) }}
{{ dn($total_quantity) }} {{ dn($total_cost) }}
@push('script') @endpush