projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Sortierung in Berichten über Kunden und Lieferanten auch auf- und absteigbar sortierb...
[kivitendo-erp.git]
/
SL
/
RP.pm
diff --git
a/SL/RP.pm
b/SL/RP.pm
index
4d2dd4e
..
365d6e0
100644
(file)
--- a/
SL/RP.pm
+++ b/
SL/RP.pm
@@
-1303,6
+1303,9
@@
sub aging {
$form->{todate} = $form->current_date($myconfig) unless ($form->{todate});
my $todate = conv_dateq($form->{todate});
$form->{todate} = $form->current_date($myconfig) unless ($form->{todate});
my $todate = conv_dateq($form->{todate});
+ my $fromdate = conv_dateq($form->{fromdate});
+
+ my $fromwhere = ($form->{fromdate} ne "") ? " AND (transdate >= (date $fromdate)) " : "";
my $where = " 1 = 1 ";
my ($name, $null);
my $where = " 1 = 1 ";
my ($name, $null);
@@
-1338,7
+1341,7
@@
sub aging {
AND (${arap}.storno IS FALSE)
AND (${arap}.${ct}_id = ${ct}.id)
AND (${ct}.id = ?)
AND (${arap}.storno IS FALSE)
AND (${arap}.${ct}_id = ${ct}.id)
AND (${ct}.id = ?)
- AND (transdate <= (date $todate))
+ AND (transdate <= (date $todate)
$fromwhere
)
ORDER BY ctid, transdate, invnumber |;
ORDER BY ctid, transdate, invnumber |;
@@
-1352,7
+1355,7
@@
sub aging {
WHERE $where
AND (a.${ct_id} = ct.id)
AND ((a.paid != a.amount) OR ((a.datepaid > $todate) AND (datepaid is NOT NULL)))
WHERE $where
AND (a.${ct_id} = ct.id)
AND ((a.paid != a.amount) OR ((a.datepaid > $todate) AND (datepaid is NOT NULL)))
- AND (a.transdate <= $todate)
+ AND (a.transdate <= $todate
$fromwhere
)
ORDER BY ct.name|;
my $sth = prepare_execute_query($form, $dbh, $query);
ORDER BY ct.name|;
my $sth = prepare_execute_query($form, $dbh, $query);