X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FTopQuickSearch%2FGLTransaction.pm;h=53d05ea420e35adae8d4260580b21a38ceff5fff;hb=fc58ee00364ec05d5a5277d8e64fe07374c9db08;hp=f1017397587cbe7f5c2e467b5d719a5b980418b8;hpb=7c782e1fe7c497386c02981af3c3accba2df5780;p=kivitendo-erp.git diff --git a/SL/Controller/TopQuickSearch/GLTransaction.pm b/SL/Controller/TopQuickSearch/GLTransaction.pm index f10173975..53d05ea42 100644 --- a/SL/Controller/TopQuickSearch/GLTransaction.pm +++ b/SL/Controller/TopQuickSearch/GLTransaction.pm @@ -45,16 +45,11 @@ sub query_autocomplete { my $ars = SL::DB::Manager::Invoice->get_all( query => [ @arfilter ], limit => $limit, sort_by => 'transdate DESC', with_objects => [ 'customer' ]); my $aps = SL::DB::Manager::PurchaseInvoice->get_all(query => [ @apfilter ], limit => $limit, sort_by => 'transdate DESC', with_objects => [ 'vendor' ]); - # use the sum of all credit amounts as the "amount" of the gl transaction - foreach my $gl ( @$gls ) { - $gl->{'amount'} = sum map { $_->amount if $_->amount > 0 } @{$gl->transactions}; - }; - my $gldata = [ map( { { - transdate => $_->transdate->to_kivitendo, + transdate => $_->transdate->ymd(''), # only used for sorting label => $_->oneline_summary, value => '', id => 'gl.pl?action=edit&id=' . $_->id, @@ -68,7 +63,7 @@ sub query_autocomplete { map( { { - transdate => $_->transdate->to_kivitendo, + transdate => $_->transdate->ymd(''), label => $_->oneline_summary, value => "", id => ($_->invoice ? "is" : "ar" ) . '.pl?action=edit&id=' . $_->id, @@ -82,7 +77,7 @@ sub query_autocomplete { map( { { - transdate => $_->transdate->to_kivitendo, + transdate => $_->transdate->ymd(''), label => $_->oneline_summary, value => "", id => ($_->invoice ? "ir" : "ap" ) . '.pl?action=edit&id=' . $_->id,