@extends('layouts.pdf') @section('title') Compact View @stop @php $breadcrumbMainIcon = 'fas fa-dolly'; $currency_symbol = config('settings.is_code') == 'code' ? config('settings.currency_code') : config('settings.currency_symbol'); $surchargeCheck = App\Models\Sell::find($items['sells_id'])->branch->enable_surcharges; $fileMergeCheck = App\Models\Sell::find($items['sells_id'])->branch->file_merge; $isTransfered = App\Models\Sell::find($items['sells_id'])->is_transfered; $all = config('role_manage.Sell.All'); $create = config('role_manage.Sell.Create'); $delete = config('role_manage.Sell.Delete'); $edit = config('role_manage.Sell.Edit'); $pdf = config('role_manage.Sell.Pdf'); $permanently_delete = config('role_manage.Sell.PermanentlyDelete'); $restore = config('role_manage.Sell.Restore'); $show = config('role_manage.Sell.Show'); $trash_show = config('role_manage.Sell.TrashShow'); $transfer = config('role_manage.SellTransfer.Create'); $company_settings_info = \App\Models\Setting::where('settings_name', 'Company Setting Module')->first(); $company_setting = json_decode($company_settings_info->content, true); $possession = in_array('maintenance_module', $company_setting ?? []); @endphp @section('content')
@include('admin.partials.payment-schedule-header', ['extra' => $data['sell']])

{{__('lang.schedule_manage')}}

