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)
This commit is contained in:
Bernd Bestel
2022-03-31 22:52:38 +02:00
parent fbb84277bf
commit cd60c239af
7 changed files with 194 additions and 21 deletions

View File

@@ -696,7 +696,6 @@ class StockService extends BaseService
$lastPrice = null;
$lastShoppingLocation = null;
$avgPrice = null;
$oldestPrice = null;
if ($productLastPurchased)
{
$lastPurchasedDate = $productLastPurchased->purchased_date;
@@ -707,11 +706,6 @@ class StockService extends BaseService
{
$avgPrice = $avgPriceRow->price;
}
$oldestPriceRow = $this->getDatabase()->products_oldest_stock_unit_price()->where('product_id', $productId)->fetch();
if ($oldestPriceRow)
{
$oldestPrice = $avgPriceRow->price;
}
}
$product = $this->getDatabase()->products($productId);
@@ -746,7 +740,6 @@ class StockService extends BaseService
'quantity_unit_stock' => $quStock,
'last_price' => $lastPrice,
'avg_price' => $avgPrice,
'oldest_price' => $oldestPrice,
'last_shopping_location_id' => $lastShoppingLocation,
'default_shopping_location_id' => $product->shopping_location_id,
'next_due_date' => $nextDueDate,