diff --git a/modules/erp/artikel-mapping/service.php b/modules/erp/artikel-mapping/service.php
index 163ee04..f22aae8 100644
--- a/modules/erp/artikel-mapping/service.php
+++ b/modules/erp/artikel-mapping/service.php
@@ -1,7 +1,7 @@
query(
"SELECT
@@ -9,11 +9,7 @@ function get_lager_bundle_overview(PDO $pdo): array
si.item_code,
si.display_name
FROM sellable_item si
- INNER JOIN sellable_item_component sic
- ON sic.sellable_item_id = si.id
WHERE si.status = 'active'
- GROUP BY si.id, si.item_code, si.display_name
- HAVING SUM(sic.qty_per_item) > 1
ORDER BY si.display_name ASC, si.id ASC"
);
diff --git a/modules/shared/auth/ui/home.php b/modules/shared/auth/ui/home.php
index fdd3a65..066bcdb 100644
--- a/modules/shared/auth/ui/home.php
+++ b/modules/shared/auth/ui/home.php
@@ -237,12 +237,12 @@ function auth_render_lager_table(string $title, array $rows, array $columns, str
return implode('', $html);
}
-function auth_render_lager_content(array $lagerProducts, array $lagerBundles): string
+function auth_render_lager_content(array $lagerProducts, array $lagerArtikel): string
{
return '
'
. '
'
. auth_render_lager_table('Produkte', $lagerProducts, ['Produktname', 'Anzahl im Lager'], 'products')
- . auth_render_lager_table('Artikel', $lagerBundles, ['Artikel-Name'], 'bundles')
+ . auth_render_lager_table('Artikel', $lagerArtikel, ['Artikel-Name'], 'articles')
. ''
. '
'
. '
';
}
-function render_auth_home_page(array $user, array $otcProducts = [], array $bestellungenTable = [], array $lagerProducts = [], array $lagerBundles = []): void
+function render_auth_home_page(array $user, array $otcProducts = [], array $bestellungenTable = [], array $lagerProducts = [], array $lagerArtikel = []): void
{
$otcProductRows = '';
foreach ($otcProducts as $product) {
@@ -281,7 +281,7 @@ function render_auth_home_page(array $user, array $otcProducts = [], array $best
JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES
);
$bestellungenContent = auth_render_bestellungen_content($bestellungenTable);
- $lagerContent = auth_render_lager_content($lagerProducts, $lagerBundles);
+ $lagerContent = auth_render_lager_content($lagerProducts, $lagerArtikel);
$moduleContentCards = json_encode(
[
'Bestellungen' => $bestellungenContent,
diff --git a/public/index.php b/public/index.php
index 85cc1f6..9febe0c 100644
--- a/public/index.php
+++ b/public/index.php
@@ -48,7 +48,7 @@ $currentUser = auth_current_user($pdo);
if ($currentUser !== null) {
$otcProducts = get_otc_order_form_products($pdo);
$lagerProducts = get_lager_product_overview($pdo);
- $lagerBundles = get_lager_bundle_overview($pdo);
+ $lagerArtikel = get_lager_artikel_overview($pdo);
$bestellungenTable = get_sales_order_overview($pdo, [
'search' => (string) ($_GET['bestellungen_search'] ?? ''),
'sort_column' => (string) ($_GET['bestellungen_sort'] ?? 'order_date'),
@@ -60,7 +60,7 @@ if ($currentUser !== null) {
echo auth_render_bestellungen_content($bestellungenTable);
exit;
}
- render_auth_home_page($currentUser, $otcProducts, $bestellungenTable, $lagerProducts, $lagerBundles);
+ render_auth_home_page($currentUser, $otcProducts, $bestellungenTable, $lagerProducts, $lagerArtikel);
exit;
}