Storno von Dialogbuchungen: acc_trans_id nicht doppelt einfügen
[kivitendo-erp.git] / SL / GL.pm
index 320be1e..01b71db 100644 (file)
--- a/SL/GL.pm
+++ b/SL/GL.pm
@@ -707,7 +707,7 @@ sub storno {
   my $rowref = selectall_hashref_query($form, $dbh, $query, $id);
 
   for my $row (@$rowref) {
-    delete @$row{qw(itime mtime)};
+    delete @$row{qw(itime mtime acc_trans_id)};
     $query = sprintf 'INSERT INTO acc_trans (%s) VALUES (%s)', join(', ', keys %$row), join(', ', map '?', values %$row);
     $row->{trans_id}   = $new_id;
     $row->{amount}    *= -1;