diff options
Diffstat (limited to 'mat')
-rwxr-xr-x | mat | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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); |