<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/pdf.css" />

<?php if($model->creditoTablaAmortizacions):?>
        <div style="text-align: center;">
            
        <table class="amortizacion" cellpadding="2">
            <thead>
              <tr>
                <th colspan="7" style="border-left: 0 solid #000;">Tabla de amortización</th>
              </tr>
            </thead>
            <tr>
              <th width="15%" style="border-left: 0 solid #000;">Nº cuota</th>
              <th width="20%">Monto Base</th>
              <?php if ($model->id_estatus!=1 || $model->id_estatus!=3) { ?>
                <th width="20%">Fecha de Vencimiento</th>
              <?php } ?>
              <th width="15%">Amortizaci&oacute;n</th>
              <th width="15%">Inter&eacute;s</th>
              <th width="15%">Cuota</td>
              <th width="20%">Saldo actual</th>
            </tr>

            <?php foreach ($model->creditoTablaAmortizacionsCuotaOrdinaria as $key=>$pago):?>
                
            <tr>
                <td class="cuotas" style="border-left: 0 solid #000;"><?php echo $pago->numero_cuota;?></td>
                <td><?php echo number_format($pago->monto_base,2,',','.');?></td>
                <?php if ($model->id_estatus!=1 || $model->id_estatus!=3) { ?>
                  <td><?php echo $pago->fecha_vencimiento;?></td>
                <?php } ?>
                <td><?php echo number_format($pago->monto_capital,2,',','.');?></td>
                <td><?php echo number_format($pago->monto_interes,2,',','.');?></td>
                <td><?php echo number_format($pago->monto_cuota,2,',','.');?></td>
                <td><?php echo number_format($pago->monto_credito,2,',','.');?></td>
            </tr>
                    
            <?php endforeach;?>  
        </table>    
            
           
<?php 
    if(count($model->creditoTablaAmortizacionsCuotaEspecial)>0){?>
        <br><table class="amortizacion" cellpadding="2">
            <thead>
              <tr>
                <th colspan="7" style="border-left: 0 solid #000;">Tabla cuotas especiales</th>
              </tr>
            </thead>
            <tr>
              <th width="15%" style="border-left: 0 solid #000;">Nº cuota</th>
              <th width="20%">Monto Base</th>
              <?php if ($model->id_estatus!=1 || $model->id_estatus!=3) { ?>
                <th width="20%">Fecha de Vencimiento</th>
              <?php } ?>
              <th width="15%">Amortizaci&oacute;n</th>
              <th width="15%">Inter&eacute;s</th>
              <th width="15%">Cuota</td>
              <th width="20%">Saldo actual</th>
            </tr>
            <?php foreach ($model->creditoTablaAmortizacionsCuotaEspecial as $key=>$pago):?>
                
            <tr>
                <td><?php echo $pago->numero_cuota;?></td>
                <td><?php echo number_format($pago->monto_base,2,',','.');?></td>
                <?php if ($model->id_estatus!=1 || $model->id_estatus!=3) { ?>
                <td><?php echo $pago->fecha_vencimiento;?></td>
                <?php } ?>
                <td><?php echo number_format($pago->monto_capital,2,',','.');?></td>
                <td><?php echo number_format($pago->monto_interes,2,',','.');?></td>
                <td><?php echo number_format($pago->monto_cuota,2,',','.');?></td>
                <td><?php echo number_format($pago->monto_credito,2,',','.');?></td>
            </tr>
                    
            <?php endforeach;?>   
                
                
                
                
        </table>   
        <?php }?>
         
        </div>     
     <?php endif;?>