summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcos <cos>2015-01-10 20:23:17 +0100
committercos <cos>2015-01-10 20:23:17 +0100
commitf4ebbc7557f3d97ef5fd25c9a7052532e33a7470 (patch)
tree55054b48fa4f16f10b1750dd157890b98cd9e7db
parent1c478c82986d8340814d5d17c4522704a489e529 (diff)
downloadmat-f4ebbc7557f3d97ef5fd25c9a7052532e33a7470.zip
Order inventory by preparation date.
-rwxr-xr-xmat2
1 files changed, 1 insertions, 1 deletions
diff --git a/mat b/mat
index 45ce51d..8e86cc2 100755
--- a/mat
+++ b/mat
@@ -185,7 +185,7 @@ sub cmd_inventory {
my $sql = "SELECT recipe_id, count(recipe_id), storage FROM inventory";
$sql .= " WHERE storage='$storage'" if ( $storage );
- $sql .= " GROUP BY storage, recipe_id";
+ $sql .= " GROUP BY storage, preparation_date, recipe_id";
my $all = $db->selectall_arrayref($sql);
foreach my $row (@$all) {