X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Fincludes%2Freports_classes.inc;h=dd2e069f223ce9396a1852f5e226e52284aed02b;hb=7561718ee5113232ce917f63085d272884b0929c;hp=c824ddc311dd3e036fd7fee7dadd9837b5d5e92f;hpb=b6cdc9cc28dc7c8fe2d06b4c75579ceddee72cfe;p=fa-stable.git
diff --git a/reporting/includes/reports_classes.inc b/reporting/includes/reports_classes.inc
index c824ddc3..dd2e069f 100644
--- a/reporting/includes/reports_classes.inc
+++ b/reporting/includes/reports_classes.inc
@@ -47,43 +47,62 @@ class BoxReports
function getDisplay($class=null)
{
- global $table_style, $path_to_root, $pdf_debug, $Ajax;
+ global $path_to_root, $SysPrefs, $Ajax;
+ if (find_submit('Rep') != -1) {
+ include($path_to_root.'/reporting/prn_redirect.php');
+ return;
+ }
$temp = array_values($this->ar_classes);
$display_class = $class==null ? $temp[0] : $this->ar_classes[$class];
$st_reports = "";
$st_params = "";
$st_classes = "" . _("Report Classes:") . "
";
+
+ if (isset($_GET['Class']))
+ set_focus('class'.$_GET['Class']);
+
+ $cur_class = $_REQUEST['Class'];
+
foreach($this->ar_classes as $class_id => $name)
{
- $style = $class_id==$_REQUEST['Class'] ? '' : "style='display:none'";
-// $cname = access_string($key, true);
-// $style = $_REQUEST['Class']==$cname ? '' : "style='display:none'";
+ if (!isset($this->ar_reports[$class_id]))
+ continue; // e.g. no dimensions
+
$acc = access_string($name);
$st_classes .= "$acc[0]
";
+ ." style='font-weight:". ($cur_class == $class_id ? 'bold' : 'normal')."'"
+ ." class='repclass_link' id='".'class'.$class_id."'"
+ ."$acc[1]>$acc[0]
";
+
+ $style = $class_id==$cur_class ? '' : "style='display:none'";
$st_reports .= "
$st_classes | "; $st .= "$st_reports | "; $st .= "$st_params | "; @@ -124,7 +122,7 @@ class BoxReports return $st; } - function getOptions($controls) + function getOptions($controls, $id = 0) { $st = ''; if ($controls == null) @@ -139,6 +137,11 @@ class BoxReports if ($ctrl) break; } if ($ctrl == '') { + if (($id == 102 || $id == 202) && $cnt == 3) // set default Show Also Allocated to Yes in aged reports 2014-09-19 Joe Hunt + $_POST['PARAM_'.$cnt] = 1; + + if (isset($_COOKIE['select'][$id][$cnt])) // saved parameters 2010-10-06 Joe Hunt + $_POST['PARAM_'.$cnt] = $_COOKIE['select'][$id][$cnt]; $ctrl = $this->get_ctrl('PARAM_'.$cnt, $type); } if ($ctrl != '') { @@ -164,7 +167,8 @@ class BoxReports // function get_ctrl($name, $type) { - global $path_to_root, $use_date_picker, $pdf_debug, $print_invoice_no; + global $path_to_root, $SysPrefs, + $type_shortcuts; $st = ''; switch ($type) @@ -180,35 +184,43 @@ class BoxReports case 'DATEENDM': case 'DATEBEGINTAX': case 'DATEENDTAX': - if ($type == 'DATEBEGIN') - $date = begin_fiscalyear(); - elseif ($type == 'DATEEND') - $date = end_fiscalyear(); - else - $date = Today(); - if ($type == 'DATEBEGINM') - $date = begin_month($date); - elseif ($type == 'DATEENDM') - $date = end_month($date); - elseif ($type == 'DATEBEGINTAX' || $type == 'DATEENDTAX') + if (!isset($_POST[$name])) { - $row = get_company_prefs(); - $edate = add_months($date, -$row['tax_last']); - $edate = end_month($edate); - if ($type == 'DATEENDTAX') - $date = $edate; + if ($type == 'DATEBEGIN') + $date = begin_fiscalyear(); + elseif ($type == 'DATEEND') + $date = end_fiscalyear(); else + $date = Today(); + if ($type == 'DATEBEGINM') + $date = begin_month($date); + elseif ($type == 'DATEENDM') + $date = end_month($date); + elseif ($type == 'DATEBEGINTAX' || $type == 'DATEENDTAX') { - $bdate = begin_month($edate); - $bdate = add_months($bdate, -$row['tax_prd'] + 1); - $date = $bdate; + $row = get_company_prefs(); + $edate = add_months($date, -$row['tax_last']); + $edate = end_month($edate); + if ($type == 'DATEENDTAX') + $date = $edate; + else + { + $bdate = begin_month($edate); + $bdate = add_months($bdate, -$row['tax_prd'] + 1); + $date = $bdate; + } } } - + else // saved parameters 2010-10-16 Joe Hunt + $date = $_POST[$name]; $st = ""; - if ($use_date_picker) + if (user_use_date_picker()) + { + $calc_image = (file_exists("$path_to_root/themes/".user_theme()."/images/cal.gif")) ? + "$path_to_root/themes/".user_theme()."/images/cal.gif" : "$path_to_root/themes/default/images/cal.gif"; $st .= "" - . "