@php 
    $type = $bodyItem->type;
    if(in_array($bodyItem->type,['SUV','SUV_3D','SUV_5D'])){$type='SUV';}
    if(in_array($bodyItem->type,['CUV'])){$type='CUV';}
    if(in_array($bodyItem->type,['SEDAN','COUPE'])){$type='SEDAN';}
    if(in_array($bodyItem->type,['HATCHBACK_3D','HATCHBACK_5D'])){$type='HATCHBACK_5D';}
    if(in_array($bodyItem->type,['PICKUP'])){$type='PICKUP';}
    if(in_array($bodyItem->type,['WAGON','WAGON_5D','WAGON_7D'])){$type='WAGON';}
    if(in_array($bodyItem->type,['LIFTBACK'])){$type='LIFTBACK';}
    if(in_array($bodyItem->type,['MINIVAN'])){$type='MINIVAN';}
    if(in_array($bodyItem->type,['VAN'])){$type='VAN';}
@endphp
    
    	@php
        	$minPrice = $bodyItem->getMinPrice();
        	$percentRateMounth = floatval(\JustWeCMS\Modules\Param\Entities\Param::where('slug', 'percent_rate')->first()->value)/100/12;
        	if($percentRateMounth == 0){
        	    $creditPerMount = ($minPrice / 84) * floatval(\JustWeCMS\Modules\Param\Entities\Param::where('slug', 'koef_price')->first()->value);
        	} else {
                $creditPerMount = ($minPrice * ($percentRateMounth + ($percentRateMounth/(pow(1+$percentRateMounth, 84) - 1)))) * floatval(\JustWeCMS\Modules\Param\Entities\Param::where('slug', 'koef_price')->first()->value);
            }
        @endphp	
	
		
		    
			
			от {{price_format($bodyItem->getMinPrice('price_old'))}} руб.
			от {{ price_format($bodyItem->getMinPrice()) }} руб.
			в кредит от {{ price_format($creditPerMount) }} руб./мес.
			Купить в кредит