X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Fincludes%2Freports_classes.inc;h=4db83a31e5af0c7df076a4a278eedff216488420;hb=5f06887dedd4d14701864fb72994d7e20352086d;hp=e244b8ff89c0cbaa9e1e230571668212167b6092;hpb=099878cda61f8c47371f6f5f31b4fcf6acd3e27c;p=fa-stable.git diff --git a/reporting/includes/reports_classes.inc b/reporting/includes/reports_classes.inc index e244b8ff..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 .= ""; + $st_classes .= "$acc[0]
"; + $st_reports .= "
" . _("Reports For Class: ") . " $key
\n"; foreach($value as $report) - { $acc = access_string($report->name); - $st_reports .= ""; - - $action = $path_to_root.'/reporting/prn_redirect.php'; - - $st_params .= "
" . _("Reports For Class: ") . " $key
$acc[0]
\n" - . "
\n" - . $report->getDisplay() - . "\n
\n" - . "
"; - + { + $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" + . "
\n"; + $st_params .= submit('Rep'.$report->id, + _("Display: ") . access_string($report->name, true), + false, '', $pdf_debug ? false : 'default') . hidden('REP_ID', $report->id, false).'

'; + $st_params .= $this->getOptions($report->get_controls()); + $st_params .= "\n
\n"; + set_focus('Rep'.$report->id); + $Ajax->addUpdate(true, 'rep_form', $st_params); + } } $st_reports .= ""; + $class_counter++; } + $st_params = "
". + "$st_params
"; + + $st = "