summaryrefslogtreecommitdiff
path: root/mat
diff options
context:
space:
mode:
Diffstat (limited to 'mat')
-rwxr-xr-xmat5
1 files changed, 3 insertions, 2 deletions
diff --git a/mat b/mat
index 9ee730a..2f103db 100755
--- a/mat
+++ b/mat
@@ -346,8 +346,9 @@ sub print_label {
sub cmd_storeportion {
my ( $recipe_id, $amount, $storage ) = @_;
- my $sql = "INSERT INTO inventory (recipe_id, amount, storage ) VALUES (".
- "$recipe_id, $amount, '$storage' );";
+ my $sql = "INSERT INTO inventory (recipe_id, preparation_date, amount, ".
+ "storage ) VALUES ($recipe_id, ".`date +%Y%m%d|tr -d '\n'`.", $amount, ".
+ "'$storage' );";
$db->do($sql);
my $inventory_id = $db->last_insert_id(undef, undef, undef, undef);