<?php

 Yii::app()->setLanguage(isset(Yii::app()->session['lang']) ? Yii::app()->session['lang'] : 'ar'); 
 $lang=Yii::app()->getLanguage();
 
?>
<?php

$MINIMUM_TO_OPEN_CURRENT_ACCOUNT = option::model()->findByAttributes(array('key'=>'MINIMUM_TO_OPEN_CURRENT_ACCOUNT' ));
$MINIMUM_PROFIT_CALCULATION = option::model()->findByAttributes(array('key'=>'MINIMUM_PROFIT_CALCULATION' ));
$MINIMUM_INVESTMENT_ACCOUNT_OPENING = option::model()->findByAttributes(array('key'=>'MINIMUM_INVESTMENT_ACCOUNT_OPENING' ));

?>

<section class="exchange-rate">
    <section class="exchange-rate-section1">
        <div class="container">
		<div class="row">
                <div class="col-sm-offset-1 col-sm-10 col-xs-offset-0 col-xs-12">
                   
                </div>
            </div>
          

            <div class="row">
                <div class="col-sm-offset-1 col-sm-10 col-xs-12">
                    <h3 class="exchange-rate-head-line">
                        <?php 
                            if($lang=='en')
                            {
                            echo'
                                The following commissions include Al Baraka bank commissions related to accounts, banking and electronic services associated with it and you can identify the rest of the commissions when you visit any of the branches of Albaraka Bank
                                ';
                            }else{
                                echo 'العمولات التالية تشمل عمولات بنك البركة المتعلقة بالحسابات والخدمات المصرفية والإلكترونية المرتبطة بها و يمكنكم التعرف على باقي العمولات لدى زيارتكم لأي من فروع بنك البركة';
                                }
                        ?>
                    </h3>
                </div>
            </div> 
            <div class="row">  
                <div class="col-sm-offset-1 col-sm-10 col-xs-12">
                    <div class="table-responsive">          
                        <table class="table table-striped">
                            <thead>
                        <tr>
                            <th class="width10">#</th>
                            <th class="width25"><?php echo Yii::t('commission','declaration');?></th>
                            <th class="width25"><?php echo Yii::t('commission','amount');?></th>
                            <th class="width40"><?php echo Yii::t('commission','notes');?></th> 
                        </tr>
                        </thead>
                        <tbody>
                         <?php 
                                $commissions=Commission::model()->findAll();
                                if(!empty($commissions)){
                                    $count=0;
                                    foreach($commissions as $commission){
                                        $count++;
                            ?> 
                        <tr>
                            <td class="width10"> <?php echo $count ?></td>
                           
                            <td class="width25"><?php echo ($lang=='ar'?$commission->declaration_ar:$commission->declaration_en) ?></td>
                            <td class="width25"><?php echo ($lang=='ar'?$commission->amount_ar:$commission->amount_en) ?></td>
                            <td class="width40"> <?php echo ($lang=='ar'?$commission->note_ar:$commission->note_en)?></td> 
                        </tr>
                            <?php } }?>
                        </tbody>
                    </table>
                    </div>
                </div>
            </div>
            <br><br>
            <div class="row">
            <div class="col-sm-offset-1 col-sm-10 col-xs-12">
            <h3 class="exchange-rate-head-line">
            <?php echo ($lang=='ar'?'جدول الحدود الدنيا لفتح الحسابات واحتساب الأرباح':'Minimum table for opening accounts and calculating profits') ?>
            <!--جدول الحدود الدنيا لفتح الحسابات واحتساب الأرباح (1)-->
            </h3>
            </div>
            </div>
                 <div class="row">  
                <div class="col-sm-offset-1 col-sm-10 col-xs-12">
                <div class="table">          
                    <table class="table table-striped">
                        <thead>
                        <tr>
                         <th><?php echo($lang=='ar'?'الحد الأدنى لفتح حساب جاري / توفير بالعملة المحلية/أجنبية':'Minimum opening of current / savings account in local / foreign currency') ?> </th>
                         </tr>
                        </thead>
                          <tbody>
                        <tr>
                            <td><?php 
                            if(!empty($MINIMUM_TO_OPEN_CURRENT_ACCOUNT)){ echo $MINIMUM_TO_OPEN_CURRENT_ACCOUNT->value; } ?><?php echo($lang=='ar'?' ل.س أو ما يعادلها':' SP or equivalent') ?> </td>
                        </tr>  
                        </tbody>
                    </table>
                    </div>
                        <div class="table">                     
                        <table class="table table-striped">
                        <thead>
                            <tr>
                            <th><?php echo($lang=='ar'?'الحد الأدنى لاحتساب الربح على حساب التوفير بالعملة المحلية/ الأجنبية':'Minimum profit calculation on savings account in local / foreign currency') ?> </th>
                            </tr>
                    </thead>
                      <tbody>
                        <tr> 
                            <td><?php if(!empty($MINIMUM_PROFIT_CALCULATION)){ echo  $MINIMUM_PROFIT_CALCULATION->value; } ?><?php echo($lang=='ar'?' ل.س أو ما يعادلها':' SP or equivalent') ?></td>
                        </tr>  
                        </tbody>
                    </table>
                    </div>
                      <div class="table">
                      <table class="table table-striped">
                        <thead>
                            <tr>
                            <th><?php echo($lang=='ar'?'الحد الأدنى لفتح حساب استثماري لأجل بالعملة المحلية/ أجنبية واحتساب الربح عليه':'The minimum to open a term investment account in local / foreign currency and calculate the profit on it') ?>  </th> 
                            </tr>
                        </thead>
                        <tbody>
                        <tr>
                             <td><?php if(!empty($MINIMUM_INVESTMENT_ACCOUNT_OPENING)){ echo  $MINIMUM_INVESTMENT_ACCOUNT_OPENING->value; } ?><?php ($lang=='ar'?' ل.س أو ما يعادلها مدة الربط وديعة لأجل 1-3-6-12-24 شهر':' SP or equivalent duration of bonding deposit for 1-3-6-12-24 months')  ?>
                            </td> 

                        </tr>  
                        </tbody>
                    </table>
                    </div>
                </div>
            </div>
        </div>
    </section>
</section>
