mirror of
https://github.com/grocy/grocy.git
synced 2025-10-14 17:24:07 +00:00
Scale up values on the shopping list when shopping_list_round_up is enabled (closes #2687)
This commit is contained in:
@@ -17,6 +17,17 @@
|
||||
<script src="{{ $U('/viewjs/purchase.js?v=', true) }}{{ $version }}"></script>
|
||||
@endpush
|
||||
|
||||
@php
|
||||
if(boolval($userSettings['shopping_list_round_up']))
|
||||
{
|
||||
foreach($listItems as $listItem)
|
||||
{
|
||||
$listItem->amount = ceil($listItem->amount);
|
||||
$listItem->last_price_total = $listItem->price * $listItem->amount;
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
|
||||
@section('content')
|
||||
<div class="row d-print-none hide-on-fullscreen-card">
|
||||
<div class="col">
|
||||
@@ -266,11 +277,6 @@
|
||||
{
|
||||
$listItem->amount = $listItem->amount * $productQuConversion->factor;
|
||||
}
|
||||
|
||||
if(boolval($userSettings['shopping_list_round_up']))
|
||||
{
|
||||
$listItem->amount = ceil($listItem->amount);
|
||||
}
|
||||
@endphp
|
||||
@endif
|
||||
<td>
|
||||
|
Reference in New Issue
Block a user