posaune
[kivitendo-erp.git] / SL / GL.pm
index 016601e..01417aa 100644 (file)
--- a/SL/GL.pm
+++ b/SL/GL.pm
@@ -196,8 +196,6 @@ sub post_transaction {
       exporttype => DATEV_ET_BUCHUNGEN,
       format     => DATEV_FORMAT_KNE,
       dbh        => $dbh,
-      from       => $transdate,
-      to         => $transdate,
       trans_id   => $form->{id},
     );
 
@@ -724,10 +722,14 @@ sub storno {
   $query = qq|SELECT * FROM gl WHERE id = ?|;
   $storno_row = selectfirst_hashref_query($form, $dbh, $query, $id);
 
-  $storno_row->{id}        = $new_id;
-  $storno_row->{storno_id} = $id;
-  $storno_row->{storno}    = 't';
-  $storno_row->{reference} = 'Storno-' . $storno_row->{reference};
+  $storno_row->{id}          = $new_id;
+  $storno_row->{storno_id}   = $id;
+  $storno_row->{storno}      = 't';
+  $storno_row->{reference}   = 'Storno-' . $storno_row->{reference};
+
+  $query = qq|SELECT id FROM employee WHERE login = ?|;
+  my ($employee_id) = selectrow_query($form, $dbh, $query, $::myconfig{login});
+  $storno_row->{employee_id} = $employee_id;
 
   delete @$storno_row{qw(itime mtime gldate)};