diff options
author | cos <cos> | 2014-01-18 14:59:28 +0100 |
---|---|---|
committer | cos <cos> | 2014-01-18 14:59:28 +0100 |
commit | 9a9ccd11e0fe68232cc605f9bfdd883f4c0afe4f (patch) | |
tree | 24cea60d497fa07b656e232679aae4c9a73dbfb0 /mat | |
parent | 3e7f9000c6868549b1b9cf8d447aa30bb54624f8 (diff) | |
download | mat-9a9ccd11e0fe68232cc605f9bfdd883f4c0afe4f.zip |
Store preparation dates in inventory table.
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); |