<?php
defined('BASEPATH') OR exit('No direct script access allowed');
//print_r($instalments);
$sira=0;
foreach ($instalments as $instalments) {
$sira=$sira+1;	
$price=str_replace(',','.',$price);
$tutar=($price/(100-$instalments->sales_rate))*100;
$tutar=number_format($tutar,2,".","");
$montly_payment=number_format($tutar/($instalments->installment+$instalments->extra_installment),2,".","");

$total_instalment=$instalments->installment+$instalments->extra_installment;

	?>
<div class="instBox select-installment_sort_<?=$sira?> select-installment instalment-id<?=$instalments->installment?><?=$instalments->extra_installment?> <?php if($sira==1){?>selected<?php }?>" data-instalment="<?=$instalments->installment?>" data-extra-instalment="<?=$instalments->extra_installment?>" data-card-id="<?=$instalments->pos_id?>" data-total="<?=$tutar?>" data-price="<?=$price?>" >
	<div class="instTitle"><?php if($total_instalment<2){ ?>Tek Çekim<?php }else{?><?=$instalments->installment?> <?php if($instalments->extra_installment>0){?> + <?=$instalments->extra_installment?> <?php }?> Taksit X &nbsp;<?=$montly_payment?><?php }?> </div>
	 <div class="instPrice"><?=$tutar?> TRY</div> </div>

<?php }?>	 