CGI::Carp qw(fatalsToBrowser); wieder rausgenommen
[kivitendo-erp.git] / bin / mozilla / ir.pl
index ef30cea..87ac207 100644 (file)
@@ -981,12 +981,20 @@ sub storno {
   invoice_links();
   prepare_invoice();
   relink_accounts();
-
+  
+  # saving the history
+  if(!exists $form->{addition} && $form->{id} ne "") {
+    $form->{snumbers} = qq|invnumber_| . $form->{invnumber};  
+    $form->{addition} = "CANCELED";
+    $form->save_history($form->dbconnect(\%myconfig));
+  }
+  # /saving the history
+  
   $form->{storno_id} = $form->{id};
   $form->{storno} = 1;
   $form->{id} = "";
   $form->{invnumber} = "Storno zu " . $form->{invnumber};
-
+  $form->{rowcount}++;
   &post();
   $lxdebug->leave_sub();