]> wagnertech.de Git - mfinanz.git/blobdiff - SL/IS.pm
new_lastmtime mit $provided_dbh aufrufen
[mfinanz.git] / SL / IS.pm
index d7ba6b563ce40ced435302b50c2e2618ac990f05..a05f25e3d11a123f53bc5c982d5a2cbbb8a906ce 100644 (file)
--- a/SL/IS.pm
+++ b/SL/IS.pm
@@ -1312,7 +1312,10 @@ SQL
     do_query($form, $dbh, qq|UPDATE ar SET paid = amount WHERE id = ?|, conv_i($form->{"id"}));
   }
 
-  $form->new_lastmtime('ar');
+  # maybe we are in a larger transaction and the current
+  # object is not yet persistent in the db, therefore we
+  # need the current dbh to get the not yet committed mtime
+  $form->new_lastmtime('ar', $provided_dbh);
 
   $form->{name} = $form->{customer};
   $form->{name} =~ s/--\Q$form->{customer_id}\E//;