|null $itemStocks Bestand je Shop-Gegenstand (Verwaltung, null = unbegrenzt) */ $isManageView = ($orderView ?? 'member') === 'manage'; $status = (string) $order['status']; $badgeClass = [ 'pending' => 'badge-pending', 'approved' => 'shop-badge-approved', 'delivered' => 'badge-active', 'rejected' => 'badge-disabled', 'cancelled' => '', ][$status] ?? ''; $return = $orderReturn ?? '/shop.php#antraege'; $requested = shop_requested_quantity($order); $quantity = (int) $order['quantity']; // Bestand fuer die Bewilligung: vorbelegt wird hoechstens, was da ist. $stockNow = null; $hasStockInfo = $isManageView && $status === 'pending' && $order['item_id'] !== null && array_key_exists((int) $order['item_id'], $itemStocks ?? []); if ($hasStockInfo) { $stockNow = $itemStocks[(int) $order['item_id']]; } $approveDefault = $stockNow !== null ? max(1, min($quantity, $stockNow)) : $quantity; ?>
#
· beantragt am 1): ?> · × $quantity): ?> · von bewilligt
Bestand:
Bemerkung:
am von · übergeben am von
Vom Mitglied zurückgezogen.
Grund:
1): ?> von