@extends('layouts.app') @section('stitle', __('messages.accountStatement')) @section('title', __('messages.accountStatement')) @section('content')
@if(session()->get('title') == "success") @elseif (session()->get('title') == "error") @endif

{{(setUserLang() == "ar") ? $chartAcc->code .' - '. $chartAcc->arabic_name : $chartAcc->code .' - '. $chartAcc->name }}

@csrf
{{--
--}}
{{--
--}} {{--
--}} {{--
--}} {{--
{{__('messages.SupplierDetail')}}:
--}} {{--
{{$purchase_requisition->suppliers->name}}
--}} {{--

{{$purchase_requisition->suppliers->address}}

--}} {{--

{{$purchase_requisition->suppliers->email}}

--}} {{--
--}} {{--
--}} {{--
{{__('messages.PaymentDetails')}}:
--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{--
{{__('messages.Total')}} {{ $purchase_requisition->purchaseType->name }} :{{ number_format($purchase_requisition->total, 2) }} {{ Auth::user()->business->currency->symbol }}
{{__('messages.BankDetails')}}:{{$purchase_requisition->suppliers->bank_details}}
{{__('messages.VAT')}}:{{$purchase_requisition->suppliers->vat}}
--}} {{--
--}} {{--
--}} {{--
--}}
{{-- @foreach($data as $chartOfAcc)--}} {{-- @include('accounting.sub_category_view',['subcategories' => $chartOfAcc,'level' => 0, 'total_debit' => $total_debit])--}} {{-- @endforeach--}} @php $total_debit = 0; $total_credit = 0; @endphp @if($year_closing) @foreach($data as $journalEntry) @if($journalEntry->journal_type()->count() > 0) @if($journalEntry->journal_type->type == \App\Models\JournalEntryType::IS_SUPPLIER) @elseif($journalEntry->journal_type->type == \App\Models\JournalEntryType::IS_USER) @elseif($journalEntry->journal_type->type == \App\Models\JournalEntryType::IS_PAYMENT_METHOD) @elseif($journalEntry->journal_type->type == \App\Models\JournalEntryType::IS_PURCHASE_TYPE) @elseif($journalEntry->journal_type->type == \App\Models\JournalEntryType::VAT_TYPE) @elseif($journalEntry->journal_type->type == \App\Models\JournalEntryType::IS_WAREHOUSE) @elseif($journalEntry->journal_type->type == \App\Models\JournalEntryType::IS_BRANCH) @else @endif @else @endif @endforeach @if($total_credit > $total_debit) @else @endif @endif
{{__('messages.date')}} {{__('messages.account')}} {{__('messages.name')}} {{__('messages.TYPE')}} {{__('messages.transaction')}} {{__('messages.REFERENCE')}} {{__('messages.debits')}} {{__('messages.Credit')}} {{__('messages.balance')}} ({{ Auth::user()->business->currency->symbol }})
{{ $year_closing }} {{__('messages.opening_amount')}} {{ $opening_balance }}
{{ $journalEntry->getJournalEntry->journal_date }} {{ $journalEntry->getChartOfAccount->name }}{{$journalEntry->journal_type->supplier->name}}{{$journalEntry->journal_type->user->name}}{{$journalEntry->journal_type->paymentMethod->name}}{{$journalEntry->journal_type->purchaseType->name}}{{$journalEntry->journal_type->type_id == \App\Models\JournalEntryType::IS_INPUT ? "VAT - Incoming": "VAT - Outgoing" }}{{$journalEntry->journal_type->warehouse->name}}{{$journalEntry->journal_type->branch->name}}{{__('messages.journalEntry')}} {{ $journalEntry->comment }} {{ $journalEntry->getJournalEntry->entry_no }}

{{ $journalEntry->debit }} {{ Auth::user()->business->currency->symbol }}

{{ $journalEntry->credit }} {{ Auth::user()->business->currency->symbol }}

@if($journalEntry->debit != '0.00') @php $opening_balance += $journalEntry->debit; $total_debit +=$opening_balance; format_balance($opening_balance); Log::channel('test_log')->info("INSIDE DebitTotal: {$opening_balance}"); @endphp @else @php $opening_balance -= $journalEntry->credit; $total_credit +=$opening_balance; format_balance($opening_balance); Log::channel('test_log')->info("INSIDE CreditTotal: {$opening_balance}"); @endphp @endif

{{__('messages.total')}} {{ Auth::user()->business->currency->symbol }} {{ Auth::user()->business->currency->symbol }}
{{ $to_date }} {{__('messages.netMovement')}} 0.00 {{ Auth::user()->business->currency->symbol }} {{ format_balance(abs($opening_balance)) }}0.00 {{ Auth::user()->business->currency->symbol }} {{ format_balance(abs($opening_balance)) }}
{{ $to_date }} {{__('messages.closingBalance')}} {{ format_balance($opening_balance) }}
{{--
--}} {{--
--}} {{--
--}} {{--

--}} {{-- {{__('messages.CreatedBy')}}: ----}} {{--

--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--

{{__('messages.totalDebit')}}:

--}} {{--

{{ Auth::user()->business->currency->symbol }}

--}} {{--
--}} {{--
--}} {{--
--}} {{--

{{__('messages.totalCredit')}} :

--}} {{--

{{ Auth::user()->business->currency->symbol }}

--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}}
Note: It was a pleasure working with you and your team. We hope you will keep us in mind for future projects. Thank You!
@endsection @push('my_scripts') @endpush