mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
Restore the original due date when undoing a product opened transaction (fixes #1659)
This commit is contained in:
parent
f2bef554a4
commit
4338ccc132
@ -5,6 +5,7 @@
|
||||
- Fixed that the labels of context-/more-menu items were not readable in Night Mode (thanks @corbolais)
|
||||
- Fixed that auto night mode over midnight did not always work
|
||||
- Fixed that the "Add as new product" productpicker workflow, started from the shopping list item form, always selected the default shopping list after finishing the flow
|
||||
- Fixed that when undoing a product opened transaction and when the product has "Default due days after opened", the original due date wasn't restored
|
||||
- Fixed that "Track date only"-chores were shown as overdue on the due day on the chores overview page
|
||||
|
||||
### API
|
||||
|
@ -1426,7 +1426,8 @@ class StockService extends BaseService
|
||||
$stockRows = $this->getDatabase()->stock()->where('stock_id = :1 AND amount = :2 AND purchased_date = :3', $logRow->stock_id, $logRow->amount, $logRow->purchased_date)->limit(1);
|
||||
$stockRows->update([
|
||||
'open' => 0,
|
||||
'opened_date' => null
|
||||
'opened_date' => null,
|
||||
'best_before_date' => $logRow->best_before_date // Is only relevant when the product has "Default due days after opened", but also doesn't hurt for other products
|
||||
]);
|
||||
|
||||
// Update log entry
|
||||
|
Loading…
x
Reference in New Issue
Block a user