コード例 #1
0
<?php

require "../include/oldphpfuncs.php";
require "../include/class_funcs.php";
// all static functions
require "../include/class_alex_data.php";
require "../include/class_alex_dental_globals.php";
session_start();
$_g = new alex_dental_globals();
$startdate = $_g->get('d', $_g->today);
$uid = $_g->sget('uid', 0);
$home_office = $_g->sget('home_office', 'fh');
$access_level = $_g->sget('access_level', 9);
$_g->sys_admin = $_g->sget('sys_admin', 0);
$office = strtolower($_g->get('o', $home_office));
$qb_class = $_g->qb_classes[$office];
$details_type = $_g->get('t', '');
$details = array();
if ($_g->sys_admin == 1 || $uid) {
    echo '<strong>' . $startdate . '</strong>';
    if ($details_type == 'q') {
        // qb
        echo '<br>Quickbooks<br><table border="1" class="fixed_table">';
        $srch_cat = " cat IN ( 'Fee for Service Income', 'Returned Checks', 'Refunds', 'Misc Income') ";
        $metric = 0.0;
        $plusminus_flag = -1;
        // simliar to globals, public function qb_details_ary($qb_class, $srch_cat, $startdate, $enddate, $plusminus_flag, $details = 0) {, but not grouped - need details
        $qb_tables_minus = 'alexqb_bill';
        $qb_deposit_minus = 'alexqb_deposit';
        $result = array();
        $sql = "\n            SELECT\n                amt,\n                cat,\n                memo,\n                name,\n                view\n            FROM\n                acct_transactions\n            WHERE\n                view IN (':QBTABLES')\n                AND\n                dayt BETWEEN ':STARTDATE' AND ':ENDDATE'\n                AND\n                class = ':QB_CLASS'\n                AND\n                {$srch_cat}\n            ORDER BY amt\n        ";