@extends('admin.layout.master') @section('title','VOUCHER MANAGEMENT') @section('custom_style') @endsection @section ('content')
@include('admin.layout.title_header', ['title'=>'PAYABLE BILLS'])
{{-- @forelse ($cashBanks as $cashBank) @empty @endforelse --}} @php $types=[2=>'bank_payment',1=>'cash_payment',3=>'cash_receive',4=>'bank_receive',5=>'journal']; $routes=[2=>'voucher.bank_payment_vouchers',1=>'voucher.cash_payment_vouchers',3=>'voucher.cash_receive_vouchers',4=>'voucher.bank_receive_vouchers',5=>'voucher.journal_vouchers']; $filter_date_type=['date'=>'voucher date','preparation_date'=>'preparation_date','bill_date'=>'bill_date','created_at'=>'posting_date','approval_date'=>'approval_date']; $cashBankHtml=''; foreach ($cashBanks as $cashBank){ $selected=''; if($cashBank->id==getDefaultCashBankId()){ $selected='selected="true"'; } $cashBankHtml.=''; } @endphp

@if(checkAuthPermission('voucher.set_preparation_date')) @endif
@if(checkAuthPermission('voucher.cheque_allotment')) @endif
{{-- @if((Request()->filter_date && (Request()->filter_date=='approval_date'))) --}} {{-- --}} {{-- @else @endif --}} {{-- --}} {{-- --}} @php $searchedByGroup=(Request()->filter_date && (Request()->filter_date=='approval_date'))?$vouchers->sortBy('approvals.created_at'):$vouchers; @endphp @forelse ($searchedByGroup as $key=>$voucher) {{-- @if((Request()->filter_date && (Request()->filter_date=='approval_date'))) --}} @php if($voucher->approvals && count($voucher->approvals)){ $app_id=$voucher->approvals->first()->id; $app_date=$voucher->approvals->first()->created_at; }else{ $app_id=8888888899; }//endif @endphp {{-- --}} {{-- @else --}} {{-- --}} {{-- @endif --}} @php $journals=$voucher->journals->where('type',1); @endphp {{-- --}} {{-- --}} @empty @endforelse
# Vchr No Inv No DateApv.SLApv.DateVoucher IdStoreID Store Bill No Bill Date Chln No Prep Date PartyTypeNotesAmount Dues Action
approved_status>0) disabled @endif type="checkbox" value="{{$voucher->id}}" id="voucher_id_{{$voucher->id}}">
{{ $key+1}} {{ $voucher->voucher_no }} @php $reff=$voucher->reffInvoice??$voucher->reffFgInvoice; $printUrlArray=['','purchase-print?id=','purchase-print?id=','sell-print?id=','sell-print?id=','adjustment-print?id=','adjustment-print?id=','adjustment-print?id=','issue-print?id=','issue-print?id=','store_transfer-print?model=0&store_invoice_id=', 'store_transfer-print?model=1&store_invoice_id=', 'production-print?id=', 'opening-print?id=','','','adjustment-print?id=', 'purchase-contract-print?id=', 'sales-contract-print?id=']; @endphp @if($reff) @if(!$reff->ref_type) @endif {{$reff->invoice_no}} @endif {{ date('d-M-Y', strtotime($voucher->date))}} {{$app_id}}{{date('d-M-Y', strtotime($app_date))}}{{$voucher->id}}{{$voucher->warehouse_id}} {{ $voucher->warehouse? $voucher->warehouse->name_eng:'' }} {{ $voucher->bill_no }} {{ $voucher->bill_date?date('d-M-Y', strtotime($voucher->bill_date)):''}} {{ $voucher->reff_no }} {{ $voucher->preparation_date?date('d-M-Y', strtotime($voucher->preparation_date)):''}} {{ count($journals)? ($journals->first()->ledger->name):'' }}{{ strtoupper(str_replace('_',' ',$types[$voucher->type]))}}{{ $voucher->note}}{{ $voucher->transaction_amount}} {{ number_format($voucher->due,2)}} @if(checkAuthPermission('voucher.voucher_details')) @endif @if(checkAuthPermission($routes[$voucher->type]) && checkAuthPermission('voucher.journal_voucher_update')) @endif @if($voucher->approved_status==0 && $voucher->preparation_date) @if(checkAuthPermission('voucher.set_approval_of_bill')) @endif @endif @if($voucher->approved_status==1 && $voucher->preparation_date) @endif {{-- --}}
{{-- --}}
@include('admin.modals.cheque_detail_modal') @endsection @section('script') @stop