projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Das Release ist heute.
[kivitendo-erp.git]
/
SL
/
CA.pm
diff --git
a/SL/CA.pm
b/SL/CA.pm
index
b4680ad
..
76d2b32
100644
(file)
--- a/
SL/CA.pm
+++ b/
SL/CA.pm
@@
-347,7
+347,9
@@
sub all_transactions {
$union = qq|UNION ALL|;
}
$union = qq|UNION ALL|;
}
- $query .= qq|ORDER BY | . $form->{sort};
+ my $sort = grep({ $form->{sort} eq $_ } qw(transdate reference description)) ? $form->{sort} : 'transdate';
+
+ $query .= qq|ORDER BY $sort|;
$sth = prepare_execute_query($form, $dbh, $query, @values);
$form->{CA} = [];
$sth = prepare_execute_query($form, $dbh, $query, @values);
$form->{CA} = [];
@@
-370,7
+372,7
@@
sub all_transactions {
$ca->{debit} = 0;
}
$ca->{debit} = 0;
}
- $ca->{index} =
$ca->{reference}.$ca->{description}
;
+ $ca->{index} =
join "--", map { $ca->{$_} } qw(id reference description)
;
push(@{ $form->{CA} }, $ca);
push(@{ $form->{CA} }, $ca);