{{-- Office Copy --}} @php $references = []; $references = $items['item']->references->implode('reference' , ', '); $is_official = $items['item']->is_official ?? 1; @endphp @if (request()->get('office'))
@include('admin.partials.image-watermark') @include('admin.partials.branch-watermark') @include('admin.partials.receipt-header', ['extra' => $extra,'sell'=>$items['sell']])

Receipt

Sale Date : {{ date(config('settings.date_format'), strtotime(trim(str_replace('/', '-', $items['sell']->sale_date_v2)))) }}
Customer : {{ $items['sell']->customer->name }} {{ !empty($name) ? $name : '' }}
Project : {{ $items['sell']->branch->name }}
@if ($data['branch']['show_branch_logo'] == 1) @endif
Voucher No. : {{ $items['item']->receipt_no }}
Registration No. : {{ $items['sell']->registration_no }}
Unit No. : {{ strtoupper($items['sell']->product_id) }}
OFFICE COPY
@php $totalPaymentAmount = 0; $totalDocumentAmount = 0; $pCounter = 1; $dCounter = 1; $total_received = 0; $total_balance = 0; @endphp
Payment Details
@foreach ($items['payment_item'] as $item) @php $totalPaymentAmountClient += $item['payable_amount']; $received_client = $item['payment_received_amount'] + $item['already_received_amount']; if($is_official == 0){ $received_client = $item['unofficial_payment_received_amount'] + $item['already_received_amount']; } $surchargeAmoutClient = App\Models\ActualReceivedItem::where('schedule_receivable_id', $item['id'])->first()->surcharge_amount; $balance_client = $item['payable_amount'] - $received_client; $total_received_client += $received_client; $total_balance_client += $balance_client; @endphp {{-- --}} {{-- @if ($surchargeCheck) @endforeach
S. No. Payment Schedule Date Payable Amount {{$transaction->systemSettingCurrency()}} Received Amount {{$transaction->systemSettingCurrency()}} Outstanding Amount {{$transaction->systemSettingCurrency()}}
{{ $pCounter++ }}{{ str_contains($item['term'], "Installment") ? preg_replace('/[0-9]+/', '', $item['term']) . '- ' . $item['installment_repeat'] : $item['term'] }}{{ $item['term'] }} {{ date(config('settings.date_format'), strtotime($item['schedule_date'])) }} {{ $transaction->convert_money_format($item['payable_amount']) }} {{ $transaction->convert_money_format($received_client) }} {{ $transaction->convert_money_format($balance_client) }}{{ $transaction->convert_money_format($surchargeAmout) }} @endif --}}
Total {{ $transaction->convert_money_format($totalPaymentAmountClient) }} {{ $transaction->convert_money_format($total_received_client) }} {{ $transaction->convert_money_format($total_balance_client) }}
Receipt Document Details
@if ($surchargeCheck) @endif @if ($surchargeCheck) @endif @foreach ($items['item']['items'] as $value) @php $totalDocumentAmount += $value['received_amount']; @endphp @if ($surchargeCheck) @else @endif @if ($surchargeCheck) @endforeach @if (!$surchargeCheck) @else @endif
S. No. Payment Sub Total {{$transaction->systemSettingCurrency()}} Surcharges {{$transaction->systemSettingCurrency()}} Total {{$transaction->systemSettingCurrency()}}
{{ $dCounter++ }} {{ $value['term'] }} {{ $transaction->convert_money_format($value['received_amount']) }} {{ $transaction->convert_money_format($value['received_amount']) }}{{ $transaction->convert_money_format($surchargeAmout) }} @endif @if ($surchargeCheck) {{ $transaction->convert_money_format($surchargeAmout + $value['received_amount']) }} @endif
Total {{ $transaction->convert_money_format($totalDocumentAmount) }} {{ $transaction->convert_money_format($totalDocumentAmount + $surchargeAmout) }}
@if (!empty($items['item']->particulars))

Particulars: {{ $items['item']->particulars }}

