Skip to content
This repository has been archived by the owner on Feb 26, 2025. It is now read-only.

Commit

Permalink
Merge pull request coral-erm#632 from biblibre/Fix_dashboards_export
Browse files Browse the repository at this point in the history
Fix dashboards exports
  • Loading branch information
veggiematts authored Feb 21, 2020
2 parents 7679021 + 9781069 commit 8947e5b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion resources/dashboard_export.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
$costDetailsID = $_POST['costDetailsID'];
$subjectID = $_POST['subjectID'];
$groupBy = $_POST['groupBy'];
$fundID = $_POST['fundID'];
$organizationID = $_POST['organizationID'];
$roleID = $_POST['roleID'];
$csv = $_POST['csv'];

$dashboard = new Dashboard();
$query = $dashboard->getQuery($resourceTypeID, $year, $acquisitionTypeID, $orderTypeID, $subjectID, $costDetailsID, $groupBy);
$query = $dashboard->getQuery($resourceTypeID, $year, $acquisitionTypeID, $orderTypeID, $subjectID, $costDetailsID, $fundID, $organizationID, $roleID, $groupBy);
$results = $dashboard->getResults($query);
if ($groupBy == "GS.shortName") $groupBy = "generalSubject";

Expand Down
5 changes: 4 additions & 1 deletion resources/dashboard_yearly_costs_exports.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@
$orderTypeID = $_POST['orderTypeID'];
$subjectID = $_POST['subjectID'];
$costDetailsID = $_POST['costDetailsID'];
$fundID = $_POST['fundID'];
$organizationID = $_POST['organizationID'];
$roleID = $_POST['roleID'];
$groupBy = $_POST['groupBy'];
$csv = $_POST['csv'];

$dashboard = new Dashboard();
$query = $dashboard->getQueryYearlyCosts($resourceTypeID, $startYear, $endYear, $acquisitionTypeID, $orderTypeID, $subjectID, $costDetailsID, $groupBy);
$query = $dashboard->getQueryYearlyCosts($resourceTypeID, $startYear, $endYear, $acquisitionTypeID, $orderTypeID, $subjectID, $costDetailsID, $fundID, $organizationID, $roleID, $groupBy);
$results = $dashboard->getResults($query);
if ($groupBy == "GS.shortName") $groupBy = "generalSubject";

Expand Down

0 comments on commit 8947e5b

Please sign in to comment.