<th>numero de pago</th>
				<th>monto depago</th>
                <!-- <th style="">comision por apertura</th> -->
                <!-- <th style="">comision por manejo de cuenta</th> -->
                <th style="">abono a capital</th>
                <th style="">interes ordinario</th>
                <th style="">interes moratorio</th>
                <th style="">gastos de cobranza</th>
                <th style="">fecha de vencimiento del pago</th>
                <th style="">saldo insoluto</th>
                <th style="">fecha de movimiento</th>
          	</tr>
        </thead>
        <tbody style="text-transform: uppercase;">
		<?php 
$datos = $cli->estadoCuenta($_POST['cliente'], $_POST['fecha_inicio'], $_POST['fecha_fin'], $_POST['contrato']);
while ($l = $datos->NextRow()) {
    $imora = 0.0;
    $gtscobr = 0.0;
    $inmens = 0.0;
    $acapital = 0.0;
    $iordi = 0.0;
    $capertura = 0.0;
    $totl = $l['pagos'];
    $saldoins = $l['saldo_insoluto'];
    if ($l['n_pago'] == 1) {
        $capertura = $l['comision_apert'];
    }
    if ($capertura > 0) {
        $rg = $totl - $capertura;
        if ($rg >= 0) {