mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 20:26:42 +00:00
Use qu_id_purchase when adding products to the shopping list (closes #1355)
This commit is contained in:
@@ -50,7 +50,8 @@ class StockService extends BaseService
|
||||
$shoppinglistRow = $this->getDatabase()->shopping_list()->createRow([
|
||||
'product_id' => $missingProduct->id,
|
||||
'amount' => $amountToAdd,
|
||||
'shopping_list_id' => $listId
|
||||
'shopping_list_id' => $listId,
|
||||
'qu_id' => $product->qu_id_purchase
|
||||
]);
|
||||
$shoppinglistRow->save();
|
||||
}
|
||||
@@ -75,7 +76,8 @@ class StockService extends BaseService
|
||||
$shoppinglistRow = $this->getDatabase()->shopping_list()->createRow([
|
||||
'product_id' => $overdueProduct->product_id,
|
||||
'amount' => 1,
|
||||
'shopping_list_id' => $listId
|
||||
'shopping_list_id' => $listId,
|
||||
'qu_id' => $product->qu_id_purchase
|
||||
]);
|
||||
$shoppinglistRow->save();
|
||||
}
|
||||
@@ -100,7 +102,8 @@ class StockService extends BaseService
|
||||
$shoppinglistRow = $this->getDatabase()->shopping_list()->createRow([
|
||||
'product_id' => $expiredProduct->product_id,
|
||||
'amount' => 1,
|
||||
'shopping_list_id' => $listId
|
||||
'shopping_list_id' => $listId,
|
||||
'qu_id' => $product->qu_id_purchase
|
||||
]);
|
||||
$shoppinglistRow->save();
|
||||
}
|
||||
|
Reference in New Issue
Block a user