#
#
#
#
#
#
#
#
#
#
#
# get settings
require "../settings.php";
require "../core-settings.php";
require "../libs/ext.lib.php";
$OUTPUT = sheet();
include "temp.xls.php";
Stream("TrialBalance", $OUTPUT);
exit;
# details
function sheet()
{
    $rep = new grp_report();
    $report = $rep->getReport();
    $selected = $rep->selected;
    $gdebit = $rep->totdebit;
    $gcredit = $rep->totcredit;
    $totdebit = 0;
    $totcredit = 0;
    $sql = "SELECT * FROM trial_bal WHERE div = '" . USER_DIV . "' order by topacc,accnum ASC";
    $accRslt = db_exec($sql) or errDie("Unable to get group accounts information.");
#
#
#
#
#
#
#
#
# get settings
require "../settings.php";
require "../core-settings.php";
require "../libs/ext.lib.php";
if (isset($_POST["key"])) {
    switch ($_POST["key"]) {
        case "print":
            $OUTPUT = sheet($_POST);
            break;
        default:
            $OUTPUT = slct();
    }
} else {
    $OUTPUT = slct();
}
# get templete
require "../template.php";
function slct()
{
    $view = "<center><h3>Balance sheet</h3>\n\t<form action='" . SELF . "' method=post name=form>\n\t<input type=hidden name=key value=print>\n\t<table border=0 cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "' width=200>\n\t\t<tr><th colspan=2>Report Type</th></tr>\n\t\t<tr class='bg-odd'><td><input type=radio name=summary value=yes>Summarized</td>\n\t\t<td><input type=radio name=summary value=no checked=yes>Detailed</td></tr>\n\t\t<tr><td><br></td></tr>\n\t\t<tr><td><input type=button value='Cancel' onClick='javascript:history.back();'></td><td align=right><input type=submit value='Print'></td></tr>\n\t</table></form>\n\t<p>\n\t<table border=0 cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "' width=25%>\n\t\t<tr><th>Quick Links</th></tr>\n\t\t<tr class=datacell><td align=center><a target=_blank href='../core/acc-new2.php'>Add account (New Window)</a></td></tr>\n\t\t<script>document.write(getQuicklinkSpecial());</script>\n\t</table>";
    return $view;
}
# details