Ejemplo n.º 1
0
            $order = "p.party_city, coa.account_name";
        } else {
            if (isset($_GET['city']) && strlen($_GET['city']) > 0) {
                $where = "p.party_city = '{$_GET['city']}'\n";
                $order = "coa.account_name";
            }
        }
        $items = oci_parse($conn, "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 {$where}" . "   AND coa.company_ref_id = {$_SESSION['company_id']}\n" . "ORDER BY {$order}");
        oci_execute($items);
        while ($row = oci_fetch_assoc($items)) {
            $accounts[] = $row['account_ref_id'];
        }
    }
    $_outstanding = array();
    foreach ($accounts as $account) {
        $outstandingData = getOutstandingData($account, $_GET['report'], $date_start, $date_end, true);
        $d = $outstandingData['data'][0];
        $_outstanding[] = $d;
    }
    $outstanding = array();
    $outstanding['data']['data'] = $_outstanding;
    $mysqli->close();
    if ($_GET['report'] == 'pdf') {
        include_once '../reports/outstanding.pdf.php';
    } else {
        if ($_GET['report'] == 'xls') {
            include_once '../reports/outstanding.xls.php';
        }
    }
} else {
    ?>
Ejemplo n.º 2
0
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_outstanding_start', $date_start);
    updateDate('rpt_account_outstanding_end', $date_end);
    $outstanding = array();
    $outstanding[] = getOutstandingData($_GET['account_category'], $_GET['report'], $date_start, $date_end, false);
    $mysqli->close();
    if ($_GET['report'] == 'pdf') {
        include_once '../reports/outstanding.pdf.php';
    } else {
        if ($_GET['report'] == 'xls') {
            include_once '../reports/outstanding.xls.php';
        }
    }
} else {
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<link rel="shortcut icon" href="../images/logo_icon.gif">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Ejemplo n.º 3
0
/** @var $mysqli mysqli */
/** @var $result mysqli_result */
$_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_class_start', $date_start);
    updateDate('rpt_account_class_end', $date_end);
    $outstanding = array();
    $outstanding[] = getOutstandingData($_GET['account_class'], $_GET['report'], $date_start, $date_end, false, true);
    $mysqli->close();
    if ($_GET['report'] == 'pdf') {
        include_once '../reports/outstanding.pdf.php';
    } else {
        if ($_GET['report'] == 'xls') {
            include_once '../reports/outstanding.xls.php';
        }
    }
} else {
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<link rel="shortcut icon" href="../images/logo_icon.gif">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />