X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FReconciliation.pm;h=c9d415f1e62184cf8b1dbb59f0aa693decd82d12;hb=2bc33284e526869f0de7aa0ddd5cdb141432f4e3;hp=daf8f075e003181981e9ec0566cf0afdb833ee2f;hpb=4247547d2a925ddad7006cae89e5f9f1fda7d469;p=kivitendo-erp.git diff --git a/SL/Controller/Reconciliation.pm b/SL/Controller/Reconciliation.pm index daf8f075e..c9d415f1e 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')); } @@ -406,8 +411,8 @@ sub _filter_to_where { } if ( $self->{bank_account}->reconciliation_starting_date ) { - push @bt_where, (transdate => { gt => $self->{bank_account}->reconciliation_starting_date }); - push @bb_where, (transdate => { gt => $self->{bank_account}->reconciliation_starting_date }); + push @bt_where, (transdate => { ge => $self->{bank_account}->reconciliation_starting_date }); + push @bb_where, (transdate => { ge => $self->{bank_account}->reconciliation_starting_date }); } # don't try to reconcile opening and closing balance transactions @@ -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;