mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Don't replace due date on freezing when default_best_before_days_after_freezing are set to 0 (closes #1880)
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
- This executes the configured barcode lookup plugin with the given barcode
|
- This executes the configured barcode lookup plugin with the given barcode
|
||||||
- If the lookup was successful, the product edit page of the created product is displayed, where the product setup can be completed (if required)
|
- If the lookup was successful, the product edit page of the created product is displayed, where the product setup can be completed (if required)
|
||||||
- After that, the transaction is continued with that product
|
- After that, the transaction is continued with that product
|
||||||
|
- Optimized that when moving a product to a freezer location (so when freezing it) the due date will no longer be replaced when the product option "Default due days after freezing" is set to `0`
|
||||||
|
|
||||||
### Shopping list
|
### Shopping list
|
||||||
|
|
||||||
|
@@ -1266,7 +1266,7 @@ class StockService extends BaseService
|
|||||||
$locationTo = $this->getDatabase()->locations()->where('id', $locationIdTo)->fetch();
|
$locationTo = $this->getDatabase()->locations()->where('id', $locationIdTo)->fetch();
|
||||||
|
|
||||||
// Product was moved from a non-freezer to freezer location -> freeze
|
// Product was moved from a non-freezer to freezer location -> freeze
|
||||||
if ($locationFrom->is_freezer == 0 && $locationTo->is_freezer == 1 && $productDetails->product->default_best_before_days_after_freezing >= -1)
|
if ($locationFrom->is_freezer == 0 && $locationTo->is_freezer == 1 && ($productDetails->product->default_best_before_days_after_freezing > 0 || $productDetails->product->default_best_before_days_after_freezing == -1))
|
||||||
{
|
{
|
||||||
if ($productDetails->product->default_best_before_days_after_freezing == -1)
|
if ($productDetails->product->default_best_before_days_after_freezing == -1)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user