Permalink
Browse files

Fehlerkorrektur: Kompatibilität mit MySQL 5.7.12 hergestellt.

  • Loading branch information...
ww-lessons committed Apr 25, 2017
1 parent 3ee5c45 commit 10416c3b5ff3a65d1a0086c8fe0ccc0f9ce7bbc9
View
@@ -1,2 +1,4 @@
lib/Database.php
.htusers
.htusers
.htaccess
.htpasswd
@@ -282,7 +282,7 @@ function getVerlauf($request) {
# Nur immer die letzten 12 Monate anzeigen
$sql .= "and (year(datum)*100)+month(datum) >= ((year(now())*100)+month(now()))-100 ";
$sql .= "group by kontenart_id, year(datum), month(datum) ";
$sql .= "group by kontenart_id, grouping ";
$sql .= "order by grouping";
$rs = mysqli_query($db, $sql);
@@ -308,7 +308,7 @@ function getVerlaufGewinn() {
# Nur immer die letzten 12 Monate anzeigen
$sql .= "and (year(datum)*100)+month(datum) >= ((year(now())*100)+month(now()))-100 ";
$sql .= "group by year(datum), month(datum) ";
$sql .= "group by grouping ";
$sql .= "order by grouping";
$rs = mysqli_query($db, $sql);
@@ -43,7 +43,7 @@ from (
group by b.mandant_id
) as soll
left outer join (
select b.mandant_id, k.kontenart_id, sum(b.betrag) as betrag
select b.mandant_id, sum(b.betrag) as betrag
from fi_buchungen b
inner join fi_konto k
on b.mandant_id = k.mandant_id
View
@@ -1,6 +1,6 @@
select kontonummer as konto, bezeichnung as kontenname,
case when kontenart_id = 4 then sum(betrag)*-1
else sum(betrag) end as saldo
sum(case when kontenart_id = 4 then betrag*-1
else betrag end) as saldo
from (
select k.kontonummer as kontonummer,
View
@@ -1,6 +1,6 @@
select kontonummer as konto, bezeichnung as kontenname,
case when kontenart_id = 4 then sum(betrag)*-1
else sum(betrag) end as saldo
sum(case when kontenart_id = 4 then betrag*-1
else betrag end) as saldo
from (
select k.kontonummer as kontonummer,
@@ -58,6 +58,6 @@ group by (year(b.datum)*100)+month(b.datum)
) as base_view
inner join fi_kontenart as ka
on base_view.kontenart_id = ka.kontenart_id
group by ka.bezeichnung, monat
group by ka.kontenart_id, ka.bezeichnung, monat
having monat is not null
order by monat, ka.bezeichnung

0 comments on commit 10416c3

Please sign in to comment.