@php
// $customer_names = $strings = [$sell_detail->customer->name, $sell_detail->customer->customerDetail->implode('name',' / ')];
// $customer_name_combine = implode(" / ", array_filter($strings));
$customer_cnic = $strings = [$sell_detail->customer->nid, $sell_detail->customer->customerDetail->implode('nic',' / ')];
$customer_cnic_combine = implode(" / ", array_filter($strings));
$phone = ' - ';
$show_membership_no = CommonHelper::getBranchSettings($sell_detail->branch_id, 'show_membership_no_on_statement');
if (isset($sell_detail->customer)) {
$customer = $sell_detail->customer;
if (isset($customer->phone)) {
$phone = $customer->phone;
} elseif (isset($customer->office_phone)) {
$phone = $customer->office_phone;
} elseif (isset($customer->overseas_phone)) {
$phone = $customer->overseas_phone;
}
}
@endphp
{{-- Statement Details Start --}}
{{-- Left Content Start --}}
@if(!CommonHelper::getBranchSettings($sell_detail->branch_id, 'hide_name_on_statement'))
Name |
: {{ $sell_detail->customer->fullName }} |
@endif
@if(CommonHelper::getBranchSettings($sell_detail->branch_id, 'show_father_name_on_statement'))
Father/Husband Name |
: {{ $sell_detail->customer->father_or_husband_name }} |
@endif
@if(!CommonHelper::getBranchSettings($sell_detail->branch_id, 'hide_nic_on_statement'))
CNIC No. |
: {{ $customer_cnic_combine }} |
@endif
@if(!CommonHelper::getBranchSettings($sell_detail->branch_id, 'hide_mobile_number_on_statement'))
Mobile No. |
: {{ $phone }}{{ isset($customer->overseas_phone) ? ' / ' . $customer->overseas_phone : '' }} |
@endif
@if(!CommonHelper::getBranchSettings($sell_detail->branch_id, 'hide_layout_type_on_statement'))
Type |
: {{ $sell_detail->product->layoutType->name ?? '-' }} |
@endif
@if(!CommonHelper::getBranchSettings($sell_detail->branch_id, 'hide_address_on_statement'))
Address |
: {{ $sell_detail->customer->address ?? $sell_detail->customer->mailing_address }}
|
@endif
@if(!CommonHelper::getBranchSettings($sell_detail->branch_id, 'hide_registeration_on_statement'))
Registration No. |
: {{ $sell_detail->registration_no }} |
@endif
@if($show_membership_no)
Membership No. |
: {{ $sell_detail->registration_no }} |
@endif
@php
$total_discounts = $discounts->sum('payable_amount') + $discounts->sum('unofficial_payable_amount');
@endphp
@if(CommonHelper::getBranchSettings($sell_detail->branch_id, 'show_discount_in_detail_section_on_statement') && $total_discounts > 0)
Discount |
: {{ $transaction->convert_money_format($total_discounts) }} |
@endif
@if(($show_own_amount == "1") && !empty($data['sell']['own_amount']))
Own {{$transaction->systemSettingCurrency()}} |
: {{ $transaction->convert_money_format($data['sell']['own_amount']) ?? 0 }} ({{$data['sell']['own_description'] ?? '-' }}) |
@endif
{{-- Left Content End --}}
{{-- Right Content Start --}}
@if(!CommonHelper::getBranchSettings($sell_detail->branch_id, 'hide_sell_date_on_statement'))
Booking Date |
:
{{ date(config('settings.date_format'), strtotime(trim(str_replace('/', '-', $sell_detail->sale_date_v2)))) }}
|
@endif
@if(!CommonHelper::getBranchSettings($sell_detail->branch_id, 'hide_print_date_on_statement'))
Print Date |
: {{ Carbon\Carbon::now()->format('d-M-Y') }} |
@endif
@if(!CommonHelper::getBranchSettings($sell_detail->branch_id, 'hide_size_on_statement'))
Size |
: {{ $sell_detail->product->flat_size }}
{{ getShortName($sell_detail->product->size_in) }} (Approx) |
@endif
@if(!CommonHelper::getBranchSettings($sell_detail->branch_id, 'hide_unit_on_statement') )
Unit No |
: {{ strtoupper($sell_detail->product->product_unique_id) }} |
@endif
@if ($show_c_o)
@php
foreach($sell_detail->sell_external_dealer_rebate as $external_dealer)
{
$name.=$external_dealer->DealerName->name." , ";
}
foreach ($sell_detail->sell_internal_dealer_rebate as $internal_dealer)
{
$name.=$internal_dealer->DealerName->name." , ";
}
$name = rtrim($name, " , ");
@endphp
C/O |
: {{$name}} |
@endif
@if(!CommonHelper::getBranchSettings($sell_detail->branch_id, 'hide_description_on_statement'))
{{__('lang.description')}} |
: {{ $sell_detail->description ?? ' - '}} |
@endif
@if(!CommonHelper::getBranchSettings($sell_detail->branch_id, 'hide_floor_on_statement') )
Floor No |
: {{ $sell_detail->product->floor->name ?? '-' }} |
@endif
@if(!CommonHelper::getBranchSettings($sell_detail->branch_id, 'hide_category_on_statement'))
Category |
: {{ $sell_detail->product->category->name ?? '-' }} |
@endif
@if(!CommonHelper::getBranchSettings($sell_detail->branch_id, 'hide_block_on_statement'))
Block |
: {{ $sell_detail->product->block->name ?? '-' }} |
@endif
@if(!CommonHelper::getBranchSettings($sell_detail->branch_id, 'hide_status_on_statement'))
Status |
: {{ $sell_detail->is_transfered ? 'TRANSFER' : $sell_detail->status }} |
@endif
{{-- Right Content End --}}
{{-- Statement Details End --}}