From: Sven Schöling Date: Thu, 14 Jun 2007 15:36:53 +0000 (+0000) Subject: storno fix: acc_trans query muessen nach oid sortieren X-Git-Tag: release-2.4.3^2~120 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=62a9b7075e66ccbf41e9f0bc6314359aa70af8e6;p=kivitendo-erp.git storno fix: acc_trans query muessen nach oid sortieren --- diff --git a/SL/AP.pm b/SL/AP.pm index 2da4eca6c..b5e252096 100644 --- a/SL/AP.pm +++ b/SL/AP.pm @@ -776,7 +776,7 @@ sub storno { do_query($form, $dbh, $query, $id); # now copy acc_trans entries - $query = qq|SELECT a.*, c.link FROM acc_trans a LEFT JOIN chart c ON a.chart_id = c.id WHERE a.trans_id = ?|; + $query = qq|SELECT a.*, c.link FROM acc_trans a LEFT JOIN chart c ON a.chart_id = c.id WHERE a.trans_id = ? ORDER BY a.oid|; my $rowref = selectall_hashref_query($form, $dbh, $query, $id); # kill all entries containing payments, which are the last 2n rows, of which the last has link =~ /paid/ diff --git a/SL/AR.pm b/SL/AR.pm index 96547c566..b716b208c 100644 --- a/SL/AR.pm +++ b/SL/AR.pm @@ -645,7 +645,7 @@ sub storno { do_query($form, $dbh, $query, $id); # now copy acc_trans entries - $query = qq|SELECT a.*, c.link FROM acc_trans a LEFT JOIN chart c ON a.chart_id = c.id WHERE a.trans_id = ?|; + $query = qq|SELECT a.*, c.link FROM acc_trans a LEFT JOIN chart c ON a.chart_id = c.id WHERE a.trans_id = ? ORDER BY a.oid|; my $rowref = selectall_hashref_query($form, $dbh, $query, $id); # kill all entries containing payments, which are the last 2n rows, of which the last has link =~ /paid/