@php $sell_locations_unserialze = (unserialize($sell_detail->location)) ? unserialize($sell_detail->location) : []; $sell_locations_waved = array_filter($sell_locations_unserialze, function($value) { return $value['wave_out'] == 1; }); $sell_locations_waved = collect($sell_locations_waved); $total_additional_amount_discount = $sell_locations_waved->sum('price'); $count_product_locations = 0; if (!CommonHelper::getBranchSettings($extra['branch']->id, 'hide_rate_size_box_on_statement')) { $count_product_locations = count($product_locations)+3; } else { $count_product_locations = count($product_locations)+1; } @endphp {{-- Statement Box Start --}}
@if(!CommonHelper::getBranchSettings($extra['branch']->id, 'hide_rate_size_box_on_statement')) @endif @foreach ($product_locations as $product_location ) @endforeach @php // Official Statement Data $fixed_amount = $sell_detail->product->fixed_amount_official; $fixed_amount = ($fixed_amount) ? $fixed_amount : $sell_detail->product->rate_per_size * $sell_detail->product->flat_size; $rate_per_size = $sell_detail->product->rate_per_size; $net_amount = $sell_detail->ScheduleReceivableWithoutDiscount->sum('payable_amount'); // Combine Data Below if(request()->get('status') != '1'){ $fixed_amount_unofficial = $sell_detail->product->fixed_amount_unofficial; $fixed_amount_unofficial = ($fixed_amount_unofficial) ? $fixed_amount_unofficial : $sell_detail->product->rate_per_size_unofficial * $sell_detail->product->flat_size; $fixed_amount += $fixed_amount_unofficial; $rate_per_size += $sell_detail->product->rate_per_size_unofficial; $net_amount += $sell_detail->ScheduleReceivableWithoutDiscount->sum('unofficial_payable_amount'); } @endphp @if(!CommonHelper::getBranchSettings($extra['branch']->id, 'hide_rate_size_box_on_statement')) @endif @foreach ($product_locations as $product_location ) @php $additional_amount +=$product_location->price; @endphp @endforeach {{-- Discount Start --}} @if($show_discount) @if($total_additional_amount_discount > 0) @endif @foreach ($discounts as $discount) @php $sell_cost_amount = $sell_detail->cost_amount; $discount_official = $discount->payable_amount; $discount_unofficial = $discount->unofficial_payable_amount; $is_percentage = ($discount->fixed_or_percentage_discount == 0); if($is_percentage){ $discount_official = ($sell_cost_amount*$discount->payable_amount)/100; $discount_unofficial = ($sell_cost_amount*$discount->unofficial_payable_amount)/100; } $discount_official = ceil($discount_official); $discount_unofficial = ceil($discount_unofficial); $discount_combine = $discount_official + $discount_unofficial; @endphp @if($discount_official > 0 && request()->get('status') == '1') @endif @if($discount_combine > 0 && !request()->get('status')) @endif @endforeach @endif {{-- Discount End --}}
Property Size Rate Per Size Standard Price {{ getShortName($product_location->property_location->name) }} @if ($product_location->percent)
({{ $product_location->percent }} % ) @endif
Total
{{ $sell_detail->product->flat_size }} {{ getShortName($sell_detail->product->size_in) }} {{ $rate_per_size }} {{ getShortName($sell_detail->product->size_in) }} {{ $transaction->convert_money_format($fixed_amount) }} {{ $transaction->convert_money_format($product_location->price) }}{{ $transaction->convert_money_format($fixed_amount + $additional_amount ) }}
Additional Charges Discount Amount {{ $transaction->convert_money_format($total_additional_amount_discount) }}
Discount Amount ({{$discount->description}}) {{ $transaction->convert_money_format($discount_official) }}
Discount Amount ({{$discount->description}}) {{ $transaction->convert_money_format($discount_combine) }}
Total Net Amount {{$transaction->systemSettingCurrency()}} {{ $transaction->convert_money_format($net_amount ) }}
{{-- Statement Box End --}}