@endif {{-- @php if(!empty($items['item']->bank_id)) { $modeOfPayment = \App\Models\IncomeExpenseHead::find($items['item']->bank_id)->name; if($modeOfPayment == "Loss On File") { $modeOfPayment = 'FILE MERGE'; } } else { $modeOfPayment = 'Cash'; } @endphp --}} @php $modeOfPayment = $items['item']->made_of_payment; // if ($items['item']->made_of_payment == 'Other' || $items['item']->made_of_payment == 'other') { // $modeOfPayment = 'Other'; // } // if ($items['item']->made_of_payment == 'Bank' || $items['item']->made_of_payment == 'bank') { // $modeOfPayment = 'Bank'; // if ($modeOfPayment == 'Loss On File') { // $modeOfPayment = 'FILE MERGE'; // } // } // if ($items['item']->made_of_payment == 'Cash' || $items['item']->made_of_payment == 'cash') { // $modeOfPayment = 'Cash'; // } // if ($items['item']->made_of_payment == 'Online Transfer' || $items['item']->made_of_payment == 'online transfer') { // $modeOfPayment = 'Online Transfer'; // } // if ($items['item']->made_of_payment == 'CHEQUE IN HAND' || $items['item']->made_of_payment == 'cheque in hand') { // $modeOfPayment = 'CHEQUE IN HAND'; // } @endphp {{-- @if ($items['item']->made_of_payment != 'Cash') @endif --}} @if ($modeOfPayment != 'Cash') @endif
Amount {{$transaction->systemSettingCurrency()}} : {{ $transaction->convert_money_format($items['item']->actual_amount) }}Payment Date : {{ date(config('settings.date_format'), strtotime(trim(str_replace('/', '-', $items['item']->cheque_date)))) }}
Amount in Words : {!! config('settings.currency_code') !!} {{ $transaction->convert_number_to_words($items['item']->actual_amount) }} ONLY Instrument Date : {{ date(config('settings.date_format'), strtotime(trim(str_replace('/', '-', $items['item']->cheque_date)))) }}
Issued By : {{ App\Models\User::where(['email' => $items['item']->created_by])->first()->name }} Date of Collection : {{ date(config('settings.date_format'), strtotime(trim(str_replace('/', '-', $items['item']->date_of_collection)))) }}
Instrument No : {{ !empty($items['item']->cheque_no) ? $items['item']->cheque_no : $items['item']->remark }} Mode of Payment : {{ $modeOfPayment }}
Reference No : {{ !empty($references) ? $references : $items['item']->remark }}
- - - - - - - - - - - - - - - - - - - - - - -
{{ $getSystemPermissions['receipts']['receipt_pdf_stamp1'] ?? 'Authorized Signature' }}
- - - - - - - - - - - - - - - - - - - - - -
{{ $getSystemPermissions['receipts']['receipt_pdf_stamp2'] ?? 'Authorized Stamp' }}
@endif {{-- Client Copy --}} @if (request()->get('client'))
@include('admin.partials.image-watermark') @include('admin.partials.branch-watermark') @include('admin.partials.receipt-header', ['extra' => $extra])

Receipt

Sale Date : {{ date(config('settings.date_format'), strtotime(trim(str_replace('/', '-', $items['sell']->sale_date_v2)))) }}
Customer : {{ $items['sell']->customer->name }} {{ !empty($name) ? $name : '' }}
Project : {{ $items['sell']->branch->name }}
Voucher No. : {{ $items['item']->receipt_no }}
Registration No. : {{ $items['sell']->registration_no }}
Unit No. : {{ strtoupper($items['sell']->product_id) }}
CLIENT COPY
@php $totalPaymentsAmount = 0; $totalDocumentAmount = 0; $pCounter = 1; $dCounter = 1; $total_received = 0; $total_balance = 0; @endphp
Payment Details
{{-- @if ($surchargeCheck) @endif --}} @foreach ($items['payment_item'] as $item) @php $totalPaymentsAmountClient += $item['payable_amount']; $received_client = $item['payment_received_amount'] + $item['already_received_amount']; if($is_official == 0){ $received_client = $item['unofficial_payment_received_amount'] + $item['already_received_amount']; } $surchargeAmoutClient = App\Models\ActualReceivedItem::where('schedule_receivable_id', $item['id'])->first()->surcharge_amount; $balance_clients = $item['payable_amount'] - $received_client; $total_receiveds_client += $received_client; $total_balance_clients += $balance_clients; @endphp {{-- @dd($totalPaymentAmountClient) --}} {{-- --}} {{-- @if ($surchargeCheck) @endforeach
S. No. Payment Schedule Date Payable Amount {{$transaction->systemSettingCurrency()}} Received Amount {{$transaction->systemSettingCurrency()}} Outstanding Amount {{$transaction->systemSettingCurrency()}} Surcharge {{$transaction->systemSettingCurrency()}}
{{ $pCounter++ }}{{ str_contains($item['term'], "Installment") ? preg_replace('/[0-9]+/', '', $item['term']) . '- ' . $item['installment_repeat'] : $item['term'] }}{{ $item['term'] }} {{ date(config('settings.date_format'), strtotime($item['schedule_date'])) }} {{ $transaction->convert_money_format($item['payable_amount']) }} {{ $transaction->convert_money_format($received_client) }} {{ $transaction->convert_money_format($balance_clients) }}{{ $transaction->convert_money_format($surchargeAmout) }} @endif --}}
Total {{ $transaction->convert_money_format($totalPaymentsAmountClient) }} {{ $transaction->convert_money_format($total_receiveds_client) }} {{ $transaction->convert_money_format($total_balance_clients) }}
Receipt Document Details
@if ($surchargeCheck) @endif @if ($surchargeCheck) @endif @foreach ($items['item']['items'] as $item) @php $totalDocumentAmountClient += $item['received_amount']; @endphp @if ($surchargeCheck) @else @endif @if ($surchargeCheck) @endforeach @if (!$surchargeCheck) @else @endif
S. No. Payment Sub Total {{$transaction->systemSettingCurrency()}} Surcharges {{$transaction->systemSettingCurrency()}} Total {{$transaction->systemSettingCurrency()}}
{{ $dCounter++ }} {{ $item['term'] }} {{ $transaction->convert_money_format($item['received_amount']) }} {{ $transaction->convert_money_format($item['received_amount']) }}{{ $transaction->convert_money_format($surchargeAmoutClient) }} @endif @if ($surchargeCheck) {{ $transaction->convert_money_format($surchargeAmoutClient + $item['received_amount']) }} @endif
Total {{ $transaction->convert_money_format($totalDocumentAmountClient) }} {{ $transaction->convert_money_format($totalDocumentAmountClient + $surchargeAmoutClient) }}
@if (!empty($items['item']->particulars))

