X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fgl.pl;h=ce1d1a9dd440229232e21d7b425d6b0490158c8e;hb=4c2604b36cd37edf2683420c09a117298fe300ea;hp=f4f87cc8f23142c731edcfa2bef7c45a63917093;hpb=5edee2313bde03fb9b825905a36647569b504199;p=kivitendo-erp.git diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index f4f87cc8f..ce1d1a9dd 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -217,8 +217,8 @@ sub search { $::form->all_departments(\%::myconfig); $::form->get_lists( projects => { key => "ALL_PROJECTS", all => 1 }, - employees => "ALL_EMPLOYEES", ); + $::form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]); my $onload = "focus()" . qq|;setupDateFormat('|. $::myconfig{dateformat} . qq|', '| . $::locale->text("Falsches Datumsformat!") . qq|')| @@ -849,385 +849,73 @@ sub display_rows { } sub form_header { - my ($init) = @_; - $main::lxdebug->enter_sub(); - - $main::auth->assert('general_ledger'); + $::lxdebug->enter_sub; + $::auth->assert('general_ledger'); - my $form = $main::form; - my %myconfig = %main::myconfig; - my $locale = $main::locale; + my ($init) = @_; - my @old_project_ids = (); - map({ push(@old_project_ids, $form->{"project_id_$_"}) - if ($form->{"project_id_$_"}); } (1..$form->{"rowcount"})); + my @old_project_ids = grep { $_ } map{ $::form->{"project_id_$_"} } 1..$::form->{rowcount}; - $form->get_lists("projects" => { "key" => "ALL_PROJECTS", + $::form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 0, "old_id" => \@old_project_ids }, "charts" => { "key" => "ALL_CHARTS", - "transdate" => $form->{transdate} }, + "transdate" => $::form->{transdate} }, "taxcharts" => "ALL_TAXCHARTS"); - GL->get_chart_balances('charts' => $form->{ALL_CHARTS}); - - my $title = $form->{title}; - $form->{title} = $locale->text("$title General Ledger Transaction"); - my $readonly = ($form->{id}) ? "readonly" : ""; - - my $show_details_checked = $form->{show_details} ? "checked" : ''; - my $ob_transaction_checked = $form->{ob_transaction} ? "checked" : ''; - my $cb_transaction_checked = $form->{cb_transaction} ? "checked" : ''; + GL->get_chart_balances('charts' => $::form->{ALL_CHARTS}); + my $title = $::form->{title}; + $::form->{title} = $::locale->text("$title General Ledger Transaction"); # $locale->text('Add General Ledger Transaction') # $locale->text('Edit General Ledger Transaction') - map { $form->{$_} =~ s/\"/"/g } - qw(reference description chart taxchart); - - $form->{javascript} = qq| - - -|; - - $form->{selectdepartment} =~ s/ selected//; - $form->{selectdepartment} =~ - s/option>\Q$form->{department}\E/option selected>$form->{department}/; + map { $::form->{$_} =~ s/\"/"/g } + qw(chart taxchart); - my $description; - if ((my $rows = $form->numtextrows($form->{description}, 50)) > 1) { - $description = - qq||; - } else { - $description = - qq||; - } - - my $taxincluded = ($form->{taxincluded}) ? "checked" : ""; - - if ($init) { - $taxincluded = "checked"; - } + $::form->{selectdepartment} =~ s/ selected//; + $::form->{selectdepartment} =~ + s/option>\Q$::form->{department}\E/option selected>$::form->{department}/; - my $department; - $department = qq| -