add amendments metric
[contractdashboard.git] / graphs / displayMethodValueGraph.php
blob:a/graphs/displayMethodValueGraph.php -> blob:b/graphs/displayMethodValueGraph.php
--- a/graphs/displayMethodValueGraph.php
+++ b/graphs/displayMethodValueGraph.php
@@ -3,8 +3,8 @@
 // Width and height of the graph

 $width = 800;

 $height = 300;

-$query = "select procurementMethod, value, MONTH(contractStart) as month, YEAR(contractStart) as year from `contractnotice`

-where $agencyQ $supplierQ childCN = 0 AND YEAR(contractStart) >= 2007 AND YEAR(contractStart) <= 2009 group by procurementMethod,year,month order by procurementMethod,year,month";

+$query = "select procurementMethod, SUM(value) as value, MONTH(contractStart) as month, YEAR(contractStart) as year from `contractnotice`

+where $agencyQ $supplierQ $standardQ group by procurementMethod,year,month order by procurementMethod,year,month";

 $result = mysql_query($query);

 $methods = Array("Direct","Open","Select");

 $dates = Array();

@@ -37,7 +37,7 @@
 $graph->SetMargin(95, 145, 45, 100);

 // Setup a title for the graph

 $graph->title->Set($agencyQ.$supplierQ);

-$graph->SetUserFont("ttf-liberation/LiberationSans-Regular.ttf");

+$graph->SetUserFont("liberation/LiberationSans-Regular.ttf");

 $graph->title->SetFont(FF_USERFONT, FS_NORMAL, 12);

 // Setup font for axis

 $graph->xaxis->SetFont(FF_USERFONT, FS_NORMAL, 10);