X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fustva.pl;h=eb5fa14bbe734997189559a121b057d3b82d1881;hb=4487bcbffc414424dca499a26074923850779245;hp=9181232f67f0f5d37b81238738c0283ceb725b76;hpb=f7b15d4334848fad1bcd0b569eff5139f9a6ba4d;p=kivitendo-erp.git diff --git a/bin/mozilla/ustva.pl b/bin/mozilla/ustva.pl index 9181232f6..eb5fa14bb 100644 --- a/bin/mozilla/ustva.pl +++ b/bin/mozilla/ustva.pl @@ -41,10 +41,10 @@ require "bin/mozilla/common.pl"; use List::Util qw(first); use SL::DB::Default; -use SL::PE; use SL::RP; use SL::USTVA; use SL::User; +use SL::Locale::String qw(t8); 1; # this is for our long dates @@ -95,6 +95,8 @@ sub report { my $department = ''; my $hide = ''; + + setup_ustva_report_action_bar(); $form->header; # Einlesen der Finanzamtdaten @@ -102,12 +104,6 @@ sub report { $ustva->get_config(); $ustva->get_finanzamt(); - my $geierlein_enabled = 0; - my $geierlein_path = $::lx_office_conf{paths}{geierlein_path}; - - if ( $geierlein_path && length($geierlein_path) > 0 ) {$geierlein_enabled=1;} - -# $::lxdebug->message(LXDebug->DEBUG2,"geierlein_enabled=".$geierlein_enabled." path=".$geierlein_path); # Hier Einlesen der user-config # steuernummer entfernt für prerelease my @a = qw( @@ -239,16 +235,12 @@ sub report { checkbox_kz_29 => $checkbox_kz_29, checkbox_kz_26 => $checkbox_kz_26, tax_office_banks => \@tax_office_banks_ref, - geierlein_enabled => $geierlein_enabled, - geierlein_path => $geierlein_path, select_options => &show_options, }; print($form->parse_html_template('ustva/report', $template_ref)); - - $::lxdebug->leave_sub(); } @@ -782,6 +774,8 @@ $::form->{title} = $::locale->text('Tax Office Preferences'); # edit all taxauthority prefs + setup_ustva_config_step1_action_bar(); + $::form->header; my $ustva = USTVA->new(); @@ -808,8 +802,6 @@ $::form->{title} = $::locale->text('Tax Office Preferences'); my %_hidden_local_variables = ( 'saved' => $::locale->text('Check Details'), - 'nextsub' => 'config_step2', - 'warnung' => '0', ); foreach my $variable (keys %_hidden_local_variables) { @@ -853,6 +845,8 @@ sub config_step2 { $::auth->assert('advance_turnover_tax_return'); + setup_ustva_config_step2_action_bar(); + $form->header(); my $fa_land_nr = ''; @@ -931,7 +925,6 @@ sub config_step2 { my %_hidden_local_variables = ( 'fa_land_nr' => $fa_land_nr, 'fa_bufa_nr' => $fa_bufa_nr, - 'warnung' => 0, 'taxnumber' => $stnr, 'lastsub' => 'config_step1', 'nextsub' => 'save', @@ -945,11 +938,11 @@ sub config_step2 { my @_hidden_form_variables = qw( fa_dauerfrist fa_steuerberater_city fa_steuerberater_name - fa_steuerberater_street fa_steuerberater_tel + fa_steuerberater_street fa_steuerberater_tel fa_voranmeld fa_dauerfrist accounting_method type - saved callback + saved ); foreach my $variable (@_hidden_form_variables) { @@ -960,7 +953,6 @@ sub config_step2 { my $template_ref = { input_steuernummer => $input_steuernummer, readonly => '', #q|disabled="disabled"|, - callback => $form->{callback}, COA_Germany => $form->{COA_Germany}, hidden_variables => $_hidden_variables_ref, }; @@ -1055,3 +1047,49 @@ sub back { call_sub($::form->{"lastsub"}); $::lxdebug->leave_sub(); } + +sub setup_ustva_report_action_bar { + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + action => [ + t8('Show'), + submit => [ '#form_do', { action => 'generate_ustva' } ], + accesskey => 'enter', + ], + action => [ + t8('Geierlein'), + call => [ 'sendGeierlein' ], + disabled => !length($::lx_office_conf{paths}{geierlein_path} // '') ? t8('The Geierlein path has not been set in the configuration.') : undef, + tooltip => t8('Transfer data to Geierlein ELSTER application'), + ], + ); + } +} + +sub setup_ustva_config_step1_action_bar { + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + action => [ + t8('Continue'), + submit => [ '#form', { action => 'config_step2' } ], + accesskey => 'enter', + ], + ); + } +} + +sub setup_ustva_config_step2_action_bar { + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + action => [ + t8('Save'), + submit => [ '#form', { action => 'save' } ], + accesskey => 'enter', + ], + action => [ + t8('Back'), + call => [ 'kivi.history_back' ], + ], + ); + } +}