Include userfields when printing a shopping list (fixes #719)

This commit is contained in:
Bernd Bestel 2020-04-12 14:39:11 +02:00
parent 3356b07342
commit d907bca3cb
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
2 changed files with 12 additions and 0 deletions

View File

@ -14,6 +14,7 @@
### Shopping list fixes
- Fixed that the "shopping list to stock workflow"-dialog was not visible in compact view
- Fixed that when printing the shopping list configured userfields were not included
### Recipe fixes
- Fixed that when editing an ingredient with "Only check if a single unit is in stock" set, the quantity unit was always set to the products stock quantity unit regardless if a different one was selected for that ingredient

View File

@ -209,6 +209,11 @@
<tr>
<th>{{ $__t('Product') }} / <em>{{ $__t('Note') }}</em></th>
<th>{{ $__t('Amount') }}</th>
@include('components.userfields_thead', array(
'userfields' => $userfields
))
</tr>
</thead>
<tbody>
@ -220,6 +225,12 @@
<td>
{{ $listItem->amount }} @if(!empty($listItem->product_id)){{ $__n($listItem->amount, FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $listItem->product_id)->qu_id_purchase)->name, FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $listItem->product_id)->qu_id_purchase)->name_plural) }}@endif
</td>
@include('components.userfields_tbody', array(
'userfields' => $userfields,
'userfieldValues' => FindAllObjectsInArrayByPropertyValue($userfieldValues, 'object_id', $listItem->product_id)
))
</tr>
@endforeach
</tbody>