diff options
author | cos <cos> | 2015-10-03 21:56:21 +0200 |
---|---|---|
committer | cos <cos> | 2015-10-03 21:56:21 +0200 |
commit | 50bfecf318df7c4a2d008d18c496a2058d6789e2 (patch) | |
tree | f0b72c8b4288fee9e1d37dcf1b2e2b26aa816a15 | |
parent | ecaa540af575077444d5ef96d730ff0c96cfca73 (diff) | |
download | mat-50bfecf318df7c4a2d008d18c496a2058d6789e2.zip |
Initialize counter correctly.
-rwxr-xr-x | mat | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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]; |