X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fcommon.pl;h=cba9e2244760c2675f4979fad1c42d2a04d15696;hb=96ab68a31bb2e33769aeccea9b7e51b23b65f59a;hp=abe345150a20413e67d488d99329c0fb7aabdde2;hpb=1915baafebf49798f24283bb261e11c739e3e322;p=kivitendo-erp.git diff --git a/bin/mozilla/common.pl b/bin/mozilla/common.pl index abe345150..cba9e2244 100644 --- a/bin/mozilla/common.pl +++ b/bin/mozilla/common.pl @@ -11,10 +11,9 @@ use SL::Common; use SL::DB::Helper::Mappings; -use SL::DBUtils; +use SL::DBUtils qw(do_query); use SL::Form; -use SL::MoreCommon; -use SL::Helper::Flash; +use SL::MoreCommon qw(restore_form save_form); use strict; @@ -343,21 +342,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,11 +384,23 @@ sub show_history { $form->{title} = $locale->text("History"); $form->header(no_layout => 1); + + my $callback = build_std_url(qw(action longdescription trans_id_type input_name)); + 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, + callback => $callback, } ); $dbh->disconnect();