Price Details: {{ $vehicleDetail->registration_no }}
Buying Price : {{ number_format($vehicleDetail->buying_price) }}     Current Price : {{ number_format($vehicleDetail->curr_price) }}
| Sr No. |
Date |
Current Price ({{config('constants.currency_symbol')}}) |
Depreciation ({{config('constants.currency_symbol')}}) |
Description |
Action |
@php
$lastCurrentPrice = null;
@endphp
@forelse($vCurrentPrice as $cPrice)
| {{ $loop->iteration }} |
{{ date('d-m-Y',strtotime($cPrice->c_p_date)) }} |
{{ number_format($cPrice->c_price) }} |
@if($loop->iteration == 1)
@php
$depreciationValue = $vehicleDetail->buying_price - $cPrice->c_price;
@endphp
@else
@php
$depreciationValue = $lastCurrentPrice - $cPrice->c_price;
@endphp
@endif
@php
$lastCurrentPrice = $cPrice->c_price;
@endphp
{{ $depreciationValue }}
|
{{ $cPrice->c_p_description }} |
@if($loop->last)
@endif
|
@empty
| No Data |
@endforelse