$form->{snumber} durch $form->{snumbers} ersetzt, da dies eigentlich so vorgesehen...
authorThomas Kasulke <t.kasulke@linet-services.de>
Mon, 23 Apr 2007 13:23:20 +0000 (13:23 +0000)
committerThomas Kasulke <t.kasulke@linet-services.de>
Mon, 23 Apr 2007 13:23:20 +0000 (13:23 +0000)
bin/mozilla/am.pl
bin/mozilla/ap.pl
bin/mozilla/ar.pl
bin/mozilla/ct.pl
bin/mozilla/dn.pl
bin/mozilla/gl.pl
bin/mozilla/ic.pl
bin/mozilla/io.pl
bin/mozilla/oe.pl
bin/mozilla/pe.pl
bin/mozilla/rp.pl

index b01f5f6..38eedb0 100644 (file)
@@ -3154,14 +3154,14 @@ sub show_am_history {
   $sth->execute() || $form->dberror($query);  
        $form->{title} = $locale->text("History Search");
        $form->header();
-       my @daten;
+       my $daten = "";
        while(my $hash_ref = $sth->fetchrow_hashref()){
-    push(@daten, $form->get_history($dbh,$hash_ref->{id},$restriction));
+    $daten =  $form->get_history($dbh,$hash_ref->{id},$restriction);
   }
        $dbh->disconnect();
        print $form->parse_html_template("/common/show_history", 
-    {"DATEN" => @daten,
-     "SUCCESS" => (length(@daten) > 0),
+    {"DATEN" => $daten,
+     "SUCCESS" => ($daten != 0 ? 1 : 0),
      "NONEWWINDOW" => 1
     });
        $lxdebug->leave_sub();
index 43a025f..22fc65c 100644 (file)
@@ -1075,7 +1075,7 @@ sub post {
   if (AP->post_transaction(\%myconfig, \%$form)) {
     # saving the history
     if(!exists $form->{addition} && $form->{id} ne "") {
-      $form->{snumber} = qq|invnumber_| . $form->{invnumber};
+      $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
       $form->{addition} = "POSTED";
       $form->save_history($form->dbconnect(\%myconfig));
     }
@@ -1094,7 +1094,7 @@ sub post_as_new {
   $form->{postasnew} = 1;
   # saving the history
   if(!exists $form->{addition} && $form->{id} ne "") {
-    $form->{snumber} = qq|invnumber_| . $form->{invnumber};
+    $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
        $form->{addition} = "POSTED AS NEW";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -1159,7 +1159,7 @@ sub yes {
   if (AP->delete_transaction(\%myconfig, \%$form, $spool)) {
     # saving the history
     if(!exists $form->{addition}) {
-      $form->{snumber} = qq|invnumber_| . $form->{invnumber};
+      $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
          $form->{addition} = "DELETED";
       $form->save_history($form->dbconnect(\%myconfig));
     }
index 05c541b..109ecb5 100644 (file)
@@ -79,7 +79,7 @@ sub add {
 
   # saving the history
   if(!exists $form->{addition} && ($form->{id} ne "")) {
-    $form->{snumber} = qq|invnumber_| . $form->{invnumber};
+    $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
        $form->{addition} = "ADDED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -1093,7 +1093,7 @@ sub post {
   if (AR->post_transaction(\%myconfig, \%$form)) {
     # saving the history
     if(!exists $form->{addition} && $form->{id} ne "") {
-      $form->{snumber} = qq|invnumber_| . $form->{invnumber};
+      $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
          $form->{addition} = "POSTED";
          $form->save_history($form->dbconnect(\%myconfig));
     }
@@ -1112,7 +1112,7 @@ sub post_as_new {
   $form->{postasnew} = 1;
   # saving the history
   if(!exists $form->{addition} && $form->{id} ne "") {
-    $form->{snumber} = qq|invnumber_| . $form->{invnumber};
+    $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
        $form->{addition} = "POSTED AS NEW";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -1177,7 +1177,7 @@ sub yes {
   if (AR->delete_transaction(\%myconfig, \%$form, $spool)) {
     # saving the history
     if(!exists $form->{addition}) {
-      $form->{snumber} = qq|invnumber_| . $form->{invnumber};
+      $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
          $form->{addition} = "DELETED";
          $form->save_history($form->dbconnect(\%myconfig));
     }
index fec4e35..706860a 100644 (file)
@@ -1284,7 +1284,7 @@ sub save_and_ap_transaction {
   $form->{script} = "ap.pl";
   # saving the history
   if(!exists $form->{addition}) {
-    $form->{snumber} = qq|invnumber_| . $form->{invnumber};
+    $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -1299,7 +1299,7 @@ sub save_and_ar_transaction {
   $form->{script} = "ar.pl";
   # saving the history
   if(!exists $form->{addition}) {
-    $form->{snumber} = qq|invnumber_| . $form->{invnumber};
+    $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -1315,7 +1315,7 @@ sub save_and_invoice {
   $form->{type} = "invoice";
   # saving the history
   if(!exists $form->{addition}) {
-    $form->{snumber} = qq|invnumber_| . $form->{invnumber};
+    $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -1331,7 +1331,7 @@ sub save_and_rfq {
   $form->{type}   = "request_quotation";
   # saving the history
   if(!exists $form->{addition}) {
-    $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
+    $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -1347,7 +1347,7 @@ sub save_and_quotation {
   $form->{type}   = "sales_quotation";
   # saving the history
   if(!exists $form->{addition}) {
-    $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
+    $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -1364,7 +1364,7 @@ sub save_and_order {
     ($form->{db} eq 'customer') ? "sales_order" : "purchase_order";
   # saving the history
   if(!exists $form->{addition}) {
-    $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
+    $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -1393,7 +1393,7 @@ sub save_and_close {
   }
   # saving the history
   if(!exists $form->{addition}) {
-    $form->{snumber} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber});
+    $form->{snumbers} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber});
     $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -1430,7 +1430,7 @@ sub save {
   }
   # saving the history
   if(!exists $form->{addition}) {
-    $form->{snumber} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber});
+    $form->{snumbers} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber});
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -1454,7 +1454,7 @@ sub delete {
   $msg .= " deleted!";
   # saving the history
   if(!exists $form->{addition}) {
-    $form->{snumber} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber});
+    $form->{snumbers} = ($form->{"db"} eq "customer" ? qq|customernumber_| . $form->{customernumber} : qq|vendornumber_| . $form->{vendornumber});
        $form->{addition} = "DELETED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
index 725aed9..88b2cb3 100644 (file)
@@ -556,7 +556,8 @@ sub save {
   DN->save_config(\%myconfig, \%$form);
   # saving the history
   if(!exists $form->{addition} && $form->{id} ne "") {
-       $form->{addition} = "SAVED FOR DUNNING";
+       $form->{snumbers} = qq|dunning_id_| . $form->{"dunning_id"};
+    $form->{addition} = "SAVED FOR DUNNING";
        $form->save_history($form->dbconnect(\%myconfig));
   }
   # /saving the history 
@@ -610,7 +611,8 @@ sub save_dunning {
   }
   # saving the history
   if(!exists $form->{addition} && $form->{id} ne "") {
-       $form->{addition} = "DUNNING STARTED";
+       $form->{snumbers} = qq|dunning_id_| . $form->{"dunning_id"};
+    $form->{addition} = "DUNNING STARTED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
   # /saving the history 
index ccfee8b..e3a7a47 100644 (file)
@@ -1544,7 +1544,7 @@ sub yes {
   if (GL->delete_transaction(\%myconfig, \%$form)){
     # saving the history
       if(!exists $form->{addition} && $form->{id} ne "") {
-        $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
+        $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
            $form->{addition} = "DELETED";
            $form->save_history($form->dbconnect(\%myconfig));
       }
@@ -1738,7 +1738,7 @@ sub post {
   undef($form->{callback});
   # saving the history
   if(!exists $form->{addition} && $form->{id} ne "") {
-    $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
+    $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
        $form->{addition} = "SAVED";
        $form->{what_done} = $locale->text("Buchungsnummer") . " = " . $form->{id}; 
        $form->save_history($form->dbconnect(\%myconfig));
@@ -1765,7 +1765,7 @@ sub storno {
   $form->{storno} = 1;
   # saving the history
   if(!exists $form->{addition} && $form->{id} ne "") {
-    $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
+    $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
        $form->{addition} = "STORNO";
        $form->save_history($form->dbconnect(\%myconfig));
   }
index ada06ee..f3b5d84 100644 (file)
@@ -3042,7 +3042,7 @@ sub save {
   }
   # saving the history
   if(!exists $form->{addition}) {
-    $form->{snumber} = qq|partnumber_| . $form->{partnumber};
+    $form->{snumbers} = qq|partnumber_| . $form->{partnumber};
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -3165,7 +3165,7 @@ sub save_as_new {
 
   # saving the history
   if(!exists $form->{addition}) {
-    $form->{snumber} = qq|partnumber_| . $form->{partnumber};
+    $form->{snumbers} = qq|partnumber_| . $form->{partnumber};
        $form->{addition} = "SAVED AS NEW";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -3183,7 +3183,7 @@ sub delete {
   $lxdebug->enter_sub();
   # saving the history
   if(!exists $form->{addition}) {
-    $form->{snumber} = qq|partnumber_| . $form->{partnumber};
+    $form->{snumbers} = qq|partnumber_| . $form->{partnumber};
        $form->{addition} = "DELETED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
index d85c367..01f290b 100644 (file)
@@ -1716,7 +1716,7 @@ sub print_form {
       call_sub($display_form);
       # saving the history
          if(!exists $form->{addition}) {
-        $form->{snumber} = qq|ordnumber_| . $form->{ordnumber}; 
+        $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber}; 
            $form->{addition} = "PRINTED";
            $form->save_history($form->dbconnect(\%myconfig));
       }
@@ -1909,7 +1909,7 @@ sub print_form {
 
 # saving the history
   if(!exists $form->{addition}) {
-    $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
+    $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
     if($form->{media} =~ /printer/) {
        $form->{addition} = "PRINTED";
     }
index 5a2f9db..8058585 100644 (file)
@@ -1981,7 +1981,7 @@ sub save_and_close {
 
   # saving the history
   if(!exists $form->{addition}) {
-    $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
+    $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -2063,7 +2063,7 @@ sub save {
 
   # saving the history
   if(!exists $form->{addition}) {
-    $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
+    $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -2135,7 +2135,7 @@ sub yes {
     $form->redirect($msg);
     # saving the history
     if(!exists $form->{addition}) {
-      $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
+      $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
          $form->{addition} = "DELETED";
          $form->save_history($form->dbconnect(\%myconfig));
     }
index 54eba99..6bcb0f5 100644 (file)
@@ -467,7 +467,7 @@ sub save {
   }
   # saving the history
   if(!exists $form->{addition} && $form->{id} ne "") {
-    $form->{snumber} = qq|projectnumber_| . $form->{projectnumber};
+    $form->{snumbers} = qq|projectnumber_| . $form->{projectnumber};
        $form->{addition} = "SAVED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
@@ -492,7 +492,7 @@ sub delete {
   }
   # saving the history
   if(!exists $form->{addition}) {
-    $form->{snumber} = qq|projectnumber_| . $form->{projectnumber};
+    $form->{snumbers} = qq|projectnumber_| . $form->{projectnumber};
        $form->{addition} = "DELETED";
        $form->save_history($form->dbconnect(\%myconfig));
   }
index 391a900..c311784 100644 (file)
@@ -2101,7 +2101,7 @@ sub print_form {
   }
   # saving the history
   if(!exists $form->{addition} && $form->{id} ne "") {
-    $form->{snumber} = qq|ordnumber_| . $form->{ordnumber};
+    $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber};
        $form->{addition} = "PRINTED";
        $form->{what_done} = $form->{type};
        $form->save_history($form->dbconnect(\%myconfig));