From ae1a87d3a850afd7865e453d9fe900581a42e5ff Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 9 Jan 2012 18:28:48 +0100 Subject: [PATCH] Bearbeiten-Link in Mahnungsliste richtig auf Rechnung/Debitorenbuchung setzen MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fix für Bug 1728. --- bin/mozilla/dn.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/mozilla/dn.pl b/bin/mozilla/dn.pl index 132286fbd..6c3492b98 100644 --- a/bin/mozilla/dn.pl +++ b/bin/mozilla/dn.pl @@ -368,7 +368,7 @@ sub show_dunning { duedate amount dunning_date dunning_duedate fee interest salesman)); $report->set_sort_indicator($form->{sort}, $form->{sortdir}); - my $edit_url = build_std_url('script=is.pl', 'action=edit', 'callback') . '&id='; + my $edit_url = sub { build_std_url('script=' . ($_[0]->{invoice} ? 'is' : 'ar') . '.pl', 'action=edit', 'callback') . '&id=' . $::form->escape($_[0]->{id}) }; my $print_url = build_std_url('action=print_dunning', 'format=pdf', 'media=screen') . '&dunning_id='; my $sort_url = build_std_url('action=show_dunning', grep { $form->{$_} } @filter_field_list); @@ -403,8 +403,9 @@ sub show_dunning { 'align' => $alignment{$column}, - 'link' => ($column eq 'invnumber' ? $edit_url . E($ref->{id}) : - $column eq 'dunning_description' ? $print_url . E($ref->{dunning_id}) : ''), + 'link' => ( $column eq 'invnumber' ? $edit_url->($ref) + : $column eq 'dunning_description' ? $print_url . E($ref->{dunning_id}) + : ''), }; } -- 2.20.1