@extends('admin.layout.master') @section('title',__('accounts.voucher_management')) @section('custom_style') @endsection @section ('content') {{-- @dd($action_id); --}}
@include('accounts.voucher.edit_modal') @include('admin.layout.title_header', ['title'=>__('accounts.'.strtolower($voucher_type['name'])).($voucher_type['is_request']?(' ('.__('obs.'.($voucher_type['is_request']==2?'unposted':'request')).')'):'')]) @php $routePreFix=$voucher_type['is_request']?'voucher_request.':'voucher.'; $cash_bank_type=(($voucher_type['type']==1)||($voucher_type['type']==3))?1:2; $payment=(($voucher_type['type']==1)||($voucher_type['type']==2))?1:0; $optionHtml=''; @endphp
@include('accounts.voucher.install_form',['button_type'=>'submit','index'=>true,'tran_type'=>31])

@php $cash_bank_type=(($voucher_type['type']==1)||($voucher_type['type']==3))?1:2; $tAmount=0; @endphp
@php $is_same = current_warehouse() == current_store(); @endphp @if($voucher_type['type'] == 7) @endif {{-- --}} @if ($is_same) @endif @forelse ($vouchers as $key=>$voucher) @php $action_id = getAccountsActionIds($voucher->type); $tAmount+=$voucher->transaction_amount; $route = ''; $reff = ''; $attachment = null; $extension = null; if ($voucher?->reffInvoice) { $route = route('purchase.print', ['id' => $voucher?->reffInvoice?->id, 'is_pos_print' => 1]); $reff = $voucher->reffInvoice->invoice_no ?? ''; } else if ($voucher?->requestVoucher) { $route = route('voucher_request.voucher_details', ['voucher_id' => $voucher?->requestVoucher?->id]); $reff = $voucher->requestVoucher->voucher_no ?? ''; } else {} if ($voucher?->attachment) { $attachment = asset(''.$voucher?->attachment); } else if ($voucher?->requestVoucher?->attachment) { $attachment = asset(''.$voucher?->requestVoucher?->attachment); } else if ($voucher?->reffInvoice?->attachment) { $attachment = asset('storage'.'/'.$voucher?->reffInvoice?->attachment); } else {} @endphp @if($voucher_type['type'] == 7) @endif {{-- --}} @if ($is_same) @endif {{-- --}} @empty @endforelse

{{__('accounts.'.strtolower($voucher_type['name']))}}

{{__('obs.sl')}} {{__('obs.date')}} {{__('obs.voucher')}} {{__('obs.no')}}{{__('obs.voucher_type')}}{{__('obs.reff')}} {{__('obs.no')}}{{__('obs.type')}}{{__('obs.hotel')}}{{__('obs.note')}} {{__('obs.created_by')}} {{__('obs.amount')}} {{__('obs.create_date')}} {{__('obs.action')}} @if (checkAuthPermission('voucher.voucher_approval_check'))
@endif
{{($key+1)}} {{ date('Y-M-d', strtotime($voucher->date))}} {{ $voucher->voucher_no }} @if ($attachment && empty($reff)) (Attachment) @endif {{ getFilterVoucherType($voucher->type) }}{{ strtoupper(str_replace('_',' ',$voucher_type['name']))}} {{ $reff }} @if ($attachment && !empty($reff)) {{-- @if ($extension == 'pdf') @else @endif --}} (Attachment) @endif {{ $voucher->warehouse->name_eng ?? '' }} {{ $voucher->note}} {{ $voucher->madeBy->name ?? ''}} {{ number_format($voucher->transaction_amount,2)}} {!! isset($approvals[$voucher->id]) ? $approvals[$voucher->id] : ($voucher->approve_status == 1 ?__('obs.approved') : '') !!} {{ date('d-m-Y H:i:s', strtotime($voucher->created_at))}} @php $edit_url = $voucher->posting_view->edit??$routePreFix.'voucher_edit'; $print_url = $voucher->posting_view->print ?? ($is_request_voucher ? 'voucher_request.voucher_details' : 'voucher.voucher_details'); @endphp
@if($print_url != 'voucher.voucher_details' && checkAuthPermission($print_url)) @elseif($print_url == 'voucher.voucher_details' && checkAuthPermission($routePreFix.'voucher_details')) @endif @if(isVoucherEditableModuleWise($voucher->module_id) && $voucher->integrated_id == null) @if(checkAuthPermission($edit_url)) @else @if(!($voucher_type['is_request'] == 1)) {{-- single Entry edit --}} @if(checkAuthPermission('voucher.voucher_posting_edit')) @endif @endif @endif @if(checkAuthPermission($routePreFix.'voucher_delete')) @endif @endif Log
@if($voucher_type['is_request'] == 1 && ($voucher->status == 0) && checkAuthPermission('voucher.voucher_approval_check'))
@else @if($voucher->status==0) {!! getApprovalInputField($voucher->id, $action_id, $voucher->transaction_amount) !!} @else @endif @endif @if ($action_id) @php $model = $is_request_voucher ? "App\\Models\\Accounts\\RequestVoucher" : "App\\Models\\Accounts\\Voucher"; @endphp @endif
{{__('obs.total')}} {{__('obs.transaction')}} {{__('obs.amount')}} {{number_format($tAmount,2)}}
{{-- --}}
@include('accounts.voucher.modal_accounts_ledger') @include('accounts.voucher.modal_head_accounts_code') {{-- @include('accounts.voucher.edit_voucher_modal') --}} @endsection @section('script') @include('accounts.voucher.voucher_js') @stop