]> wagnertech.de Git - kivitendo-erp.git/commitdiff
history_search auf Buchungsnummern etcpp angepasst, so dass man auch gelöschte Daten...
authorThomas Kasulke <t.kasulke@linet-services.de>
Mon, 23 Apr 2007 10:52:18 +0000 (10:52 +0000)
committerThomas Kasulke <t.kasulke@linet-services.de>
Mon, 23 Apr 2007 10:52:18 +0000 (10:52 +0000)
Anpassungen innerhalb der Variablenübergabe:
$form->{snumbers} muß beim speichern der history gesetzt werden (z.B. $form->{snumbers} = qq|invnumber_| . $form->{invnumber}; )

12 files changed:
bin/mozilla/am.pl
bin/mozilla/ap.pl
bin/mozilla/ar.pl
bin/mozilla/ct.pl
bin/mozilla/gl.pl
bin/mozilla/ic.pl
bin/mozilla/io.pl
bin/mozilla/ir.pl
bin/mozilla/is.pl
bin/mozilla/oe.pl
bin/mozilla/pe.pl
bin/mozilla/rp.pl

index 3396d93160fb46a6a8ecc3eda6c2e1bf1cf756bb..b01f5f6bf6621a3fc5b2d0f87fa8117a84c1335c 100644 (file)
@@ -3134,33 +3134,36 @@ sub show_am_history {
                                                );
        
        my $dbh = $form->dbconnect(\%myconfig);
                                                );
        
        my $dbh = $form->dbconnect(\%myconfig);
-       
+       my $searchSNumber = $searchNo{$form->{'what2search'}} . qq|_| . $form->{'searchid'};
        $restriction .= ($form->{mitarbeiter} eq "" ? "" 
                                        : ($form->{mitarbeiter} =~ /^[0-9]*$/  
                                                ? " AND employee_id = " . $form->{mitarbeiter} 
                                                : " AND employee_id = " . &get_employee_id($form->{mitarbeiter}, $dbh)));
        $restriction .= ($form->{mitarbeiter} eq "" ? "" 
                                        : ($form->{mitarbeiter} =~ /^[0-9]*$/  
                                                ? " AND employee_id = " . $form->{mitarbeiter} 
                                                : " AND employee_id = " . &get_employee_id($form->{mitarbeiter}, $dbh)));
-       
-       my $query = qq|SELECT id FROM $search{$form->{what2search}} 
-                                  WHERE $searchNo{$form->{'what2search'}} ILIKE '$form->{"searchid"}' 
-                                  |;
-       
-       my $sth = $dbh->prepare($query);
+       my $query = qq|SELECT trans_id AS id FROM history_erp WHERE sNumbers = '$searchSNumber' |;
+
+  my $sth = $dbh->prepare($query);
        
        $sth->execute() || $form->dberror($query);
        
        
        $sth->execute() || $form->dberror($query);
        
+  if($sth->fetch() <= 0) {
+    $sth->finish();
+    my $query = qq|SELECT id FROM $search{$form->{what2search}} 
+           WHERE $searchNo{$form->{'what2search'}} ILIKE '$form->{"searchid"}' 
+           |;
+  }
+  $sth->execute() || $form->dberror($query);  
        $form->{title} = $locale->text("History Search");
        $form->header();
        $form->{title} = $locale->text("History Search");
        $form->header();
-       
+       my @daten;
        while(my $hash_ref = $sth->fetchrow_hashref()){
        while(my $hash_ref = $sth->fetchrow_hashref()){
-               print $form->parse_html_template("/common/show_history", 
-                       {"DATEN" => $form->get_history($dbh,$hash_ref->{id},$restriction),
-                        "SUCCESS" => ($form->get_history($dbh,$hash_ref->{id},$restriction) != 0),
-                        "NONEWWINDOW" => "1"   
-                       }
-               );
-       }
+    push(@daten, $form->get_history($dbh,$hash_ref->{id},$restriction));
+  }
        $dbh->disconnect();
        $dbh->disconnect();
-       
+       print $form->parse_html_template("/common/show_history", 
+    {"DATEN" => @daten,
+     "SUCCESS" => (length(@daten) > 0),
+     "NONEWWINDOW" => 1
+    });
        $lxdebug->leave_sub();
 }
 
        $lxdebug->leave_sub();
 }
 
