X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FIC.pm;h=50c1172b0a8fcb49acdc9f70ff421668660460d7;hb=63b3e9b39fe288260a3d6103db86359b3339f21a;hp=ffc734bd819b13411157a0aa93161fc23328f571;hpb=bc71c253714824c3f1bd5749958302dce5555762;p=kivitendo-erp.git diff --git a/SL/IC.pm b/SL/IC.pm index ffc734bd8..50c1172b0 100644 --- a/SL/IC.pm +++ b/SL/IC.pm @@ -41,6 +41,8 @@ use YAML; use SL::CVar; use SL::DBUtils; +use strict; + sub get_part { $main::lxdebug->enter_sub(); @@ -935,7 +937,9 @@ sub all_parts { #my $order_clause = " ORDER BY $form->{sort} $sort_order"; - my $limit_clause = " LIMIT 100" if $form->{top100}; + my $limit_clause; + $limit_clause = " LIMIT 100" if $form->{top100}; + $limit_clause = " LIMIT " . $form->{limit} * 1 if $form->{limit} * 1; #=== joins and complicated filters ========# @@ -1058,6 +1062,8 @@ sub all_parts { } $main::lxdebug->leave_sub(); + + return wantarray ? @{ $form->{parts} } : $form->{parts}; } sub _create_filter_for_priceupdate {