Particulars: {{ $items['item']->particulars }}

@endif {{-- @php if(!empty($items['item']->bank_id)) { $modeOfPayment = \App\Models\IncomeExpenseHead::find($items['item']->bank_id)->name; if($modeOfPayment == "Loss On File") { $modeOfPayment = 'FILE MERGE'; } } else { $modeOfPayment = 'Cash'; } @endphp --}} @php $modeOfPayment = $items['item']->made_of_payment; // if ($items['item']->made_of_payment == 'Other' || $items['item']->made_of_payment == 'other') { // $modeOfPayment = 'Other'; // } // if ($items['item']->made_of_payment == 'Bank' || $items['item']->made_of_payment == 'bank') { // $modeOfPayment = 'Bank'; // if ($modeOfPayment == 'Loss On File') { // $modeOfPayment = 'FILE MERGE'; // } // } // if ($items['item']->made_of_payment == 'Cash' || $items['item']->made_of_payment == 'cash') { // $modeOfPayment = 'Cash'; // } // if ($items['item']->made_of_payment == 'Online Transfer' || $items['item']->made_of_payment == 'online transfer') { // $modeOfPayment = 'Online Transfer'; // } // if ($items['item']->made_of_payment == 'CHEQUE IN HAND' || $items['item']->made_of_payment == 'cheque in hand') { // $modeOfPayment = 'CHEQUE IN HAND'; // } @endphp {{-- @if ($items['item']->made_of_payment != 'Cash') @endif --}} @if ($modeOfPayment != 'Cash' ) @endif
Amount {{$transaction->systemSettingCurrency()}} : {{ $transaction->convert_money_format($items['item']->actual_amount) }}Payment Date : {{ date(config('settings.date_format'), strtotime(trim(str_replace('/', '-', $items['item']->cheque_date)))) }}
Amount in Words : {!! config('settings.currency_code') !!} {{ $transaction->convert_number_to_words($items['item']->actual_amount) }} ONLY Instrument Date : {{ date(config('settings.date_format'), strtotime(trim(str_replace('/', '-', $items['item']->cheque_date)))) }}
Issued By : {{ App\Models\User::where(['email' => $items['item']->created_by])->first()->name }} Date of Collection : {{ date(config('settings.date_format'), strtotime(trim(str_replace('/', '-', $items['item']->date_of_collection)))) }}
Instrument No : {{ !empty($items['item']->cheque_no) ? $items['item']->cheque_no : $items['item']->remark }} Mode of Payment : {{ $modeOfPayment }}
Reference No : {{ !empty($references) ? $references : $items['item']->remark }}
- - - - - - - - - - - - - - - - - - - - - - -
{{ $getSystemPermissions['receipts']['receipt_pdf_stamp1'] ?? 'Authorized Signature' }}
- - - - - - - - - - - - - - - - - - - - - -
{{ $getSystemPermissions['receipts']['receipt_pdf_stamp2'] ?? 'Authorized Stamp' }}
@endif