Revision 4e07e589
Von Moritz Bunkus vor mehr als 15 Jahren hinzugefügt
SL/DO.pm | ||
---|---|---|
895 | 895 |
FROM inventory i |
896 | 896 |
LEFT JOIN warehouse w ON (i.warehouse_id = w.id) |
897 | 897 |
LEFT JOIN bin b ON (i.bin_id = b.id) |
898 |
WHERE (i.parts_id IN (| . join(', ', ('?') x scalar(@parts_ids)) . qq|))| .
|
|
899 |
# AND qty > 0 # das führt zu falschen warenbeständen, wenn man über lieferschein auslagert. @mb nochmal besprechen jb 12.5.09
|
|
900 |
qq|GROUP BY i.warehouse_id, i.bin_id, i.chargenumber, i.parts_id, w.description, b.description
|
|
901 |
ORDER BY LOWER(w.description), LOWER(b.description), LOWER(i.chargenumber)|;
|
|
902 |
|
|
898 |
WHERE (i.parts_id IN (| . join(', ', ('?') x scalar(@parts_ids)) . qq|)) |
|
899 |
GROUP BY i.warehouse_id, i.bin_id, i.chargenumber, i.parts_id, w.description, b.description
|
|
900 |
HAVING SUM(qty) > 0
|
|
901 |
ORDER BY LOWER(w.description), LOWER(b.description), LOWER(i.chargenumber) |
|
902 |
|; |
|
903 | 903 |
my $contents = selectall_hashref_query($form, $form->get_standard_dbh($myconfig), $query, @parts_ids); |
904 | 904 |
|
905 | 905 |
$main::lxdebug->leave_sub(); |
Auch abrufbar als: Unified diff
Ergänzung zu Jans Bugfix: Nur diejenigen Lagerplätze anzeigen, die positiven Bestand haben.