X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Fincludes%2Freports_classes.inc;h=4db83a31e5af0c7df076a4a278eedff216488420;hb=5f06887dedd4d14701864fb72994d7e20352086d;hp=8f501fe023f50e359172533a1ade9c4a2c2124af;hpb=37da0ea920fdff712ccef4e1324aa822e981c8fc;p=fa-stable.git
diff --git a/reporting/includes/reports_classes.inc b/reporting/includes/reports_classes.inc
index 8f501fe0..4db83a31 100644
--- a/reporting/includes/reports_classes.inc
+++ b/reporting/includes/reports_classes.inc
@@ -1,7 +1,18 @@
.
+***********************************************************************/
class BoxReports
{
var $ar_classes;
+ var $ctrl_handlers = array();
function ReportClasses()
{
@@ -15,12 +26,14 @@ class BoxReports
function addReport($class_name, $id, $rep_name, $params=null)
{
- $this->ar_classes[$class_name][] = new Report($id,$rep_name,$params);
+ unset($this->ar_classes[$class_name][$id]); // unset std report if any
+ $this->ar_classes[$class_name][$id] = new Report($id, $rep_name, $params);
}
function getDisplay($class=null)
{
- global $table_style2, $comp_path, $path_to_root;
+ global $table_style2, $comp_path, $path_to_root, $pdf_debug, $Ajax;
+
$temp = array_values($this->ar_classes);
$display_class = $class==null ? $temp[0] : $this->ar_classes[$class];
@@ -31,44 +44,52 @@ class BoxReports
$st_classes = "" . _("Report Classes:") . "
";
foreach($this->ar_classes as $key=>$value)
{
- $style = $class_counter==0 ? '' : $style = "style='display:none'";
+ $style = $class_counter==$_REQUEST['Class'] ? '' : "style='display:none'";
$acc = access_string($key);
- $st_classes .= "$acc[0]
";
- $st_reports .= "
" . _("Reports For Class: ") . " $key |
";
+ $st_classes .= "
";
+ $st_reports .= "" . _("Reports For Class: ") . " $key |
\n";
foreach($value as $report)
- { $acc = access_string($report->name);
- $st_reports .= "$acc[0] |
";
-
- $action = $path_to_root.'/reporting/prn_redirect.php';
-
- $st_params .= "";
-
+ {
+ $acc = access_string($report->name);
+ $st_reports .= "id'"
+ ." id='".default_focus()."'"
+ ."$acc[1]>$acc[0] |
\n";
+ if (isset($_REQUEST['rep_id']) && $_REQUEST['rep_id']==$report->id) {
+
+ $action = $path_to_root.'/reporting/prn_redirect.php';
+
+ $st_params = "\n";
+ set_focus('Rep'.$report->id);
+ $Ajax->addUpdate(true, 'rep_form', $st_params);
+ }
}
$st_reports .= " |
";
+ $class_counter++;
}
+ $st_params = "".
+ "$st_params
";
+
+
$st = "