history für stornierte Buchungne eingefügt und rowcount hochgesetzt, damit die Storni...
authorThomas Kasulke <t.kasulke@linet-services.de>
Wed, 25 Apr 2007 11:49:04 +0000 (11:49 +0000)
committerThomas Kasulke <t.kasulke@linet-services.de>
Wed, 25 Apr 2007 11:49:04 +0000 (11:49 +0000)
bin/mozilla/ir.pl

index ef30cea..3335493 100644 (file)
@@ -969,7 +969,7 @@ sub update {
 
 sub storno {
   $lxdebug->enter_sub();
-
+use CGI::Carp qw(fatalsToBrowser);
   if ($form->{storno}) {
     $form->error($locale->text('Cannot storno storno invoice!'));
   }
@@ -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();