X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fgl.pl;h=719f2220991dd32a42497e73f401b31943ad17ec;hb=8dd087bfc7c8947308b170c666682f6dec1ea30d;hp=ce1d1a9dd440229232e21d7b425d6b0490158c8e;hpb=2b44867fc2d4e3c061c126890cc90fcaa84b6baa;p=kivitendo-erp.git diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index ce1d1a9dd..719f22209 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -220,13 +220,8 @@ sub search { ); $::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|')| - . qq|;setupPoints('|. $::myconfig{numberformat} . qq|', '| . $::locale->text("wrongformat") . qq|')|; - $::form->header; print $::form->parse_html_template('gl/search', { - onload => $onload, department_label => sub { ("$_[0]{description}--$_[0]{id}")x2 }, employee_label => sub { "$_[0]{id}--$_[0]{name}" }, }); @@ -466,7 +461,7 @@ sub generate_report { my $row_set = [ $row ]; - if (($form->{l_subtotal} eq 'Y') + if ( ($form->{l_subtotal} eq 'Y' && !$form->{report_generator_csv_options_for_import} ) && (($idx == (scalar @{ $form->{GL} } - 1)) || ($ref->{ $form->{sort} } ne $form->{GL}->[$idx + 1]->{ $form->{sort} }))) { push @{ $row_set }, create_subtotal_row(\%subtotals, \@columns, \%column_alignment, [ qw(debit credit) ], 'listsubtotal'); @@ -477,8 +472,6 @@ sub generate_report { $idx++; } - $report->add_separator(); - # = 0 for balanced ledger my $balanced_ledger = $totals{debit} + $totals{debit_tax} - $totals{credit} - $totals{credit_tax}; @@ -497,7 +490,10 @@ sub generate_report { $row->{balance}->{data} = $data; - $report->add_data($row); + if ( !$form->{report_generator_csv_options_for_import} ) { + $report->add_separator(); + $report->add_data($row); + } my $raw_bottom_info_text; @@ -878,10 +874,10 @@ sub form_header { s/option>\Q$::form->{department}\E/option selected>$::form->{department}/; if ($init) { - $::form->{fokus} = "gl.reference"; + $::request->{layout}->focus("#reference"); $::form->{taxincluded} = "1"; } else { - $::form->{fokus} = qq|gl.accno_$::form->{rowcount}|; + $::request->{layout}->focus("#accno_$::form->{rowcount}"); } $::form->{previous_id} ||= "--"; @@ -907,7 +903,9 @@ sub form_footer { $follow_ups_due = sum map { $_->{due} * 1 } @{ $follow_ups || [] }; } - my $radieren = $::form->current_date(\%::myconfig) eq $::form->{gldate}; + my $radieren = ($::instance_conf->get_gl_changeable == 2) + ? ($::form->current_date(\%::myconfig) eq $::form->{gldate}) + : ($::instance_conf->get_gl_changeable == 1); print $::form->parse_html_template('gl/form_footer', { radieren => $radieren, @@ -927,8 +925,6 @@ sub delete { $form->header; print qq| - -
|;