X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/4800abb9a0b8363c3c529927f34a5b26551497b2..ff424b75f8f66c796eae294d0239f0440741e578:/SL/AR.pm diff --git a/SL/AR.pm b/SL/AR.pm index 4caf5273c..2ca302258 100644 --- a/SL/AR.pm +++ b/SL/AR.pm @@ -38,6 +38,7 @@ package AR; use Data::Dumper; use SL::DATEV qw(:CONSTANTS); use SL::DBUtils; +use SL::DB::Draft; use SL::IO; use SL::MoreCommon; use SL::DB::Default; @@ -305,6 +306,10 @@ sub _post_transaction { IO->set_datepaid(table => 'ar', id => $form->{id}, dbh => $dbh); + if ($form->{draft_id}) { + SL::DB::Manager::Draft->delete_all(where => [ id => delete($form->{draft_id}) ]); + } + # safety check datev export if ($::instance_conf->get_datev_check_on_ar_transaction) { my $transdate = $::form->{transdate} ? DateTime->from_lxoffice($::form->{transdate}) : undef;