SimpleSystemSetting: Umstellung von »Warengruppen«
[kivitendo-erp.git] / SL / IR.pm
index a2688ba..a424ab9 100644 (file)
--- 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