Show product group Userfields on the shopping list (closes #2069)

This commit is contained in:
Bernd Bestel
2022-12-18 20:56:02 +01:00
parent 38a4ad8ec4
commit 2ebb9b2cd9
4 changed files with 37 additions and 3 deletions

View File

@@ -352,7 +352,6 @@ class StockController extends BaseController
public function ShoppingList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
{
$listId = 1;
if (isset($request->getQueryParams()['list']))
{
$listId = $request->getQueryParams()['list'];
@@ -368,6 +367,8 @@ class StockController extends BaseController
'quantityUnitConversionsResolved' => $this->getDatabase()->quantity_unit_conversions_resolved(),
'productUserfields' => $this->getUserfieldsService()->GetFields('products'),
'productUserfieldValues' => $this->getUserfieldsService()->GetAllValues('products'),
'productGroupUserfields' => $this->getUserfieldsService()->GetFields('product_groups'),
'productGroupUserfieldValues' => $this->getUserfieldsService()->GetAllValues('product_groups'),
'userfields' => $this->getUserfieldsService()->GetFields('shopping_list'),
'userfieldValues' => $this->getUserfieldsService()->GetAllValues('shopping_list')
]);