X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fustva.pl;h=eb5fa14bbe734997189559a121b057d3b82d1881;hb=7070f3a0b8267b58ee39b7b0a524a97951ae64a9;hp=4de6f71db8b241f15a27619e4ec35dfcc346a108;hpb=19fb04d1cfad224a0f0c4c3b88494b4605fc6d4e;p=kivitendo-erp.git diff --git a/bin/mozilla/ustva.pl b/bin/mozilla/ustva.pl index 4de6f71db..eb5fa14bb 100644 --- a/bin/mozilla/ustva.pl +++ b/bin/mozilla/ustva.pl @@ -44,6 +44,7 @@ use SL::DB::Default; use SL::RP; use SL::USTVA; use SL::User; +use SL::Locale::String qw(t8); 1; # this is for our long dates @@ -94,6 +95,8 @@ sub report { my $department = ''; my $hide = ''; + + setup_ustva_report_action_bar(); $form->header; # Einlesen der Finanzamtdaten @@ -101,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( @@ -238,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(); } @@ -781,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(); @@ -807,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) { @@ -852,6 +845,8 @@ sub config_step2 { $::auth->assert('advance_turnover_tax_return'); + setup_ustva_config_step2_action_bar(); + $form->header(); my $fa_land_nr = ''; @@ -930,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', @@ -944,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) { @@ -959,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, }; @@ -1054,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' ], + ], + ); + } +}