Commit Graph

156 Commits

Author SHA1 Message Date
Akosh Pinter
312dd8a200 Fixes for losing Stock Note field content #1961 (#1962)
* Fixed losing Note field content #1961

Fixed losing Note field content when splitting stock entries #1961

* Applied code formatting rules

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2022-08-06 17:35:11 +02:00
Bernd Bestel
57d70851c8 Fixed stock overview page status button counters related to the product option "Never show on stock overview" (fixes #1956) 2022-07-24 21:36:29 +02:00
Bernd Bestel
0b532f7624 Fixed StockService->ConsumeProduct $productStockAmount check (fixes #1949) 2022-07-18 17:35:35 +02:00
Bernd Bestel
8ab511361a Do "auto add missing products to shopping list" also on product open actions (fixes #1873) 2022-04-27 22:50:20 +02:00
Rosemary Orchard
5e30e89737 Add support for "Move on Open" (#1863)
* Add functionality to move a product when it is opened

* Update the API to support this (and some other new fields)

* Remove console, update move on open when either the default or the consume location change

* Fix conflict from fridge

* Ignore .DS_STORE from macOS

* Fix the migration conflict

* Fix the default location not appending properly

* Revert changes no longer needed

* Fix the checkbox disable logic, and call the function on page load

* Simplify the transfer to use the existing function (which also adds logs)

* Only move it if it's moving

* Code formatting / naming

* Clarify help text (it's not always about one unit, but about the corresponding amount opened)

* Handle splitted stock entries + optimized/unified product property checks

* Added UI feedback on auto moving

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2022-04-18 18:25:08 +02:00
Bernd Bestel
632db0d8d1 Fixed new user settings naming 2022-04-07 19:25:27 +02:00
Bernd Bestel
4da546fc80 Don't compact stock entries with userfields 2022-04-06 19:07:33 +02:00
Bernd Bestel
61ed756dd0 Implemented "default consume location" handling (closes #1365) 2022-04-03 21:15:05 +02:00
Bernd Bestel
a5294262e6 Added a user setting to automatically add missing products to the shopping list (closes #1266) 2022-04-03 13:00:14 +02:00
Bernd Bestel
f7c33a4579 Optionally show out of stock products on the location content sheet (closes #1641) 2022-04-01 21:55:06 +02:00
Bernd Bestel
b53d1a076f Reviewed latest changes regarding price handling views 2022-04-01 17:04:09 +02:00
Bernd Bestel
cd60c239af Squashed commit
Improved locale number display on stockoverview page
Fixed choresoverview chore execution color highlighting
Highlight recipe ingredients based on the new due score (references #1813)
Reworked current price handling views (mostly needed for recipes)
2022-03-31 22:52:38 +02:00
Bernd Bestel
d3a39270de Implemented notes and Userfields for stock entries (closes #443) 2022-03-30 17:32:53 +02:00
Bernd Bestel
66bd3f0d59 Added a new API endpoint to get all stock entries per location
References https://www.reddit.com/r/grocy/comments/srfwfs
2022-02-13 20:34:49 +01:00
Bernd Bestel
d1d52aea44 Move FEATURE_SETTING_STOCK_COUNT_OPENED_PRODUCTS_AGAINST_MINIMUM_STOCK_AMOUNT to per product option (closes #1753) 2022-02-07 19:12:31 +01:00
Bernd Bestel
3a6f04f770 Optionally remove only done shopping list items (/stock/shoppinglist/clear API endpoint, closes #1730) 2022-01-06 14:07:29 +01:00
Bernd Bestel
ad0dbdfc22 Lookup product barcodes case insensitive (fixes #1734) 2022-01-06 13:42:38 +01:00
Bernd Bestel
a711bbd8f6 Print stock entry labels also on inventory when adding products (closes #1713) 2021-12-09 18:32:59 +01:00
Bernd Bestel
b83e4f53b1 Don't print stock entry labels when not desired (server side WebHook execution) (references #1686) 2021-11-15 09:06:19 +01:00
Bernd Bestel
6070507b04 Fixed per unit stock grocycodes weren't unique per unit (fixes #1676) 2021-11-14 15:26:38 +01:00
Graham Christensen
a7f3f64d89 StockService: Set the product's bestBeforeDate to the freezer date if it is being purchased to a freezer (#1672)
* StockService: Set the product's bestBeforeDate to the freezer date if it is being purchased to a freezer

* Formatting / feature flag checks / proper data type comparision

* Prefill due date also on location change

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2021-11-13 17:41:04 +01:00
Bernd Bestel
4338ccc132 Restore the original due date when undoing a product opened transaction (fixes #1659) 2021-11-12 18:12:34 +01:00
Bernd Bestel
bed7965989 Fixed undo consume stock transaction location handling (references #1602) 2021-09-27 17:50:19 +02:00
Bernd Bestel
19ff782c00 Fixed consume transaction journal location handling (fixes #1602) 2021-09-27 17:46:42 +02:00
Bernd Bestel
1d5ca5ed64 Fixed external barcode lookup (plugin) add product handling related to barcodes (fixes #1568) 2021-08-19 19:56:43 +02:00
Bernd Bestel
cebf7a3e54 Don't consider inactive products to be missing (fixes #1578) 2021-08-17 18:00:33 +02:00
David Mott
95cb9ffb90 fix: confirm grocycode is of PRODUCT type in GetProductIdFromBarcode (#1581)
* fix: confirm grocycode is of PRODUCT type in GetProductIdFromBarcode

* Fixed formatting

* Don't output the given input (for security reasons)

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2021-08-15 10:45:05 +02:00
Bernd Bestel
edfa404ed6 Squashed commit
Always execute migration 9999 (can be used to fix things manually)
Optimized meal plan navigation / date range filtering
Prepared next release
Pulled translations from Transifex
Various code optimizations
2021-07-16 17:32:08 +02:00
Bernd Bestel
91d8eaeb74 Squashed commit
Improve journal pages loading time (new date range filter)
Various small style adjustments (meal plan page and others)
Pulled German translations from Transifex
Show the shopping list total value (closes #1309)
Make it possible to copy recipes (closes #714)
Implemented optional "auto decimal separator for price inputs" (closes #1345)
Removed table grouped column fixed order restriction (closes #1402)
Don't filter out style, class, id attributes of html text (closes #1298)
Added product picture as column on the stock overview page (closes #1283)
Added grocycodes also for chores and batteries (+ camera barcode scanning for /choretracking and /batterytracking, this now closes #221)
2021-07-13 19:29:23 +02:00
Bernd Bestel
247221950d Never extend the original due date on when opening a product which has default_best_before_days (closes #1342) 2021-07-12 17:56:09 +02:00
Bernd Bestel
55807bfc94 Auto-compact stock entries (closes #1343) 2021-07-11 21:06:05 +02:00
Bernd Bestel
40e16db01f Fixed consume amount validation when consuming a parent product (fixes #1306)
More a workaround for now, the max constraint is just removed when the product has child products,
but the amount to be consumed is checked by StockService anyway, so should not be a problem...
2021-07-11 10:21:36 +02:00
Bernd Bestel
b0d38b87de PHP 8 support 2021-07-05 17:48:34 +02:00
Bernd Bestel
bcf963ac49 Fixed self production amount was wrong for tare weight handling enabled products (fixes #1431) 2021-07-03 18:30:53 +02:00
Bernd Bestel
0f88eed08c Upgraded to PHP-CS-Fixer v3 2021-07-03 17:46:47 +02:00
Bernd Bestel
cae924eb81 Fixed shopping list QU handling (fixes #1385, fixes #1384) 2021-07-02 17:37:06 +02:00
Bernd Bestel
76cfe7fece Fixed productcard spoil rate (fixes #1319) 2021-06-28 19:43:08 +02:00
Bernd Bestel
acb81187d9 Fixed missing shopping_location_id on stock transfer actions (fixes #1408) 2021-06-27 20:55:38 +02:00
Marc Ole Bulling
eb135aee39 Add support for printing shoppinglist with thermal printer (#1273)
* Added escpos-php library

* Added button to shoppinglist print menu

* Added to translation

* Added basic printing logic and API call

* Working implementation for printing with the API

* Added openapi json

* Correctly parsing boolean parameter

* Working button in UI

* Change to grocy formatting

* Add Date

* Only show thermal print button when Feature Flag is set

* Fixed API call and added error message parsing

* Undo translation

* Add flag to print quantities as well

* Added printing notes

* Added quantity conversion

* Increse feed

* Fixed that checkbox was undefined, as dialog was already closed

* Added padding

* Formatting

* Added note about user permission

* Fixed error when using notes instead of products

* Review

- Default FEATURE_FLAG_THERMAL_PRINTER to disabled
- Added missing localization strings (and slightly adjusted one)

* Fixed merge conflicts

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2021-06-18 20:45:42 +02:00
Katharina Bogad
2471e78188 Grocycode, label printing (#1500)
* Grocycode: Productpicker, StockService

* Grocycode: Datamatrix generation

* Grocycode: Display in UI, make Images downloadable

* Grocycode: Do not show on product card

* Grocycode: Stockentry Label view

* Grocycode: Webhooks & Labelprinter Feature

* Grocycode: Manual Label printing

* Grocycode: Print Label from product form

* Quagga2: use zxing for DataMatrix recognition

* Grocycode: Default settings for label printing

* Prepare merge of master

* Grocycode: docs

* Docs: label printing webhook

* Review

- "grocy" is currently written lower-case everywhere, so let's do this also for "grocycode"
- Unified phrases / capitalization
- Minor UI adjustments (mainly context menu item ordering / ordering/spacing on product edit page)
- Documented API changes for Swagger UI (grocy.openapi.json)
- Reverted German localizations (those are managed via Transifex; would cause conflicts when manually edited - will import them later there)
- Reverted a somehow messed up localization string (productform/help text for `cumulate_min_stock_amount_of_sub_products`)
- Suppress deprecation warnings when generating Datamatrix PNG (otherwise the PNG is invalid, https://github.com/jucksearm/php-barcode/issues/3)
- Default `FEATURE_FLAG_LABELPRINTER` to disabled

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2021-06-12 17:21:12 +02:00
Edward Betts
7bbcec91aa Correct spelling (#1420) 2021-03-31 22:12:51 +02:00
Bernd Bestel
f5eff8ab49 Include due_type = "Expiration date" products in /stock/volatile API endpoint (fixes #1372) 2021-02-21 18:18:34 +01:00
Bernd Bestel
bfa3347a20 Fixed that editing stock entries was not possible (fixes #1268) 2021-01-12 18:04:20 +01:00
Bernd Bestel
8c0ff04caa Fixed consume stock amount check for product substitution (fixes #1240) 2021-01-01 13:27:57 +01:00
Bernd Bestel
2e3c237648 Fixed zero decimals handling (fixes #1213) 2020-12-23 19:56:37 +01:00
Bernd Bestel
c9b5e14473 Make it possible to merge products (closes #243) 2020-12-20 20:58:22 +01:00
Bernd Bestel
a5326aa95c Improve API stock action endpoint response (closes #769) 2020-12-20 14:43:07 +01:00
Bernd Bestel
250b308d5d Support -1 for "Default due days after freezing" (closes #846) 2020-12-19 17:32:47 +01:00
Bernd Bestel
eb4a748da3 Consume opened products first (closes #1183) 2020-12-19 10:28:35 +01:00
Bernd Bestel
25f5f98b75 Fixed undoing a consume transaction of an opened item added it back to stock unopened (fixes #1191) 2020-12-16 17:44:51 +01:00