{{-- @dd($data['sell']) --}}
Detail
Name : {{$data['sell']->customer->name ?? '-'}} Unit No : {{$data['sell']->product->product_unique_id ?? '-'}}
Mobile No. : {{$data['sell']->customer->phone ?? '-'}} Floor No. : {{$data['sell']->product->floor->name ?? '-'}}
CNIC No. : {{$data['sell']->customer->nid}} Type : {{$data['sell']->product->type->name ?? '-'}}
Address : {{$data['sell']->customer->home_address ?? $data['sell']->customer->mailing_address}} Size : {{$data['sell']->product->flat_size}} {{$data['sell']->product->size_in}} (Approx)
Sell Date : {{ date(config('settings.date_format'), strtotime(trim(str_replace('/', '-',$data['sell']->sale_date_v2)))) }}
Deal
{{__('lang.description')}} AMOUNT {{$transaction->systemSettingCurrency()}}
COST {{ $transaction->convert_money_format($data['sell']->ScheduleReceivableWithoutDiscount->sum('payable_amount') + $data['sell']->ScheduleDiscount->already_received_amount)}}
DISCOUNT({{$data['sell']->discount_description}}) ({{ $transaction->convert_money_format($data['sell']->ScheduleDiscount->already_received_amount) }})
TOTAL {{$transaction->convert_money_format($data['sell']->ScheduleReceivableWithoutDiscount->sum('payable_amount'))}}
@php $sell = $data['sell']; $general_terms = $sell->ScheduleReceivableOnlyDownPaymentTerms ?? []; $installment_terms = $sell->ScheduleReceivableOnlyInstallments ?? []; $possession_terms = $sell->ScheduleReceivableOnlyPossessionTerms ?? []; $monthly_installment_counter = 0; $quaterly_installment_counter = 0; $bi_monthly_installment_counter = 0; $sr_no = 1; @endphp {{-- General Terms Start --}} @foreach ($general_terms as $general_term) @endforeach {{-- General Terms End --}} {{-- Installment Terms Start --}} @foreach ($installment_terms as $schedule) @php $total_general_items += $schedule->payable_amount; if ($schedule->installment_repeat == 'Monthly') { $monthly_installment_counter++; $total_monthly_installment += $schedule->payable_amount; $average_monthly_installment = $total_monthly_installment / $monthly_installment_counter; if ($monthly_installment_counter == 1) { $start_monthly_installment = $schedule->schedule_date; } } if ($schedule->installment_repeat == 'Quarterly') { $quaterly_installment_counter++; $total_quaterly_installment += $schedule->payable_amount; $average_quaterly_installment = $total_quaterly_installment / $quaterly_installment_counter; if ($quaterly_installment_counter == 1) { $start_quaterly_installment = $schedule->schedule_date; } } if ($schedule->installment_repeat == 'Bi Monthly') { $bi_monthly_installment_counter++; $total_bi_monthly_installment += $schedule->payable_amount; $average_bi_monthly_installment = $total_bi_monthly_installment / $bi_monthly_installment_counter; if ($bi_monthly_installment_counter == 1) { $start_bi_monthly_installment = $schedule->schedule_date; } } if ($schedule->installment_repeat == 'Half Yearly') { $half_yearly_installment_counter++; $total_half_yearly_installment += $schedule->payable_amount; $average_half_yearly_installment = $total_half_yearly_installment / $half_yearly_installment_counter; if ($half_yearly_installment_counter == 1) { $start_half_yearly_installment = $schedule->schedule_date; } } if ($schedule->installment_repeat == 'Annually') { $annually_installment_counter++; $total_annually_installment += $schedule->payable_amount; $average_annually_installment = $total_annually_installment / $annually_installment_counter; if ($annually_installment_counter == 1) { $start_annually_installment = $schedule->schedule_date; } } @endphp @endforeach @if ($monthly_installment_counter > 0) @endif @if ($quaterly_installment_counter > 0) @endif @if ($bi_monthly_installment_counter > 0) @endif @if ($half_yearly_installment_counter > 0) @endif @if ($annually_installment_counter > 0) @endif {{-- Installment Terms End --}} {{-- Possession Terms End --}} @foreach ($possession_terms as $possession_term) @endforeach {{-- Possession Terms End --}}
Payments Schedule
Sr No. {{__('lang.description')}} Amount {{$transaction->systemSettingCurrency()}}
{{ $sr_no++ }} {{ $general_term->term }} {{ $transaction->convert_money_format($general_term->payable_amount) }}
{{ $sr_no++ }} {{ $monthly_installment_counter . ' Monthly Installments' }}
(Installment start from {{ date(config('settings.date_format'), strtotime($start_monthly_installment)) }}) @ {{ $transaction->convert_money_format($average_monthly_installment) }}
{{ $transaction->convert_money_format($total_monthly_installment) }}
{{ $sr_no++ }} {{ $quaterly_installment_counter . ' Quarterly Installments' }}
(Installment start from {{ date(config('settings.date_format'), strtotime($start_quaterly_installment)) }}) @ {{ $transaction->convert_money_format($average_quaterly_installment) }}
{{ $transaction->convert_money_format($total_quaterly_installment) }}
{{ $sr_no++ }} {{ $bi_monthly_installment_counter . ' Bi Monthly Installments' }}
(Installment start from {{ date(config('settings.date_format'), strtotime($start_bi_monthly_installment)) }}) @ {{ $transaction->convert_money_format($average_bi_monthly_installment) }}
{{ $transaction->convert_money_format($total_bi_monthly_installment) }}
{{ $sr_no++ }} {{ $half_yearly_installment_counter . ' Half Yearly Installments' }}
(Installment start from {{ date(config('settings.date_format'), strtotime($start_half_yearly_installment)) }}) @ {{ $transaction->convert_money_format($average_half_yearly_installment) }}
{{ $transaction->convert_money_format($total_half_yearly_installment) }}
{{ $sr_no++ }} {{ $annually_installment_counter . ' Annually Installments' }}
(Installment start from {{ date(config('settings.date_format'), strtotime($start_annually_installment)) }}) @ {{ $transaction->convert_money_format($average_annually_installment) }}
{{ $transaction->convert_money_format($total_annually_installment) }}
{{ $sr_no++ }} {{ $possession_term->term }} {{ $transaction->convert_money_format($possession_term->payable_amount) }}
Total Payable {{ $transaction->convert_money_format($sell->ScheduleReceivableWithoutDiscount->sum('payable_amount')) }}
Applicant
{{ $data['sell']->customer->full_name ?? '' }}
Company Representative
@stop @push('include-js') @endpush