X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FTopQuickSearch%2FGLTransaction.pm;h=ebdcee895b061e111d36c13d869dd9fd00e5ca1b;hb=036d1ca4bd5e9574118a7041e58b64fda4bc003d;hp=dab0a6284c287bcad5995b5245cdf0d85b4b5c13;hpb=5b981bb6a5c48dbec2297af61893c0add678669b;p=kivitendo-erp.git diff --git a/SL/Controller/TopQuickSearch/GLTransaction.pm b/SL/Controller/TopQuickSearch/GLTransaction.pm index dab0a6284..ebdcee895 100644 --- a/SL/Controller/TopQuickSearch/GLTransaction.pm +++ b/SL/Controller/TopQuickSearch/GLTransaction.pm @@ -45,11 +45,6 @@ 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( { @@ -57,7 +52,7 @@ sub query_autocomplete { transdate => $_->transdate->to_kivitendo, label => $_->oneline_summary, value => '', - url => 'gl.pl?action=edit&id=' . $_->id, + id => 'gl.pl?action=edit&id=' . $_->id, } } @{$gls} @@ -71,7 +66,7 @@ sub query_autocomplete { transdate => $_->transdate->to_kivitendo, label => $_->oneline_summary, value => "", - url => ($_->invoice ? "is" : "ar" ) . '.pl?action=edit&id=' . $_->id, + id => ($_->invoice ? "is" : "ar" ) . '.pl?action=edit&id=' . $_->id, } } @{$ars}