diff --git a/admin/reports.inc.php b/admin/reports.inc.php index 4669e9a..c528dbb 100644 --- a/admin/reports.inc.php +++ b/admin/reports.inc.php @@ -349,10 +349,11 @@ foreach($stock as $n=>$v) { - function report_gen_by_id($report_id, $format=NULL) + function report_gen_by_id($report_id, $year, $format=NULL) { global $options; $report = report_load($report_id); + $report['year'] = $year; if($format != NULL) { $keys = array_keys($options['type']['values']); if(in_array($format, $keys)) { diff --git a/admin/reports.php b/admin/reports.php index 3de5759..843e6f4 100644 --- a/admin/reports.php +++ b/admin/reports.php @@ -44,6 +44,7 @@ echo ""; + echo ""; echo ""; echo "
"; echo "
"; diff --git a/admin/reports_gen.php b/admin/reports_gen.php index 5cd7ea2..3e2bd6f 100644 --- a/admin/reports_gen.php +++ b/admin/reports_gen.php @@ -30,9 +30,11 @@ $id = intval($_GET['id']); $format = stripslashes($_GET['type']); + $year = intval($_GET['year']); + if($year < 1000) $year = $config['FAIRYEAR']; if($format == '') $format = NULL; - report_gen_by_id($id, $format); + report_gen_by_id($id, $year, $format); ?>