@php $selected_branches = request('branches')?? []; @endphp
@php $based_on_list = [ ['label' => 'العائلة', 'value' => 'category'], ['label' => 'المورّد', 'value' => 'supplier'], ['label' => 'العميل', 'value' => 'client'], ['label' => 'المادة', 'value' => 'item'], ['label' => 'بلد المنشأ', 'value' => 'country'], ]; $selected_based_on = request('based_on') ?? 'category'; @endphp
@php $show_items = (request('show_items'))? true : false; @endphp
@php $show_zeros = (request('show_zeros'))? true : false; @endphp

@lang('accounting/warehouses/reports/sales-and-profit.sales_and_profits')

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

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

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

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

@endif
@endif
@php $table_options = [ 'lang' => ['noAvailableData' => __('noAvailableData.no_data')], ]; @endphp @if ($show_items || $selected_based_on == 'item') @else @endif @php $total_amount = $total_cost = $total_profit = 0; $ignore_rows_amount = $show_items ? true : false; @endphp @foreach ($sales_profit_rows as $sales_profit_row) @if ($sales_profit_row['row_type'] == 'header') @if ($show_items || $selected_based_on == 'item') @else @endif @php $total_amount += $sales_profit_row['total_sales_amount']; $total_cost += $sales_profit_row['total_cost']; $total_profit += $sales_profit_row['profit']; @endphp @else @endif @endforeach @if (count($sales_profit_rows) > 0) @if ($show_items || $selected_based_on == 'item') @endif @endif
@lang('accounting/warehouses/reports/sales-and-profit.item_code') @lang('accounting/warehouses/reports/sales-and-profit.unit_code') @lang('accounting/warehouses/reports/sales-and-profit.item_description') @lang('accounting/warehouses/reports/sales-and-profit.unit') @lang('accounting/warehouses/reports/sales-and-profit.net_quantity')-- -- --@lang('accounting/warehouses/reports/sales-and-profit.net_value') @lang('accounting/warehouses/reports/sales-and-profit.net_cost') @lang('accounting/warehouses/reports/sales-and-profit.profit') @lang('accounting/warehouses/reports/sales-and-profit.profit_margin') @lang('accounting/warehouses/reports/sales-and-profit.profit_percentage')
{{ $sales_profit_row['header_name'] }} : {{ $sales_profit_row['header_id'] }} {{ $sales_profit_row['object_name'] }} {{ dn($sales_profit_row['total_quantity']) }} {{ dn($sales_profit_row['total_sales_amount']) }} {{ dn($sales_profit_row['total_cost']) }} {{ dn($sales_profit_row['profit']) }} {{ dn($sales_profit_row['markup_profit_ratio']) }}% {{ dn($sales_profit_row['margin_profit_ratio']) }}%{{ dn($sales_profit_row['total_sales_amount']) }} {{ dn($sales_profit_row['total_cost']) }} {{ dn($sales_profit_row['profit']) }} {{ dn($sales_profit_row['markup_profit_ratio']) }}% {{ dn($sales_profit_row['margin_profit_ratio']) }}%
{{ $sales_profit_row['item']->id }} {{ $sales_profit_row['item']->main_barcode?->unit->id }} {{ $sales_profit_row['item']->ar_name }} {{ $sales_profit_row['item']->main_barcode?->unit->name }} {{ dn($sales_profit_row['total_quantity']) }} {{ dn($sales_profit_row['total_sales_amount']) }} {{ dn($sales_profit_row['total_cost']) }} {{ dn($sales_profit_row['profit']) }} {{ dn($sales_profit_row['markup_profit_ratio']) }}% {{ dn($sales_profit_row['margin_profit_ratio']) }}%
المجموع {{ dn($total_amount) }} {{ dn($total_cost) }} {{ dn($total_profit) }}
@push('script') @endpush