$oes = "";
    if ($ryx["afectacion"] < 0) {
        $oes = "<td>&nbsp;</td>\n\t\t\t\t\t\t\t<td class='mny'>" . getFMoney($ryx["afectacion_real"]) . "</td>";
        $retiros = $retiros + $ryx["afectacion_real"];
    } else {
        $oes = "<td class='mny'>" . getFMoney($ryx["afectacion_real"]) . "</td>\n\t\t\t\t\t\t\t<td>&nbsp;</td>";
        $depositos = $depositos + $ryx["afectacion_real"];
    }
    $tr = "<tr>\n\t\t\t<td>" . getFechaMX($fecha) . "</td>\n\t\t\t<td>" . $ryx["recibo_afectado"] . "</td>\n\t\t\t<td>{$tipoop}</td>\n\t\t\t{$oes}\n\n\t\t\t<td class='mny'>" . getFMoney($sdo_al_corte) . "</td>\n\t\t\t<td>{$detallado}</td>\n\t\t\t</tr>";
    //Si Aplica por Fechas
    if ($AppByFechas == 1) {
        if (strtotime($fecha) < strtotime($fecha_inicial) or strtotime($fecha) > strtotime($fecha_final)) {
            $tr = "";
        }
    }
    $xRPT->addContent($tr);
}
$saldo_final = $depositos - $retiros;
$depositos = getFMoney($depositos);
$retiros = getFMoney($retiros);
$xRPT->addContent("<tr>\n\t\t\t<td>&nbsp;</td>\n\t\t\t<th colspan='2'>SUMATORIA TOTAL DE MOVIMIENTOS</th>\n\t\t\t<th>{$depositos}</th>\n\t\t\t<th>{$retiros}</th>\n\t\t\t<th class='mny'>" . getFMoney($saldo_final) . "</th>\n\t\t\t<td>&nbsp;</td>\n\t\t</tr>\n\t</table>");
if (round($saldo, 2) != round($saldo_final, 2)) {
    if (FORCE_CUADRE_EN_OPERACIONES == true) {
        $arrUp = array("saldo_cuenta" => $saldo_final);
        $xCuenta->setUpdate($arrUp);
    }
    if ($output != OUT_EXCEL) {
        $xRPT->addContent("<style>\n\t\t\t\tbody {\n\t\t\t\t\tbackground-image: url(\"../images/error_saldos.png\");\n\t\t\t\t\tbackground-repeat: repeat;\n\t\t\t\t}\n\t\t\t\t</style>");
    }
}
echo $xRPT->render(true);