function getListadoDeMovimientos($complementoTD = "") { $xL = new cLang(); $xQL = new cSQLListas(); $sql = $xQL->getListadoDeMovimientosContables($this->mCodigoDePoliza); $ql = new MQL(); $td = ""; $tcargos = 0; $tabonos = 0; $cnt = 1; $th = "<tr>\n\t\t <th class='movimiento'>#</th>\n\t\t <th class='cuenta'>" . $xL->getT("TR.Cuenta") . "</th>\n\t\t <th class='nombrecuenta'>" . $xL->getT("TR.Nombre") . "</th>\n\t\t <th class='cargos'>" . $xL->getT("TR.Cargos") . "</th>\n\t\t <th class='abonos'>" . $xL->getT("TR.Abonos") . "</th>\n\t\t <th class='referencia'>" . $xL->getT("TR.Referencia") . "</th>\n\t\t <th class='concepto'>" . $xL->getT("TR.Concepto") . "</th>\n \t\t</tr>"; $rs = $ql->getDataRecord($sql); foreach ($rs as $rows) { $operacion = $rows["operacion"]; $nid = $this->mCodigoDePoliza . $this->mDiv . $operacion; $cuenta = $rows["cuenta"]; $pid = str_replace(".", "_", $nid); $cnt = $cnt >= 2 ? 1 : $cnt + 1; $cls = $cnt == 2 ? " class='trOdd' " : ""; $td .= "<tr{$cls} id='{$pid}'><td>" . $rows["operacion"] . "</td>"; $td .= "<td>" . $cuenta . "</td>"; $td .= "<td class='nombrecuenta' onclick='var xC = new ContGen(); xC.goToPanel({$cuenta})'>" . $rows["nombre"] . "</td>"; if ($rows["tipo"] == TM_CARGO) { $tcargos += $rows["importe"]; $td .= "<td onclick='jsEditarMvto(\"{$nid}\")' class='mny'>" . getFMoney($rows["importe"]) . "</td><td />"; } else { $tabonos += $rows["importe"]; $td .= "<td /><td onclick='jsEditarMvto(\"{$nid}\")' class='mny'>" . getFMoney($rows["importe"]) . "</td>"; } $td .= "<td>" . $rows["referencia"] . "</td>"; $td .= "<td>" . $rows["concepto"] . "</td></tr>"; } $tf = "<tr>\n\t\t <td />\n\t\t <td />\n\t\t <th>" . $xL->getT("TR.Sumas") . "</th>\n\t\t <th><input type='text' disabled value='" . getFMoney($tcargos) . "' id='idsumacargos' class='mny' /></th>\n\t\t <th><input type='text' disabled value='" . getFMoney($tabonos) . "' id='idsumaabonos' class='mny' /></th>\n\t\t <td />\n\t\t <td />\n \t\t</tr>"; return "<table id='movimientocontables'><thead>{$th} {$complementoTD} </thead><tbody>{$td}</tbody><tfoot>{$tf}</tfoot></table>"; }