|
|
@@ -11,8 +11,6 @@ expirePendingOrders();
|
|
|
|
|
|
$pageTitle = 'Admin Dashboard';
|
|
|
$orders = getOrders();
|
|
|
-$products = getProducts();
|
|
|
-$organizations = getOrganizations(false);
|
|
|
|
|
|
$backorderGroups = getBackorderGroups();
|
|
|
$backorderCount = 0;
|
|
|
@@ -21,9 +19,6 @@ foreach ($backorderGroups as $group) {
|
|
|
}
|
|
|
|
|
|
$stats = [
|
|
|
- 'products' => count($products),
|
|
|
- 'organizations' => count($organizations),
|
|
|
- 'unconfirmed' => 0,
|
|
|
'open' => 0,
|
|
|
'partial' => 0,
|
|
|
'processed' => 0,
|
|
|
@@ -33,7 +28,7 @@ $stats = [
|
|
|
|
|
|
foreach ($orders as $order) {
|
|
|
if ($order['confirmation_status'] === 'pending') {
|
|
|
- $stats['unconfirmed']++;
|
|
|
+ continue;
|
|
|
} elseif ($order['status'] === 'cancelled') {
|
|
|
$stats['cancelled']++;
|
|
|
} elseif ($order['status'] === 'processed') {
|
|
|
@@ -113,18 +108,6 @@ include __DIR__ . '/../includes/header.php';
|
|
|
</div>
|
|
|
|
|
|
<div class="admin-stats">
|
|
|
- <div class="stat-card">
|
|
|
- <h3>Produkte</h3>
|
|
|
- <div class="stat-value"><?php echo $stats['products']; ?></div>
|
|
|
- </div>
|
|
|
- <div class="stat-card">
|
|
|
- <h3>Organisationen</h3>
|
|
|
- <div class="stat-value"><?php echo $stats['organizations']; ?></div>
|
|
|
- </div>
|
|
|
- <div class="stat-card">
|
|
|
- <h3>Unbestätigt</h3>
|
|
|
- <div class="stat-value"><?php echo $stats['unconfirmed']; ?></div>
|
|
|
- </div>
|
|
|
<div class="stat-card">
|
|
|
<h3>Offen</h3>
|
|
|
<div class="stat-value"><?php echo $stats['open']; ?></div>
|