Skip to content

Incorrect Server Rental Expiry Estimation – Stuck at “41 Days” Regardless of User Credit #1349

Description

@tomiheneldra

Pre-flight checklist

  • I have searched existing issues and this has not been reported before
  • I am using the latest available release

Branch

main

Bug Description

Issue Description:
On the Pterodactyl-based control panel (from Ctrlpanel-gg/panel), version v1.2.0, the estimated time until a server rental runs out (credit) is incorrectly calculated. The estimation always shows only 41 days, even when the actual remaining credit should allow for much longer usage.

Actual Result:
The panel shows only 41 days remaining.

Steps to Reproduce

  • Set up a product (e.g., "Ptero Ram 3") with a cost of 27.78 credits per hour.
  • Assign a user with 86,248.94 credits.
  • Check the estimated server rental expiry time displayed in the panel.

Expected Behavior

Expected Result (Calculation Example):

  • Cost per month (720 hours) = 27.78 × 720 = 20,001.6 credits
  • Remaining credits = 86,248.94
  • Hours remaining = 86,248.94 ÷ 27.78 ≈ 3,104.7 hours
  • Days remaining = 3,104.7 ÷ 24 ≈ 129 days

Expected expiry: ~129 days (not 41 days)

CtrlPanel Logs

-

Additional Info

Impact:
Users cannot see the correct remaining server rental time, leading to confusion about when their server will expire.

Environment:

  • Panel version: v1.2.0
  • Original source: Ctrlpanel-gg/panel
  • Product example: Ptero Ram 3 (27.78 credits/hour)
  • User credit: 86,248.94

Suggested Fix:

Recalculate expiry estimation based on:
Remaining hours = user_credit / cost_per_hour
Remaining days = remaining_hours / 24

Ensure no hardcoded or stuck value like "41 days" is used.

Additional Info:
Screenshots attached.
Image

This issue is consistently reproducible on v1.2.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status
    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions