]> wagnertech.de Git - kivitendo-erp.git/commitdiff
storno fix: acc_trans query muessen nach oid sortieren
authorSven Schöling <s.schoeling@linet-services.de>
Thu, 14 Jun 2007 15:36:53 +0000 (15:36 +0000)
committerSven Schöling <s.schoeling@linet-services.de>
Thu, 14 Jun 2007 15:36:53 +0000 (15:36 +0000)
SL/AP.pm
SL/AR.pm

index 2da4eca6ca8dfcdbd78895b460817a8de1c072f5..b5e25209648018ee56c451f5c980a6a73bd21125 100644 (file)
--- 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
   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/
   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/
index 96547c566fd2f77ec5ffa9ef3190881d02098df1..b716b208c83560cb4aae5c754b032b5038a640d8 100644 (file)
--- 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
   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/
   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/