Skip to content

Add the option to choose a dynamic billing period.#1309

Draft
Ferks-FK wants to merge 11 commits into
Ctrlpanel-gg:developmentfrom
Ferks-FK:1285
Draft

Add the option to choose a dynamic billing period.#1309
Ferks-FK wants to merge 11 commits into
Ctrlpanel-gg:developmentfrom
Ferks-FK:1285

Conversation

@Ferks-FK

@Ferks-FK Ferks-FK commented Feb 8, 2026

Copy link
Copy Markdown
Collaborator

implements #1285.

Copilot AI review requested due to automatic review settings February 8, 2026 14:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to implement issue #1285 by introducing a per-deployment billing period selection and refactoring products to use a “default billing period” (instead of a single hardcoded product billing period).

Changes:

  • Add BillingPeriod enum and introduce products.default_billing_period (int-backed) as the new default period field.
  • Add servers.billing_period to allow overriding billing period at deployment time.
  • Update admin/product and server creation UI to use/display the new default billing period fields.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
themes/default/views/servers/create.blade.php Adds billing period selector to server creation and adjusts displayed billing period label.
themes/default/views/admin/products/index.blade.php Renames billing period column and switches datatable field to default_billing_period.
themes/default/views/admin/products/edit.blade.php Replaces legacy billing_period select with enum-driven default_billing_period.
themes/default/views/admin/products/create.blade.php Same as edit form: enum-driven default_billing_period selection.
database/migrations/2026_02_08_094845_add_billing_period_column_to_servers_table.php Adds nullable servers.billing_period.
database/migrations/2026_02_08_094217_drop_billing_period_column_of_products_table.php Drops legacy products.billing_period column (and recreates on rollback).
database/migrations/2026_02_08_084601_add_default_billing_period_column_to_products_table.php Adds products.default_billing_period and attempts to backfill from legacy values.
app/Models/Server.php Adds billing_period to $fillable for activity logging / mass assignment.
app/Models/Product.php Adds enum cast + appended label attribute for default_billing_period.
app/Http/Controllers/ServerController.php Validates and stores billing_period on created servers.
app/Http/Controllers/Admin/UserController.php Fixes missing braces in exception handling.
app/Http/Controllers/Admin/ProductController.php Validates default_billing_period and exposes it via datatable.
app/Enums/BillingPeriod.php New int-backed enum with labels/descriptions/options.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread themes/default/views/admin/products/create.blade.php Outdated
Comment thread app/Models/Server.php
Comment thread themes/default/views/servers/create.blade.php Outdated
Comment thread themes/default/views/servers/create.blade.php Outdated
Comment thread themes/default/views/servers/create.blade.php Outdated
Comment thread app/Models/Product.php
Comment thread themes/default/views/servers/create.blade.php Outdated
Comment thread app/Http/Controllers/ServerController.php
@KroZen-Dev

Copy link
Copy Markdown
Contributor

Hi! If I reviewed the pull request correctly, there's no option to enable/disable the ability to select a custom payment period. For example, if an administrator wants to create one plan with a fixed payment period and a second plan with custom periods, I think an on/off option would be very useful

@MrWeez MrWeez added the Low Priority Can wait, not urgent. Handle when possible label Mar 7, 2026
@1day2die

Copy link
Copy Markdown
Collaborator

@Ferks-FK status?

@simbabimba-dev simbabimba-dev force-pushed the development branch 2 times, most recently from f797f1d to 43325dd Compare March 27, 2026 08:48
@MrWeez MrWeez added the Blocked Cannot progress because of external reasons label Apr 11, 2026
@simbabimba-dev simbabimba-dev force-pushed the development branch 2 times, most recently from 8650200 to 32334b0 Compare April 13, 2026 13:55
@MrWeez MrWeez marked this pull request as draft May 12, 2026 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Blocked Cannot progress because of external reasons Low Priority Can wait, not urgent. Handle when possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Billing Period Selection (Hourly / Daily / Monthly) in Deployment Menu

5 participants