mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +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:
parent
bed18b1981
commit
98fad559d4
@ -14,6 +14,7 @@
|
||||
- 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)
|
||||
- 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
|
||||
|
||||
|
@ -1266,7 +1266,7 @@ class StockService extends BaseService
|
||||
$locationTo = $this->getDatabase()->locations()->where('id', $locationIdTo)->fetch();
|
||||
|
||||
// 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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user