summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmat2
1 files changed, 2 insertions, 0 deletions
diff --git a/mat b/mat
index 707a675..12c67d8 100755
--- a/mat
+++ b/mat
@@ -14,6 +14,7 @@ use Text::Iconv;
use utf8;
binmode(STDOUT, 'utf8:');
+# FIXME die on non-existant config
tie my %Config, "Config::Simple", '/etc/mat.conf';
#use Data::Dumper;
@@ -297,6 +298,7 @@ sub cmd_inventory {
$sql .= " WHERE storage='$storage'" if ( $storage );
$sql .= " GROUP BY storage, preparation_date, recipe_id";
+ $total{'all'} = 0;
my $all = $db->selectall_arrayref($sql);
foreach my $row (@$all) {
$total{'all'} += @$row[1];