Add Expand Group option to web view

This commit is contained in:
Grégory Soutadé
2010-10-27 21:00:40 +02:00
parent dc6ec437fa
commit 13db50e271
3 changed files with 63 additions and 7 deletions

View File

@@ -173,6 +173,20 @@ function LoadMonth($user, $month, $year)
return $db->query($req);
}
function MetaPositiveAmount($id)
{
global $db;
$req = "SELECT SUM(amount) as amount FROM operation WHERE amount > 0 AND parent='$id'";
$result = $db->query($req);
if ($row = $result->fetchArray())
return $row["amount"];
else
return 0.0;
}
function GetAllOperations($user, &$last_year, &$last_month)
{
$res;