X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Frc.pl;h=f0ef98e732687c5a062f376cd0b60600869abf3a;hb=08e48f66590f580cbe2c8e3df76883d88b4c0fef;hp=864357dfad6f4f8a648ade34e646dcdccc55be4f;hpb=1b9a64fa292f375c82b4af788d0606354bc4e8ff;p=kivitendo-erp.git diff --git a/bin/mozilla/rc.pl b/bin/mozilla/rc.pl index 864357dfa..f0ef98e73 100644 --- a/bin/mozilla/rc.pl +++ b/bin/mozilla/rc.pl @@ -33,6 +33,7 @@ #====================================================================== use SL::RC; +use SL::Locale::String qw(t8); require "bin/mozilla/common.pl"; @@ -48,6 +49,8 @@ sub reconciliation { RC->paymentaccounts(\%::myconfig, $::form); + setup_rc_reconciliation_action_bar(); + $::form->header; print $::form->parse_html_template('rc/step1', { selection_sub => sub { ("$_[0]{accno}--$_[0]{description}")x2 }, @@ -56,8 +59,6 @@ sub reconciliation { $::lxdebug->leave_sub; } -sub continue { call_sub($::form->{"nextsub"}); } - sub get_payments { $::lxdebug->enter_sub; $::auth->assert('cash'); @@ -103,6 +104,8 @@ sub display_form { my $statementbalance = $::form->parse_amount(\%::myconfig, $::form->{statementbalance}); my $difference = $statementbalance - $clearedbalance - $cleared; + setup_rc_display_form_action_bar(); + $::form->header; print $::form->parse_html_template('rc/step2', { is_asset => $::form->{category} eq 'A', @@ -146,7 +149,7 @@ sub update { $::lxdebug->leave_sub; } -sub done { +sub reconcile { $::lxdebug->enter_sub; $::auth->assert('cash'); @@ -160,3 +163,34 @@ sub done { $::lxdebug->leave_sub; } +sub setup_rc_reconciliation_action_bar { + my %params = @_; + + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + action => [ + t8('Show'), + submit => [ '#form', { action => "get_payments" } ], + accesskey => 'enter', + ], + ); + } +} + +sub setup_rc_display_form_action_bar { + my %params = @_; + + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + action => [ + t8('Update'), + submit => [ '#form', { action => "update" } ], + accesskey => 'enter', + ], + action => [ + t8('Reconcile'), + submit => [ '#form', { action => "reconcile" } ], + ], + ); + } +}