{{__('messages.Accounting Entry details')}} ({{$accountEntry->entry_no}})

@livewire('accounting-entries-train-component',['component_name'=>"add accounting_entries",'entry' => $accountEntry , 'entry_id' => $accountEntry->id,'is_balanced' => true])
@if (session()->has('message'))
{{ session('message') }}
@endif @if (session()->has('error'))
{{ session('error') }}
@endif
{{__('messages.No.')}}
{{ $accountEntry->entry_no}}
{{__('messages.entry_date')}}
{{ $accountEntry->entry_date}}
{{__('messages.Total Amount')}}
{{ $accountEntry->total_amount}} {{ $accountEntry->Currency->name}}
{{trans_choice('messages.currency',1)}}
{{ ($accountEntry->Currency)?$accountEntry->Currency->name:'-'}}
{{__('messages.is_carried_forward')}}
@if( $accountEntry->is_carried_forward == 1 ) @else @endif
{{__('messages.Accounting Daily Type')}}
{{ ($accountEntry->accountingDailyType)?$accountEntry->accountingDailyType->name : '-'}}
{{__('messages.Updated By')}}
{{ ($accountEntry->last_updated_by_user)?$accountEntry->last_updated_by_user->name:"-"}}
{{__('messages.Created At')}}
{{\Carbon\Carbon::createFromTimeString($accountEntry->created_at)->translatedFormat('M j, Y, g:i a')}}
{{__('messages.Updated At')}}
{{\Carbon\Carbon::createFromTimeString($accountEntry->updated_at)->translatedFormat('M j, Y, g:i a')}}
{{__('messages.comment')}}
{{ $accountEntry->comment}}

{{__('messages.Accounting Entry details')}}

{{-- --}} @forelse ($accountingEntryDetails as $key =>$accountingEntryDetail) {{-- --}} @empty @endforelse @php $total_debit = \App\Models\AccountingEntryDetail::where('accounting_entry_id',$accountEntry->id)->where('type','debit')->sum('amount'); $total_credit = \App\Models\AccountingEntryDetail::where('accounting_entry_id',$accountEntry->id)->where('type','credit')->sum('amount'); @endphp
#

{{__('messages.cost_center')}}

{{__('messages.Account No.')}}

{{__('messages.Accounting Account')}}

{{__('messages.Debit')}}

{{__('messages.Credit')}}

{{__('messages.comment')}}

{{$loop->iteration}} {{($accountingEntryDetail->costCenter)?$accountingEntryDetail->costCenter->name:'-'}} {{($accountingEntryDetail->accountingAccount)?$accountingEntryDetail->accountingAccount->no:'-'}} {{($accountingEntryDetail->accountingAccount)?$accountingEntryDetail->accountingAccount->name:'-'}} @if($accountingEntryDetail->type == 'debit') {{$accountingEntryDetail->amount}} @else - @endif @if($accountingEntryDetail->type == 'credit') {{$accountingEntryDetail->amount}} @else - @endif {{$accountingEntryDetail->comment}}
{{__('messages.Debit')}} : {{$total_debit}} {{__('messages.Credit')}} : {{$total_credit}} @if($total_debit == $total_credit) Balanced @else Not Balanced @endif
@if($prv = \App\Models\AccountingEntry::where('id', '<', $accountEntry->id)->where("company_financial_tree_id" ,session()->get("company_choose")["company_financial_tree_id"])->max('id'))
{{__('messages.Previous')}}
@endif
@if($next = \App\Models\AccountingEntry::where('id', '>', $accountEntry->id)->where("company_financial_tree_id" ,session()->get("company_choose")["company_financial_tree_id"])->min('id'))
{{__('messages.Next')}}
@endif