} $party_address = getIVal("party_address", "party", "account_ref_id = {$account}"); $accounts[] = array("account_ref_id" => $account, "party_address" => $party_address); } if (count($accounts) == 0) { //all was selected require_once '../includes/db.php'; $items = oci_parse($conn, "SELECT coa.account_ref_id, p.party_address\n" . " FROM chart_of_account coa\n" . " INNER JOIN party p ON p.account_ref_id = coa.account_ref_id\n" . " WHERE p.party_city = '{$_GET['city']}'\n" . " AND coa.company_ref_id = {$_SESSION['company_id']}\n" . "ORDER BY account_name"); oci_execute($items); while ($row = oci_fetch_assoc($items)) { $accounts[] = $row; } } $ledger = array(); foreach ($accounts as $account) { $ledger[] = getLedgerData($account['account_ref_id'], $_GET['report'], $date_start, $date_end, $account['party_address']); } $mysqli->close(); if ($_GET['report'] == 'pdf') { include_once '../reports/ledger.pdf.php'; } else { if ($_GET['report'] == 'xls') { include_once '../reports/ledger.xls.php'; } else { if ($_GET['report'] == 'htm') { include '../includes/JSON.php'; $json = new Services_JSON(); $output = $json->encode($ledger); print $output; } }
if ($account == '#ALL#') { continue; } $accounts[] = $account; } if (count($accounts) == 0) { //all was selected require_once '../includes/connect.php'; $items = mysql_query("SELECT coa.account_ref_id\n" . " FROM chart_of_account coa\n" . " INNER JOIN party p ON p.account_ref_id = coa.account_ref_id\n" . " WHERE p.party_city = '{$_GET['city']}'\n" . " AND coa.company_ref_id = {$_SESSION['company_id']}\n" . "ORDER BY account_name"); while ($row = mysql_fetch_assoc($items)) { $accounts[] = $row['account_ref_id']; } } $ledger = array(); foreach ($accounts as $account) { $ledger[] = getLedgerData($account, $_GET['report'], $date_start, $date_end); } $mysqli->close(); if ($_GET['report'] == 'pdf') { include_once '../reports/ledger.pdf.php'; } else { if ($_GET['report'] == 'xls') { include_once '../reports/ledger.xls.php'; } else { if ($_GET['report'] == 'htm') { include '../includes/JSON.php'; $json = new Services_JSON(); $output = $json->encode($ledger); print $output; } }
require_once '../includes/connecti.php'; require_once '../includes/funcs.inc.php'; $_title = getReportTitle(); if (isset($_GET['report'])) { $date_start = ""; if (isset($_GET['date_start']) && strlen($_GET['date_start']) > 0) { $date_start = $_GET['date_start']; } $date_end = ""; if (isset($_GET['date_end']) && strlen($_GET['date_end']) > 0) { $date_end = $_GET['date_end']; } updateDate('rpt_account_ledger_start', $date_start); updateDate('rpt_account_ledger_end', $date_end); $ledger = array(); $ledger[] = getLedgerData($_GET['account_hidden'], $_GET['report'], $date_start, $date_end); $mysqli->close(); if ($_GET['report'] == 'pdf') { include_once '../reports/ledger.pdf.php'; } else { if ($_GET['report'] == 'xls') { include_once '../reports/ledger.xls.php'; } else { if ($_GET['report'] == 'htm') { include '../includes/JSON.php'; $json = new Services_JSON(); $output = $json->encode($ledger); print $output; } } }