<link rel="stylesheet" type="text/css" href="<?= Yii::app()->request->baseUrl; ?>/css/pdf.css" />
<!--DATOS SOLICITANTE-->
<table class="tabla-datos" bordercolor="#000" border="1" width="100%">
    <thead>
        <tr>
            <th colspan="4" class="titulo"><span><b>Información de carga inicial</b></span></th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <th style="width: 20%;"><span><b>Nombre archivo</b></span></th>
            <td style="width: 30%;"><span><?= $data['model']->nombre_archivo; ?></span></td>
            <th style="width: 20%;"><span><b>Descripci&oacute;n</b></span></th>
            <td style="width: 30%;"><span><?= $data['model']->descripcion; ?></span></td>
        </tr>
        <tr>
            <th><span><b>Cantidad de aportantes</b></span></th>
            <td><span><?= $data['model']->cant_aportantes; ?></span></td>
            <th><span><b>Total de aportes</b></span></th>
            <td><span><?= number_format($data['model']->total_aportes, 2, ',', '.'); ?></span></td>
        </tr>
        <tr>
            <th><span><b>Fecha del aporte</b></span></th>
            <td><span><?= date('d-m-Y', strtotime($data['model']->fecha_aporte)); ?></span></td>
            <th><span><b>Fecha de registro</b></span></th>
            <td><span><?= date('d-m-Y', strtotime($data['model']->fecha_registro)); ?></span></td>
        </tr>
        <tr>
            <th><span><b>Monto cancelado por RRHH</b></span></th>
            <td><span><?= Yii::app()->format->formatNumber($aportesComprobante->monto_pagado); ?></span></td>
            <th><span><b>Monto faltante</b></span></th>
            <td><span><?= Yii::app()->format->formatNumber($data['model']->total_aportes - $aportesComprobante->monto_pagado) ?></span></td>
        </tr>
        <tr>
            <th><span><b>Asociados con aporte patronal en cero (0)</b></span></th>
            <td><span><?= $data['aportesCeroPatrono']; ?></span></td>
            <th><span><b>Asociado con aporte empleado en cero (0)</b></span></th>
            <td><span><?= $data['aportesCeroSocio']; ?></span></td>
        </tr>
        <tr>
            <th><span><b>Aportantes con aportes propios y del patrono en cero (0)</b></span></th>
            <td><span><?= $data['aportesCero']; ?></span></td>
            <th><span><b>Estatus</b></span></th>
            <td><span><?= $data['model']->getEstatus(); ?></span></td>
        </tr>
    </tbody>
