From 6318a9b5538aa78e64daf7ee776af74bd75aaad5 Mon Sep 17 00:00:00 2001 From: sunsetsystems Date: Mon, 19 May 2008 04:46:41 +0000 Subject: [PATCH] new report of services by category --- interface/reports/services_by_category.php | 135 +++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 interface/reports/services_by_category.php diff --git a/interface/reports/services_by_category.php b/interface/reports/services_by_category.php new file mode 100644 index 000000000..90721ab00 --- /dev/null +++ b/interface/reports/services_by_category.php @@ -0,0 +1,135 @@ + +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. + +include_once("../globals.php"); +include_once("../../custom/code_types.inc.php"); +include_once("$srcdir/sql.inc"); + +// Format dollars for display. +// +function bucks($amount) { + if ($amount) { + $amount = sprintf("%.2f", $amount); + if ($amount != 0.00) return $amount; + } + return ''; +} + +$filter = $_REQUEST['filter'] + 0; +$where = "1 = 1"; +if ($filter) $where .= " AND c.code_type = '$filter'"; +if (empty($_REQUEST['include_uncat'])) + $where .= " AND c.superbill != '' AND c.superbill != '0'"; +?> + + + + + + +
+ +
+ + + + + +
+ + + +   + /> + Include Uncategorized +   + +   + +
+
+ + + + + + + + + + + + +" . $prow['title'] . "\n"; +} +?> + + + + $value) { + if ($value['id'] == $row['code_type']) { + break; + } + } + $bgcolor = (($irow & 1) ? "#ffdddd" : "#ddddff"); + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + $pres = sqlStatement("SELECT p.pr_price " . + "FROM list_options AS lo LEFT OUTER JOIN prices AS p ON " . + "p.pr_id = '" . $row['id'] . "' AND p.pr_selector = '' " . + "AND p.pr_level = lo.option_id " . + "WHERE list_id = 'pricelevel' ORDER BY lo.seq"); + while ($prow = sqlFetchArray($pres)) { + echo " \n"; + } + echo " \n"; +} +?> + +
$disp_category$key" . $row['code'] . "" . $row['modifier'] . "" . $row['units'] . "" . $row['code_text'] . "" . bucks($prow['pr_price']) . "
+ + + +
+ + + -- 2.11.4.GIT