]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DO.pm
Fehlende Localesläufe aus 4091 und 4093.
[mfinanz.git] / SL / DO.pm
index 28eb85436718d973686be97d99944b3b018e31ec..50905ec014f2b7838e7b34d79ba1dfee8953e07a 100644 (file)
--- a/SL/DO.pm
+++ b/SL/DO.pm
@@ -896,10 +896,10 @@ sub get_item_availability {
        LEFT JOIN warehouse w ON (i.warehouse_id = w.id)
        LEFT JOIN bin b       ON (i.bin_id       = b.id)
        WHERE (i.parts_id IN (| . join(', ', ('?') x scalar(@parts_ids)) . qq|))
-         AND qty > 0
        GROUP BY i.warehouse_id, i.bin_id, i.chargenumber, i.parts_id, w.description, b.description
-       ORDER BY LOWER(w.description), LOWER(b.description), LOWER(i.chargenumber)|;
-
+       HAVING SUM(qty) > 0
+       ORDER BY LOWER(w.description), LOWER(b.description), LOWER(i.chargenumber)
+|;
   my $contents = selectall_hashref_query($form, $form->get_standard_dbh($myconfig), $query, @parts_ids);
 
   $main::lxdebug->leave_sub();