10 lines
178 B
SQL
10 lines
178 B
SQL
SELECT
|
|
*
|
|
FROM all_inventory_item_overview
|
|
WHERE (%(location_id)s IS NULL OR location = %(location_id)s)
|
|
AND available
|
|
ORDER BY
|
|
name ASC,
|
|
item_barcode DESC,
|
|
bought DESC
|