diff --git a/README.md b/README.md index c1c26da..57b7b27 100644 --- a/README.md +++ b/README.md @@ -40,8 +40,6 @@ ssh -nNTvL 5432:fsmi-db.fsmi.org:5432 fsmi-login.fsmi.uni-karlsruhe.de ## TODO -- [ ] Implement item and snack entry as Elm application - - [ ] Needs good documentation for maintainability - [ ] Implement and document report generation - [ ] How many days will the item last? - [ ] How many do we need to last X months? @@ -49,5 +47,8 @@ ssh -nNTvL 5432:fsmi-db.fsmi.org:5432 fsmi-login.fsmi.uni-karlsruhe.de - [ ] Make it print nicely - [ ] Make it possible to edit entries - [ ] Improve project structure -- [ ] Figure out/Add documentation about building `entry.js` - [ ] Use `flask.flash` for error messages +- [x] Implement item and snack entry as Elm application + - [x] Figure out/Add documentation about building `entry.js` + - [ ] Clean up the code a little and add some comments + - [ ] Needs good documentation for maintainability diff --git a/jon/db/entry/add_item_and_snack_entry.sql b/jon/db/entry/add_item_and_snack_entry.sql index e973272..59f8015 100644 --- a/jon/db/entry/add_item_and_snack_entry.sql +++ b/jon/db/entry/add_item_and_snack_entry.sql @@ -10,7 +10,7 @@ VALUES (%(barcode)s, %(name)s, %(group_id)s, %(location_id)s, %(tax_group_id)s, %(sales_units)s, %(net_unit_price)s) RETURNING item_id INTO new_item_id; --- Delete any old snacks with the same barcode in the given location +-- Delete (i.e. mark as inactive) any old snacks with the same barcode in the given location PERFORM garfield.snack_delete(snack_id) FROM garfield.snacks WHERE snack_barcode = %(barcode)s