feat: simplify billing status to Active/Invoiced/Expired with new SQL migration and cron rewrite

Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/5dbd58e1-7aa0-41e2-8dd3-c56b69ede05e

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-05-01 22:17:22 +00:00 committed by GitHub
parent b99cd45db9
commit b03d9b2171
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 738 additions and 499 deletions

View file

@ -210,9 +210,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['confirm_renewal'])) {
// Determine price based on duration (fall back to monthly if missing)
$price = ($duration === 'year' && !empty($order['price_year']) && floatval($order['price_year']) > 0) ? floatval($order['price_year']) : floatval($order['price_monthly']);
// Prepare update to set this order into renew state
// Prepare update to set this order into Invoiced state (renewal requested)
if ($upd = $db->prepare("UPDATE {$table_prefix}billing_orders SET status = ?, invoice_duration = ?, qty = ?, price = ? WHERE order_id = ? AND user_id = ? LIMIT 1")) {
$new_status = 'renew';
$new_status = 'Invoiced';
$orderIdInt = intval($order_id);
$userIdInt = intval($user_id);
$price_val = number_format($price, 2, '.', '');