X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FReconciliation.pm;h=c2891315fae64b8405361992af35172db509f089;hb=9508e215c78bc172721e14d41d21858abb23672e;hp=1236c44657b292b4a6e3189d2cc378bd5a3fe398;hpb=f42f3f8a997014b0b832b30315f5badbb5b107b4;p=kivitendo-erp.git diff --git a/SL/Controller/Reconciliation.pm b/SL/Controller/Reconciliation.pm index 1236c4465..c2891315f 100644 --- a/SL/Controller/Reconciliation.pm +++ b/SL/Controller/Reconciliation.pm @@ -29,17 +29,22 @@ __PACKAGE__->run_before('_bank_account'); sub action_search { my ($self) = @_; + $self->setup_search_action_bar; $self->render('reconciliation/search'); } sub action_reconciliation { my ($self) = @_; + $self->_get_proposals; + $self->_get_linked_transactions; $self->_get_balances; + $self->setup_reconciliation_action_bar; $self->render('reconciliation/form', + ui_tab => scalar(@{$self->{PROPOSALS}}) > 0?1:0, title => t8('Reconciliation')); } @@ -83,7 +88,7 @@ sub action_update_reconciliation_table { my $output = $self->render('reconciliation/assigning_table', { output => 0 }, bt_sum => $::form->format_amount(\%::myconfig, $self->{bt_sum}, 2), bb_sum => $::form->format_amount(\%::myconfig, -1 * $self->{bb_sum}, 2), - show_button => !@errors + errors => @errors, ); my %result = ( html => $output ); @@ -617,4 +622,32 @@ sub init_BANK_ACCOUNTS { SL::DB::Manager::BankAccount->get_all_sorted( query => [ obsolete => 0 ] ); } +sub setup_search_action_bar { + my ($self, %params) = @_; + + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + action => [ + t8('Show'), + submit => [ '#search_form', { action => 'Reconciliation/reconciliation' } ], + accesskey => 'enter', + ], + ); + } +} + +sub setup_reconciliation_action_bar { + my ($self, %params) = @_; + + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + action => [ + t8('Filter'), + call => [ 'filter_table' ], + accesskey => 'enter', + ], + ); + } +} + 1;