X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FIR.pm;h=a424ab99083b8a9334a193779adbace2050d2af1;hb=a50663d89ac93112110c23caae05ed82105fd28f;hp=a2688baea90109d54241484f127e40d35df3664f;hpb=529e6bf96e1ad74ae2e770a9e74f29f26a28d3c8;p=kivitendo-erp.git diff --git a/SL/IR.pm b/SL/IR.pm index a2688baea..a424ab990 100644 --- a/SL/IR.pm +++ b/SL/IR.pm @@ -41,6 +41,7 @@ use SL::Common; use SL::CVar; use SL::DATEV qw(:CONSTANTS); use SL::DBUtils; +use SL::DB::Draft; use SL::DO; use SL::GenericTranslations; use SL::HTML::Restrict; @@ -810,6 +811,10 @@ SQL do_query($form, $dbh, $query, @orphaned_ids); } + 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_purchase_invoice) { # if we need department for kostenstelle in DATEV check