Löschen von Angeboten/Aufträgen protokollieren
authorG. Richardson <information@kivitendo-premium.de>
Fri, 12 Dec 2014 11:12:42 +0000 (12:12 +0100)
committerG. Richardson <information@kivitendo-premium.de>
Fri, 12 Dec 2014 11:12:42 +0000 (12:12 +0100)
Berücksichtigt jetzt auch Angebote in history_erp.

bin/mozilla/oe.pl

index 50e6b35..e3de085 100644 (file)
@@ -1344,9 +1344,14 @@ sub delete {
   if (OE->delete(\%myconfig, \%$form)){
     # saving the history
     if(!exists $form->{addition}) {
-      $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
-      $form->{addition} = "DELETED";
-      $form->save_history;
+      if ( $form->{formname} eq 'sales_quotation' or  $form->{formname} eq 'request_quotation' ) {
+          $form->{snumbers} = qq|quonumber_| . $form->{quonumber};
+      } elsif ( $form->{formname} eq 'sales_order' or $form->{formname} eq 'purchase_order') {
+          $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
+      };
+        $form->{what_done} = $form->{formname};
+        $form->{addition} = "DELETED";
+        $form->save_history;
     }
     # /saving the history
     $form->info($msg);