X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fcommon.pl;h=9756f92160da45ddac71718e25ebf5b9fad1ee59;hb=deb4d2dbb676d7d6f69dfe7815d6e0cb09bd4a44;hp=c51b13f7ab8dd3ebc4952f1fbb3002d0075ba555;hpb=0448fc15357e20ffb74e08f2a8459820494a6eef;p=kivitendo-erp.git diff --git a/bin/mozilla/common.pl b/bin/mozilla/common.pl index c51b13f7a..9756f9216 100644 --- a/bin/mozilla/common.pl +++ b/bin/mozilla/common.pl @@ -385,8 +385,18 @@ sub show_history { $form->{title} = $locale->text("History"); $form->header(no_layout => 1); + + my $restriction; + if ( $form->{trans_id_type} eq 'glid' ) { + $restriction = "AND ( snumbers LIKE 'invnumber%' OR what_done LIKE '%Buchungsnummer%' OR snumbers LIKE 'gltransaction%' ) "; + } elsif ( $form->{trans_id_type} eq 'id' ) { + $restriction = " AND ( snumbers NOT LIKE 'invnumber_%' AND snumbers NOT LIKE 'gltransaction%' AND (what_done NOT LIKE '%Buchungsnummer%' OR what_done IS null))"; + } else { + $restriction = ''; + }; + print $form->parse_html_template( "common/show_history", { - "DATEN" => $form->get_history($dbh,$form->{input_name},"",$form->{order}), + "DATEN" => $form->get_history($dbh,$form->{input_name},$restriction,$form->{order}), "SUCCESS" => ($form->get_history($dbh,$form->{input_name}) ne "0"), uc($sort) => 1, uc($sort)."BY" => $sortby,