</table>
<!--CAPACIDAD DE PAGO-->
<table class="tabla-datos" id="tabla-cpago" bordercolor="#000" border="1" width="100%">
    <thead>
        <tr>
            <th colspan="7" class="titulo"><span><b>Depuraci&oacute;n de la carga</b></span></th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td colspan="6" ><b>Arportes activos</b></td>
            <td style="text-align: center;"><b>Totales</b></td>
        </tr>
        <tr>
            <td>Cant. asociados activos</td>
            <td style="text-align: center;"><?= $data['totalAportantes']; ?></td>
            <td>Total aporte empleado</td>
            <td style="text-align: right;"><?php  echo number_format($data['totalMontoAporteActivo']->aporte_asociado, 2, ',', '.')?> Bs.</td>
            <td>Total aporte patronal</td>
            <td style="text-align: right;"><?php  echo number_format($data['totalMontoAporteActivo']->aporte_patrono, 2, ',', '.')?> Bs.</td>
            <td style="text-align: right;"><b><?php  echo number_format($data['totalMontoAporteActivo']->aporte_asociado + $data['totalMontoAporteActivo']->aporte_patrono, 2, ',', '.')?> Bs.</b></td>
        </tr>
        <tr>
            <td colspan="7" ><b>Descuentos a ex-asociados</b></td>
        </tr>
        <tr>
            <td>Cant. ex-asociados</td>
            <td style="text-align: center;"><?= $data['modelAportesLiquidados']; ?></td>
            <td>Total empleado</td>
            <td style="text-align: right;"><?php  echo number_format($data['totalMontoAporteLiquidados']->aporte_asociado, 2, ',', '.')?> Bs.</td>
            <td>Total patronal</td>
            <td style="text-align: right;"><?php  echo number_format($data['totalMontoAporteLiquidados']->aporte_patrono, 2, ',', '.')?> Bs.</td>
            <td style="text-align: right;"><b><?= number_format($data['totalMontoAporteLiquidados']->aporte_asociado + $data['totalMontoAporteLiquidados']->aporte_patrono, 2, ',', '.') ?> Bs.</b></td>
        </tr>
        <tr>
            <td colspan="7" ><b>Descuentos a no asociados</b></td>
        </tr>
        <tr>
            <td>Cant. no asociados</td>
            <td style="text-align: center;"><?= $data['modelAportesTotalDiferidos']; ?></td>
            <td>Total empleado</td>
            <td style="text-align: right;"><?php  echo number_format($data['totalMontoAporteDiferidos']->aporte_asociado, 2, ',', '.')?> Bs.</td>
            <td>Total patronal</td>
            <td style="text-align: right;"><?php  echo number_format($data['totalMontoAporteDiferidos']->aporte_patrono, 2, ',', '.')?> Bs.</td>
            <td style="text-align: right;"><b><?= number_format($data['totalMontoAporteDiferidos']->aporte_asociado + $data['totalMontoAporteDiferidos']->aporte_patrono, 2, ',', '.')?> Bs.</td>
        </tr>
        <tr>
            <td><b>Total de trabajadores</b></td>
            <td><b><?= ($data['totalAportantes'] + $data['modelAportesTotalDiferidos'] + $data['modelAportesLiquidados'])?></b></td>
            <td><b>Total carga por empleado</b></td>
            <td style="text-align: right;"><b><?php  echo number_format(($data['totalMontoAporteActivo']->aporte_asociado + $data['totalMontoAporteLiquidados']->aporte_asociado + $data['totalMontoAporteDiferidos']->aporte_asociado), 2, ',', '.')?> Bs.</b></td>
            <td><b>Total carga por patrono</b></td>
            <td style="text-align: right;"><b><?php  echo number_format(($data['totalMontoAporteActivo']->aporte_patrono + $data['totalMontoAporteLiquidados']->aporte_patrono + $data['totalMontoAporteDiferidos']->aporte_patrono), 2, ',', '.')?> Bs.</b></td>
            <td style="text-align: right;"><b><?php  echo number_format(($data['totalMontoAporteActivo']->aporte_asociado + $data['totalMontoAporteLiquidados']->aporte_asociado + $data['totalMontoAporteDiferidos']->aporte_asociado + $data['totalMontoAporteActivo']->aporte_patrono + $data['totalMontoAporteLiquidados']->aporte_patrono + $data['totalMontoAporteDiferidos']->aporte_patrono), 2, ',', '.')?> Bs.</b></td>
        </tr>
    </tbody>
</table>

<table class="tabla-datos" bordercolor="#000" border="1" width="100%">
    <thead>
        <tr>
            <th colspan="6" class="titulo"><span><b>Detalle del pago</b></span></th>
        </tr>
    </thead>
    <tbody>
        <tr class="info">
            <td style="text-align: center"><b>Fecha del pago</b></td>
            <td style="text-align: center"><b>Banco origen</b></td>
            <td style="text-align: center"><b>Cuenta origen</b></td>
            <td style="text-align: center"><b>Referencia del pago</b></td>
            <td style="text-align: center"><b>Monto pagado</b></td>
            <td style="text-align: center"><b>Observación</b></td>
        </tr>
        <tr>
            <td style="text-align: center"><?= Yii::app()->format->date($detalle_pago['fecha_pago']) ?></td>
            <td style="text-align: center"><?= $detalle_pago['banco'] ?></td>
            <td style="text-align: center"><?= $detalle_pago['numero_cuenta'] ?></td>
            <td style="text-align: center"><?= $detalle_pago['referencia'] ?></td>
            <td style="text-align: center"><?= Yii::app()->format->number($detalle_pago['monto_pagado']) ?></td>
            <td style="text-align: center"><?= $detalle_pago['observacion'] ?></td>
        </tr>
    </tbody>
</table>

