projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed error log warning (missing installed_extensions.inc) during upgrade to 2.2.
[fa-stable.git]
/
reporting
/
rep705.php
diff --git
a/reporting/rep705.php
b/reporting/rep705.php
index 4361b6e7cea3ee10d63448dbe11a05e58e5aa958..0d2c370fa833cf49b8ac127ee48a12e496c9d49c 100644
(file)
--- a/
reporting/rep705.php
+++ b/
reporting/rep705.php
@@
-61,10
+61,10
@@
function getPeriods($year, $account, $dimension, $dimension2)
SUM(CASE WHEN tran_date >= '$date12' AND tran_date < '$date13' THEN amount / 1000 ELSE 0 END) AS per12
FROM ".TB_PREF."gl_trans
WHERE account='$account'";
SUM(CASE WHEN tran_date >= '$date12' AND tran_date < '$date13' THEN amount / 1000 ELSE 0 END) AS per12
FROM ".TB_PREF."gl_trans
WHERE account='$account'";
- if ($dimension
>
0)
- $sql .= " AND dimension_id =
$dimension"
;
- if ($dimension2
>
0)
- $sql .= " AND dimension2_id =
$dimension2"
;
+ if ($dimension
!=
0)
+ $sql .= " AND dimension_id =
".($dimension<0?0:db_escape($dimension))
;
+ if ($dimension2
!=
0)
+ $sql .= " AND dimension2_id =
".($dimension2<0?0:db_escape($dimension2))
;
$result = db_query($sql, "Transactions for account $account could not be calculated");
$result = db_query($sql, "Transactions for account $account could not be calculated");