X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fcommon.pl;h=9756f92160da45ddac71718e25ebf5b9fad1ee59;hb=deb4d2dbb676d7d6f69dfe7815d6e0cb09bd4a44;hp=abe345150a20413e67d488d99329c0fb7aabdde2;hpb=593a71851023f5b248fff933d6cc00ff4cfce90d;p=kivitendo-erp.git diff --git a/bin/mozilla/common.pl b/bin/mozilla/common.pl index abe345150..9756f9216 100644 --- a/bin/mozilla/common.pl +++ b/bin/mozilla/common.pl @@ -343,21 +343,6 @@ sub calculate_qty { # ------------------------------------------------------------------------- -sub set_longdescription { - $main::lxdebug->enter_sub(); - - my $form = $main::form; - my $locale = $main::locale; - - $form->{title} = $locale->text("Enter longdescription"); - $form->header(no_layout => 1); - print $form->parse_html_template("generic/set_longdescription"); - - $main::lxdebug->leave_sub(); -} - -# ------------------------------------------------------------------------- - sub H { return $main::locale->quote_special_chars('HTML', $_[0]); } @@ -400,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,