Jeden DATEV-Export in ein eigenes, eindeutig benanntes Verzeichnis schreiben, damit...
[kivitendo-erp.git] / bin / mozilla / common.pl
index aa05aba..1bd92dc 100644 (file)
@@ -139,7 +139,7 @@ sub part_selection_internal {
     }
   }
 
-  map { $form->{$_} = $options{$_} if ($options{$_}) } qw(no_services no_assemblies click_button);
+  map { $form->{$_} = $options{$_} if ($options{$_}) } qw(no_services no_assemblies assemblies click_button);
 
   $parts = Common->retrieve_parts(\%myconfig, $form, $order_by, $order_dir);
 
@@ -515,7 +515,15 @@ sub mark_as_paid_common {
 
   } else {
     my $referer = $ENV{HTTP_REFERER};
-    $referer =~ s/^(.*)action\=.*\&(.*)$/$1action\=mark_as_paid\&mark_as_paid\=1\&id\=$form->{id}\&$2/;
+    if ($referer =~ /action/) {
+      $referer =~ /^(.*)\?action\=[^\&]*(\&.*)$/;
+      $script = $1;
+      $callback = $2;
+    } else {
+      $script = $referer;
+      $callback = "";
+    }
+    $referer = $script . "?action=mark_as_paid&mark_as_paid=1&id=$form->{id}" . $callback;
     $form->header();
     print qq|<body>|;
     print qq|<p><b>|.$locale->text('Mark as paid?').qq|</b></p>|;
@@ -580,28 +588,4 @@ sub cov_selection_internal {
   $lxdebug->leave_sub();
 }
 
-sub cross(&\@\@) {
-  my $op = shift;
-  use vars qw/@A @B/;
-  local (*A, *B) = @_;    # syms for caller's input arrays
-
-  # Localise $a, $b
-  my ($caller_a, $caller_b) = do {
-    my $pkg = caller();
-    no strict 'refs';
-    \*{$pkg.'::a'}, \*{$pkg.'::b'};
-  };
-
-  local(*$caller_a, *$caller_b);
-
-  # This map expression is also the return value.
-  map { my $a_index = $_;
-    map { my $b_index = $_;
-      # assign to $a, $b as refs to caller's array elements
-      (*$caller_a, *$caller_b) = \($A[$a_index], $B[$b_index]);
-      $op->();    # perform the transformation
-    }  0 .. $#B;
-  }  0 .. $#A;
-}
-
 1;