summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7214b60)
2. Wenn bei E/Ü-Rechnung ein Projekt ausgewählt ist, dann wurde vorher ein Teil des SQL-Codes nicht im eigentlichen Query untergebracht sondern in eine danach nicht mehr benutzte Variable geschrieben.
if ($form->{method} eq 'cash') {
$subwhere .= " AND (transdate >= $fromdate)";
$glwhere = " AND (ac.transdate >= $fromdate)";
if ($form->{method} eq 'cash') {
$subwhere .= " AND (transdate >= $fromdate)";
$glwhere = " AND (ac.transdate >= $fromdate)";
- $prwhere = " AND (ar.transdate >= $fromdate)";
+ $prwhere = " AND (a.transdate >= $fromdate)";
} else {
$where .= " AND (ac.transdate >= $fromdate)";
}
} else {
$where .= " AND (ac.transdate >= $fromdate)";
}
$todate = conv_dateq($todate);
$subwhere .= " AND (transdate <= $todate)";
$where .= " AND (ac.transdate <= $todate)";
$todate = conv_dateq($todate);
$subwhere .= " AND (transdate <= $todate)";
$where .= " AND (ac.transdate <= $todate)";
- $prwhere .= " AND (ar.transdate <= $todate)";
+ $prwhere .= " AND (a.transdate <= $todate)";
WHERE $where $dpt_where $glwhere
AND NOT ((c.link = 'AR') OR (c.link = 'AP'))
$project
WHERE $where $dpt_where $glwhere
AND NOT ((c.link = 'AR') OR (c.link = 'AP'))
$project
-
- $project_union
- GROUP BY c.$category
|;
if ($form->{project_id}) {
|;
if ($form->{project_id}) {
UNION
SELECT SUM(ac.sellprice * ac.qty * chart_category_to_sgn(c.category)) AS amount, c.$category
UNION
SELECT SUM(ac.sellprice * ac.qty * chart_category_to_sgn(c.category)) AS amount, c.$category