index c5393a7e53676f360514fcdbd7341a0f08232776..43a025fd25c2d8afd28c8bc20143100c1fd3b233 100644 (file)
@@ -1075,6 +1075,7 @@ sub post {
   if (AP->post_transaction(\%myconfig, \%$form)) {
     # saving the history
     if(!exists $form->{addition} && $form->{id} ne "") {
   if (AP->post_transaction(\%myconfig, \%$form)) {
     # saving the history
     if(!exists $form->{addition} && $form->{id} ne "") {
+      $form->{snumber} = qq|invnumber_| . $form->{invnumber};
       $form->{addition} = "POSTED";
       $form->save_history($form->dbconnect(\%myconfig));
     }
       $form->{addition} = "POSTED";
       $form->save_history($form->dbconnect(\%myconfig));
     }
@@ -1093,6 +1094,7 @@ sub post_as_new {
   $form->{postasnew} = 1;
   # saving the history
   if(!exists $form->{addition} && $form->{id} ne "") {
   $form->{postasnew} = 1;
   # saving the history
   if(!exists $form->{addition} && $form->{id} ne "") {
+    $form->{snumber} = qq|invnumber_| . $form->{invnumber};
        $form->{addition} = "POSTED AS NEW";
        $form->save_history($form->dbconnect(\%myconfig));
   }
        $form->{addition} = "POSTED AS NEW";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -1157,6 +1159,7 @@ sub yes {
   if (AP->delete_transaction(\%myconfig, \%$form, $spool)) {
     # saving the history
     if(!exists $form->{addition}) {
   if (AP->delete_transaction(\%myconfig, \%$form, $spool)) {
     # saving the history
     if(!exists $form->{addition}) {
+      $form->{snumber} = qq|invnumber_| . $form->{invnumber};
          $form->{addition} = "DELETED";
       $form->save_history($form->dbconnect(\%myconfig));
     }
          $form->{addition} = "DELETED";
       $form->save_history($form->dbconnect(\%myconfig));
     }
index bb46fca552e20a0918f0b7b3cc00c7fc8fe9a703..05c541b6163564258601d55b5092ba986923d1cf 100644 (file)
@@ -79,6 +79,7 @@ sub add {
 
   # saving the history
   if(!exists $form->{addition} && ($form->{id} ne "")) {
 
   # saving the history
   if(!exists $form->{addition} && ($form->{id} ne "")) {
+    $form->{snumber} = qq|invnumber_| . $form->{invnumber};
        $form->{addition} = "ADDED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
        $form->{addition} = "ADDED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -1092,6 +1093,7 @@ sub post {
   if (AR->post_transaction(\%myconfig, \%$form)) {
     # saving the history
     if(!exists $form->{addition} && $form->{id} ne "") {
   if (AR->post_transaction(\%myconfig, \%$form)) {
     # saving the history
     if(!exists $form->{addition} && $form->{id} ne "") {
+      $form->{snumber} = qq|invnumber_| . $form->{invnumber};
          $form->{addition} = "POSTED";
          $form->save_history($form->dbconnect(\%myconfig));
     }
          $form->{addition} = "POSTED";
          $form->save_history($form->dbconnect(\%myconfig));
     }
@@ -1110,6 +1112,7 @@ sub post_as_new {
   $form->{postasnew} = 1;
   # saving the history
   if(!exists $form->{addition} && $form->{id} ne "") {
   $form->{postasnew} = 1;
   # saving the history
   if(!exists $form->{addition} && $form->{id} ne "") {
+    $form->{snumber} = qq|invnumber_| . $form->{invnumber};
        $form->{addition} = "POSTED AS NEW";
        $form->save_history($form->dbconnect(\%myconfig));
   }
        $form->{addition} = "POSTED AS NEW";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -1174,6 +1177,7 @@ sub yes {
   if (AR->delete_transaction(\%myconfig, \%$form, $spool)) {
     # saving the history
     if(!exists $form->{addition}) {
   if (AR->delete_transaction(\%myconfig, \%$form, $spool)) {
     # saving the history
     if(!exists $form->{addition}) {
+      $form->{snumber} = qq|invnumber_| . $form->{invnumber};
          $form->{addition} = "DELETED";
          $form->save_history($form->dbconnect(\%myconfig));
     }
          $form->{addition} = "DELETED";
          $form->save_history($form->dbconnect(\%myconfig));
     }
index 6c119be5d3916836e9534f5e9e902234410503a2..fec4e35f4706770e50191bb91104737ae425330d 100644 (file)
@@ -1284,6 +1284,7 @@ sub save_and_ap_transaction {
   $form->{script} = "ap.pl";
   # saving the history
   if(!exists $form->{addition}) {
   $form->{script} = "ap.pl";
   # saving the history
   if(!exists $form->{addition}) {
+    $form->{snumber} = qq|invnumber_| . $form->{invnumber};
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -1298,6 +1299,7 @@ sub save_and_ar_transaction {
   $form->{script} = "ar.pl";
   # saving the history
   if(!exists $form->{addition}) {
   $form->{script} = "ar.pl";
   # saving the history
   if(!exists $form->{addition}) {
+    $form->{snumber} = qq|invnumber_| . $form->{invnumber};
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -1313,6 +1315,7 @@ sub save_and_invoice {
   $form->{type} = "invoice";
   # saving the history
   if(!exists $form->{addition}) {
   $form->{type} = "invoice";
   # saving the history
   if(!exists $form->{addition}) {
+    $form->{snumber} = qq|invnumber_| . $form->{invnumber};
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -1328,6 +1331,7 @@ sub save_and_rfq {
   $form->{type}   = "request_quotation";
   # saving the history
   if(!exists $form->{addition}) {
   $form->{type}   = "request_quotation";
   # saving the history
   if(!exists $form->{addition}) {
+    $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -1343,6 +1347,7 @@ sub save_and_quotation {
   $form->{type}   = "sales_quotation";
   # saving the history
   if(!exists $form->{addition}) {
   $form->{type}   = "sales_quotation";
   # saving the history
   if(!exists $form->{addition}) {
+    $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -1359,6 +1364,7 @@ sub save_and_order {
     ($form->{db} eq 'customer') ? "sales_order" : "purchase_order";
   # saving the history
   if(!exists $form->{addition}) {
     ($form->{db} eq 'customer') ? "sales_order" : "purchase_order";
   # saving the history
   if(!exists $form->{addition}) {
+    $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -1387,7 +1393,8 @@ sub save_and_close {
   }
   # saving the history
   if(!exists $form->{addition}) {
   }
   # saving the history
   if(!exists $form->{addition}) {
-       $form->{addition} = "SAVED";
+    $form->{snumber} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber});
+    $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
   # /saving the history
        $form->save_history($form->dbconnect(\%myconfig));
   }
   # /saving the history
@@ -1423,6 +1430,7 @@ sub save {
   }
   # saving the history
   if(!exists $form->{addition}) {
   }
   # saving the history
   if(!exists $form->{addition}) {
+    $form->{snumber} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber});
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -1446,6 +1454,7 @@ sub delete {
   $msg .= " deleted!";
   # saving the history
   if(!exists $form->{addition}) {
   $msg .= " deleted!";
   # saving the history
   if(!exists $form->{addition}) {
+    $form->{snumber} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber});
        $form->{addition} = "DELETED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
        $form->{addition} = "DELETED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
index 1ffcc5f02aead4593fe28569464581a20f9d9b54..ccfee8b227af2bbce7d52f7426c81b189f5b4481 100644 (file)
@@ -1544,6 +1544,7 @@ sub yes {
   if (GL->delete_transaction(\%myconfig, \%$form)){
     # saving the history
       if(!exists $form->{addition} && $form->{id} ne "") {
   if (GL->delete_transaction(\%myconfig, \%$form)){
     # saving the history
       if(!exists $form->{addition} && $form->{id} ne "") {
+        $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
            $form->{addition} = "DELETED";
            $form->save_history($form->dbconnect(\%myconfig));
       }
            $form->{addition} = "DELETED";
            $form->save_history($form->dbconnect(\%myconfig));
       }
@@ -1737,6 +1738,7 @@ sub post {
   undef($form->{callback});
   # saving the history
   if(!exists $form->{addition} && $form->{id} ne "") {
   undef($form->{callback});
   # saving the history
   if(!exists $form->{addition} && $form->{id} ne "") {
+    $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
        $form->{addition} = "SAVED";
        $form->{what_done} = $locale->text("Buchungsnummer") . " = " . $form->{id}; 
        $form->save_history($form->dbconnect(\%myconfig));
        $form->{addition} = "SAVED";
        $form->{what_done} = $locale->text("Buchungsnummer") . " = " . $form->{id}; 
        $form->save_history($form->dbconnect(\%myconfig));
@@ -1763,6 +1765,7 @@ sub storno {
   $form->{storno} = 1;
   # saving the history
   if(!exists $form->{addition} && $form->{id} ne "") {
   $form->{storno} = 1;
   # saving the history
   if(!exists $form->{addition} && $form->{id} ne "") {
+    $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
        $form->{addition} = "STORNO";
        $form->save_history($form->dbconnect(\%myconfig));
   }
        $form->{addition} = "STORNO";
        $form->save_history($form->dbconnect(\%myconfig));
   }
index 22263dec8decf3b9019a8b2badfe391ddb06e74c..ada06eeb9a0571dd730c5d5dd0bf1567a9d7ee7c 100644 (file)
@@ -3042,6 +3042,7 @@ sub save {
   }
   # saving the history
   if(!exists $form->{addition}) {
   }
   # saving the history
   if(!exists $form->{addition}) {
+    $form->{snumber} = qq|partnumber_| . $form->{partnumber};
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -3164,6 +3165,7 @@ sub save_as_new {
 
   # saving the history
   if(!exists $form->{addition}) {
 
   # saving the history
   if(!exists $form->{addition}) {
+    $form->{snumber} = qq|partnumber_| . $form->{partnumber};
        $form->{addition} = "SAVED AS NEW";
        $form->save_history($form->dbconnect(\%myconfig));
   }
        $form->{addition} = "SAVED AS NEW";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -3181,6 +3183,7 @@ sub delete {
   $lxdebug->enter_sub();
   # saving the history
   if(!exists $form->{addition}) {
   $lxdebug->enter_sub();
   # saving the history
   if(!exists $form->{addition}) {
+    $form->{snumber} = qq|partnumber_| . $form->{partnumber};
        $form->{addition} = "DELETED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
        $form->{addition} = "DELETED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
index 9518e82c387107437c67d2b0ff9d08117d8c65a9..d85c367c2dcdaf6ec256744ed1108b20d83c17fb 100644 (file)
@@ -1716,6 +1716,7 @@ sub print_form {
       call_sub($display_form);
       # saving the history
          if(!exists $form->{addition}) {
       call_sub($display_form);
       # saving the history
          if(!exists $form->{addition}) {
+        $form->{snumber} = qq|ordnumber_| . $form->{ordnumber}; 
            $form->{addition} = "PRINTED";
            $form->save_history($form->dbconnect(\%myconfig));
       }
            $form->{addition} = "PRINTED";
            $form->save_history($form->dbconnect(\%myconfig));
       }
@@ -1908,6 +1909,7 @@ sub print_form {
 
 # saving the history
   if(!exists $form->{addition}) {
 
 # saving the history
   if(!exists $form->{addition}) {
+    $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
     if($form->{media} =~ /printer/) {
        $form->{addition} = "PRINTED";
     }
     if($form->{media} =~ /printer/) {
        $form->{addition} = "PRINTED";
     }
index ac8b955f228ad4b056fc7dcd9e6cf36d2d0aebba..3f8812e1853d5d894ab1d4a700ecf54c17368f04 100644 (file)
@@ -1041,6 +1041,7 @@ sub post_payment {
        
        if(!exists $form->{addition} && $form->{id} ne "") {
                # saving the history
        
        if(!exists $form->{addition} && $form->{id} ne "") {
                # saving the history
+      $form->{snumbers} = qq|invnumber|;  
                $form->{addition} = "PAYMENT POSTED";
                $form->save_history($form->dbconnect(\%myconfig));
                # /saving the history 
                $form->{addition} = "PAYMENT POSTED";
                $form->save_history($form->dbconnect(\%myconfig));
                # /saving the history 
@@ -1104,7 +1105,8 @@ sub post {
   if (IR->post_invoice(\%myconfig, \%$form)){
        # saving the history
        if(!exists $form->{addition} && $form->{id} ne "") {
   if (IR->post_invoice(\%myconfig, \%$form)){
        # saving the history
        if(!exists $form->{addition} && $form->{id} ne "") {
-               $form->{addition} = "POSTED";
+               $form->{snumbers} = qq|invnumber|;
+      $form->{addition} = "POSTED";
                #$form->{what_done} = $locale->text("Rechnungsnummer") . qq| | . $form->{invnumber};
                $form->save_history($form->dbconnect(\%myconfig));
        }
                #$form->{what_done} = $locale->text("Rechnungsnummer") . qq| | . $form->{invnumber};
                $form->save_history($form->dbconnect(\%myconfig));
        }
@@ -1157,6 +1159,7 @@ sub yes {
   if (IR->delete_invoice(\%myconfig, \%$form)) {
     # saving the history
     if(!exists $form->{addition}) {
   if (IR->delete_invoice(\%myconfig, \%$form)) {
     # saving the history
     if(!exists $form->{addition}) {
+      $form->{snumbers} = qq|invnumber|;
          $form->{addition} = "DELETED";
          $form->save_history($form->dbconnect(\%myconfig));
     }
          $form->{addition} = "DELETED";
          $form->save_history($form->dbconnect(\%myconfig));
     }
index 8d70586d3212d0d38e8b8c4b19bd8e587dbc665c..7da90713e56da2f96b0cc14a28ab5bf6971719ac 100644 (file)
@@ -1435,6 +1435,7 @@ sub post {
   remove_draft() if $form->{remove_draft};
 
   if(!exists $form->{addition}) {
   remove_draft() if $form->{remove_draft};
 
   if(!exists $form->{addition}) {
+    $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
     $form->{addition} = $print_post     ? "PRINTED AND POSTED" :
                         $form->{storno} ? "STORNO"             :
                                           "POSTED";
     $form->{addition} = $print_post     ? "PRINTED AND POSTED" :
                         $form->{storno} ? "STORNO"             :
                                           "POSTED";
@@ -1611,6 +1612,7 @@ sub yes {
   if (IS->delete_invoice(\%myconfig, \%$form, $spool)) {
     # saving the history
        if(!exists $form->{addition}) {
   if (IS->delete_invoice(\%myconfig, \%$form, $spool)) {
     # saving the history
        if(!exists $form->{addition}) {
+    $form->{snumbers} = qq|invnumber_| . $form->{invnumber}; 
          $form->{addition} = "DELETED";
          $form->save_history($form->dbconnect(\%myconfig));
     }
          $form->{addition} = "DELETED";
          $form->save_history($form->dbconnect(\%myconfig));
     }
index 642ee5555ceef032de0fa3d9272c7a5edba0bd20..5a2f9dbe189afb266f65ce46bb29a9e38e88e819 100644 (file)
@@ -1981,6 +1981,7 @@ sub save_and_close {
 
   # saving the history
   if(!exists $form->{addition}) {
 
   # saving the history
   if(!exists $form->{addition}) {
+    $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -2062,6 +2063,7 @@ sub save {
 
   # saving the history
   if(!exists $form->{addition}) {
 
   # saving the history
   if(!exists $form->{addition}) {
+    $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -2133,6 +2135,7 @@ sub yes {
     $form->redirect($msg);
     # saving the history
     if(!exists $form->{addition}) {
     $form->redirect($msg);
     # saving the history
     if(!exists $form->{addition}) {
+      $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
          $form->{addition} = "DELETED";
          $form->save_history($form->dbconnect(\%myconfig));
     }
          $form->{addition} = "DELETED";
          $form->save_history($form->dbconnect(\%myconfig));
     }
index 0a715600e1944e56e5d20978cf598d6e4da758bf..54eba99412984925dfb1075f9c36c3d366cd52ef 100644 (file)
@@ -467,6 +467,7 @@ sub save {
   }
   # saving the history
   if(!exists $form->{addition} && $form->{id} ne "") {
   }
   # saving the history
   if(!exists $form->{addition} && $form->{id} ne "") {
+    $form->{snumber} = qq|projectnumber_| . $form->{projectnumber};
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -491,6 +492,7 @@ sub delete {
   }
   # saving the history
   if(!exists $form->{addition}) {
   }
   # saving the history
   if(!exists $form->{addition}) {
+    $form->{snumber} = qq|projectnumber_| . $form->{projectnumber};
        $form->{addition} = "DELETED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
        $form->{addition} = "DELETED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
index e365c33047c47e1ce0486d60e59da4a0baa6062e..391a9009446d8f2c02eed12162ca8a82d02fadcc 100644 (file)
@@ -2101,6 +2101,7 @@ sub print_form {
   }
   # saving the history
   if(!exists $form->{addition} && $form->{id} ne "") {
   }
   # saving the history
   if(!exists $form->{addition} && $form->{id} ne "") {
+    $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
        $form->{addition} = "PRINTED";
        $form->{what_done} = $form->{type};
        $form->save_history($form->dbconnect(\%myconfig));
        $form->{addition} = "PRINTED";
        $form->{what_done} = $form->{type};
        $form->save_history($form->dbconnect(\%myconfig));