@extends('layouts.app') @section('title') Generate Voucher @stop @section('breadcrumb') @stop @section('css') @endsection @section('content')
@if($entry->voucher_type == \App\GeneralJournalEntry::CRV) Cash Receipt Voucher @elseif($entry->voucher_type == \App\GeneralJournalEntry::BRV) Bank Receipt Voucher @elseif($entry->voucher_type == \App\GeneralJournalEntry::CPV) Cash Payment Voucher @elseif($entry->voucher_type == \App\GeneralJournalEntry::BPV) Bank Payment Voucher @elseif($entry->voucher_type == \App\GeneralJournalEntry::JV) Journal Voucher @endif @if($next) @endif                @if($previous) @endif
@if($entry->is_post)
Posted
@elseif($entry->is_check)
Checked
@else
Prepared
@endif

{{env('APP_NAME')}}

@if($entry->voucher_type == \App\GeneralJournalEntry::CRV) Cash Receipt Voucher @elseif($entry->voucher_type == \App\GeneralJournalEntry::BRV) Bank Receipt Voucher @elseif($entry->voucher_type == \App\GeneralJournalEntry::CPV) Cash Payment Voucher @elseif($entry->voucher_type == \App\GeneralJournalEntry::BPV) Bank Payment Voucher @elseif($entry->voucher_type == \App\GeneralJournalEntry::JV) Journal Voucher @endif


@if($entry->cheaque_no) Cheque# / Ins.#: @if($entry->cheaque_no) {{$entry->cheaque_no}} @endif @endif
@foreach($entries as $entry) @if($entry->controlAccount) Party : {{$entry->controlAccount ? $entry->controlAccount->name : ''}}
@endif @endforeach
@if($entry->bank_name) Bank Name: @if($entry->bank_name){{$entry->bank_name}} @endif @endif
Voucher No.: @if($entry->voucher_type == \App\GeneralJournalEntry::CRV) CRV-{{$entry->voucher_no}} @elseif($entry->voucher_type == \App\GeneralJournalEntry::BRV) BRV-{{$entry->voucher_no}} @elseif($entry->voucher_type == \App\GeneralJournalEntry::CPV) CPV-{{$entry->voucher_no}} @elseif($entry->voucher_type == \App\GeneralJournalEntry::BPV) BPV-{{$entry->voucher_no}} @elseif($entry->voucher_type == \App\GeneralJournalEntry::JV) JV-{{$entry->voucher_no}} @endif
Date {{date('d-m-Y',strtotime($entry->date))}}
Status @if($entry->is_post) Posted @elseif($entry->is_check) Checked @else Prepared @endif
Narration
{{$entry->voucher?$entry->voucher->narration:''}}

@foreach($entries as $entry) @endforeach
Sr No. Code Name Debit Credit
{{$sr++}} @if($entry->amount >0) {{$entry->account ? $entry->account->name : ''}}
{{ $entry->memo}} @else {{$entry->account ? $entry->account->name : ''}}
{{ $entry->memo}} @endif
@if($entry->transaction_type == \App\GeneralJournalEntry::booking) @if($entry->customer)              Owner : {{$entry->customer->name}} @endif @endif
{{$entry->amount > 0 ? number_format($entry->amount) : ''}} {{$entry->amount < 0 ? number_format(abs($entry->amount)) : ''}}
Total:   
{{number_format($sum)}}
{{number_format($sum)}}
@if($entry->transaction_type == \App\GeneralJournalEntry::receipt && $entry->receipt)
Receipt :     Amount Received Against Receipt No {{$entry->receipt->receipt_no}}
@endif @if($entry->transaction_type == \App\GeneralJournalEntry::bill && $entry->bill)
Bill :     {{$entry->bill->notes}} Bill No BILL-00{{$entry->bill->id}}
@endif @if($entry->transaction_type == \App\GeneralJournalEntry::massPayment && $entry->bills)
Detail :
@foreach($entry->bills as $bill) @endforeach
Sr # Bill # Date Notes Amount
{{$sr++}} BILL-00{{$bill->id}} {{date('d-m-Y',strtotime($bill->billed_at))}} {{$bill->notes}} {{number_format($bill->amount)}}
Total {{number_format($count)}}
@endif @if($entry->transaction_type == \App\GeneralJournalEntry::payment && $entry->bill)
Bill :     Payment Paid Againt Bill No BILL-00{{$entry->bill->id}}
@endif @if($entry->transaction_type == \App\GeneralJournalEntry::bill)
Balance :     {{number_format(abs($balance))}}
@endif @if($entry->transaction_type == \App\GeneralJournalEntry::payment || $entry->transaction_type == \App\GeneralJournalEntry::massPayment)
Previous Balance :     {{number_format($previousBalance)}}
Paid Amount :     {{number_format(abs($entry->amount))}}
Remaining Amount :     {{number_format($balance)}}
@endif



{{$entry->preparedBy ? $entry->preparedBy->name : ' '}}
Prepared By
{{$entry->checkedBy ? $entry->checkedBy->name : ' '}}
Checked By
{{$entry->postedBy ? $entry->postedBy->name : ' '}}
Posted By



 
 
 
Approved By
@if($entry->voucher_type == \App\GeneralJournalEntry::BPV || $entry->voucher_type == \App\GeneralJournalEntry::CPV)

ACKNOWLEDGEMENT RECEIPT


Received through Cheque / P.O. / Bank Transfer / Cash as per detail below:
Sr. No. Instruemnet Type Instruemnet Date Instruemnet No. Invoice No. Invoice Total Withholding Income Tax Withholding Sales Tax Net Payment Rs.
                 
                 
                 
                 
                 
Total
 
Recipient`s Name  
CNIC No.  
Mobile No.  
Signature  
@endif @if(!empty($entry->voucher->documents))

Voucher Documents

@php $images = json_decode( preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $entry->voucher->documents), true ); $check_image_issue=0; if(!empty($images)) { $count_val= count($images); } else{ $images= explode(",",$entry->voucher->documents); if(sizeof($images) > 0){ $count_val= sizeof($images) - 1; $check_image_issue =1; } } $file_ext = array('docx','pdf'); echo '
'; for($img = 0; $img < $count_val; $img++) { if($check_image_issue == 1){ // $images[$img] = preg_replace('/[\x00-\x1F\x80-\xFF]/','',$images[$img]); $images[$img]=str_replace(array('"', '[', ']' ), '', $images[$img]); $images[$img]=str_replace(array('#' ), '%23', $images[$img]); } $url = asset('storage/voucher_docs/'.$images[$img]); $urlExt = pathinfo($url, PATHINFO_EXTENSION); if (!in_array($urlExt, $file_ext)) { echo '
'; } if (in_array($urlExt, $file_ext)) { echo '
'; } } echo '
'; @endphp
@endif
@permission('print-voucher')
@endpermission @if(!$entry->is_check) @permission('voucher-check') Check @endpermission @elseif(!$entry->is_post) @permission('voucher-post') Post @endpermission @endif @permission('edit-voucher') Edit @endpermission @permission('reversal-voucher') @if($entry->is_post) Make Reversal Entry @endif @endpermission
@stop @section('js') @stop