@extends('tenant.layouts.master', ['pdf_title' => 'test']) @section('breadcrumb') @php $breadcrumb_items[__('breadcrumb.home')] = '/'; if ($module == 'warehouses') { $breadcrumb_items[__('breadcrumb.warehouses')] = '/warehouses/branches'; } elseif ($module == 'accounting') { $breadcrumb_items[__('breadcrumb.accounting')] = '/accounting/accounts'; } elseif ($module == 'rentals') { $breadcrumb_items[__('breadcrumb.rentals')] = '#'; } $breadcrumb_items[__('breadcrumb.receivables')] = route('tenant.receivables.index', ['module' => $module]); $breadcrumb_items[__('breadcrumb.receivable_account_statement')] = '#'; @endphp @include('tenant.layouts.breadcrumb', ['items' => $breadcrumb_items]) @endsection @section('sidebar') @include('tenant.layouts.sidebar', ['activeItem' => "{$module}.receivables"]) @endsection @section('style') @if ($statement_items->count() == 0) @endif @endsection @section('content')

@php $action_types = [ ['label' => 'سند قيد', 'value' => 'entry', 'modules' => ['accounting']], ['label' => 'سند صرف', 'value' => 'exchange', 'modules' => ['accounting']], [ 'label' => 'فاتورة بيع خدمات', 'value' => 'service-invoice', 'modules' => ['accounting'], ], [ 'label' => 'شيكات صادرة', 'value' => 'exchange-checks', 'modules' => ['accounting'], ], [ 'label' => 'شيكات واردة', 'value' => 'receipt-checks', 'modules' => ['accounting'], ], [ 'label' => 'سند قبض', 'value' => 'receipt', 'modules' => ['accounting', 'rentals', 'warehouses'], ], [ 'label' => 'إشعارات مدينة', 'value' => 'debit-note', 'modules' => ['accounting', 'rentals'], ], [ 'label' => 'إشعارات دائنة', 'value' => 'credit-note', 'modules' => ['accounting', 'rentals'], ], [ 'label' => 'فاتورة مشتريات', 'value' => 'purchase-invoice', 'modules' => ['warehouses'], ], [ 'label' => 'فاتورة مبيعات', 'value' => 'sales-invoice', 'modules' => ['warehouses'], ], [ 'label' => 'مردود فاتورة مشتريات', 'value' => 'returned-purchase-bond', 'modules' => ['warehouses'], ], [ 'label' => 'مردود فاتورة مبيعات', 'value' => 'returned-sales-bond', 'modules' => ['warehouses'], ], ]; $old_action_types = request()->action_types ?? []; @endphp

@php $selected_fiscal_year = (request()->fiscal_year)?? $active_year->id; @endphp
@php $from_date = (request()->from_date)?? $active_year->from; @endphp
@php $to_date = (request()->to_date)?? $active_year->to; @endphp
@if ($cost_centers_activation && !isset($mode))
@endif
{{-- Delete Account Form --}}
@csrf @method('DELETE')
{{-- Statement Items List --}}
{{-- Header Of Page --}}

@lang('receivables/show.account'): {{ $account->name . ' - ( ' . $account->id_by_receivable_type . ' )' }}

@lang('receivables/show.from_date') : {{ request()->from_date ?? $active_year->from }}

@lang('receivables/show.to_date') : {{ request()->to_date ?? $active_year->to }}

@lang('receivables/show.opening_balance') : {{ $initial_balance ? dn($initial_balance) : dn(0) }}
@php $query = '?'. http_build_query(request()->all()); @endphp
  • @if ($module == 'rentals' || $account->receivable_type->id == 1)
  • @endif
  • @lang('receivables/show.download_pdf')
  • @lang('receivables/show.export_excel')
  • @if ($account->is_deletable)
  • @endif @if ($module != 'rentals') @php $total_unposted_checks = $unposted_receipt_checks + $unposted_exchange_checks->count(); @endphp
  • @lang('receivables/show.due_checks') {{ $total_unposted_checks }}
  • @lang('receivables/show.representatives')
  • @endif
    @php $table_options = [ 'enableSumValuesOnColumns' => [1, 2], 'lang' => ['noAvailableData' => __('receivables/show.no_data')], 'sumValuesCell' => 'b', 'columnResizer' => false, 'hideColumn' => false, ]; $diff_sum_data = ['target_col_index' => 0, 'first_col_index' => 1, 'second_col_index' => 2]; @endphp {!! $cost_centers_activation ? '' : '' !!} @php $balance = $initial_balance ?? 0; $debit_sum = 0; $credit_sum = 0; @endphp @foreach ($statement_items as $statement_item) @php $balance += $statement_item->amount; $debit_sum += $statement_item->amount > 0 ? $statement_item->amount : 0; $credit_sum += $statement_item->amount < 0 ? abs($statement_item->amount) : 0; @endphp @if ($cost_centers_activation) @endif @endforeach {!! $cost_centers_activation ? '' : '' !!}
    @lang('receivables/show.balance') @lang('receivables/show.debtor') @lang('receivables/show.creditor') @lang('receivables/show.transaction_type') @lang('receivables/show.transaction_number') @lang('receivables/show.date')مركز الكلفة @lang('receivables/show.description')
    {{ dn($balance) }} {{ $statement_item->amount > 0 ? dn($statement_item->amount) : '--' }} {{ $statement_item->amount < 0 ? dn(abs($statement_item->amount)) : '--' }} {{ $statement_item->title }} @if ($statement_item->action_type === 'automated-entry') @else {{ $statement_item->resource_title ?? $statement_item->statement_item_id }} @endif {{ $statement_item->date }} {{ $statement_item->cost_center?->ar_name ?? '--' }} {{ $statement_item['notice'] ?? $statement_item->bond['automated_notice'] ?? '--' }}
    @lang('receivables/show.period_balance') : {{ dn($balance) }} {{ $balance < 0 ? 'دائن' : ($balance > 0 ? 'مدين' : '') }} {{ dn($debit_sum) }} {{ dn($credit_sum) }}
    @lang('receivables/show.period_balance') : {{ dn($balance) }}
    @lang('receivables/show.total_balance') : {{ dn($balance) }}
    {{-- Change password modal form --}}
    @endsection @push('script') @endpush