-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Cost tracking should be optional but can be used to determine P/L.
Scope
DB changes
- Add optional cost fields to
ip_range:cost_per_ip: monthly cost per IP address (smallest currency units)cost_currency: currency code (e.g.USD,EUR)
- Add optional cost fields to
vm_host:monthly_cost: recurring monthly cost of the host (rent/colo fee)investment_cost: one-time capital cost (hardware purchase) for break-even calculationcost_currency: currency code
Admin API
PATCH /api/v1/admin/ip-range/{id}— setcost_per_ip,cost_currencyPATCH /api/v1/admin/host/{id}— setmonthly_cost,investment_cost,cost_currency
P/L calculation (to be specified in a follow-up issue)
- Total monthly cost = sum of host monthly costs + (IPs assigned × cost_per_ip for each range)
- Total monthly revenue = sum of active VM renewal amounts (already tracked in
vm_payment) - Break-even tracking =
investment_costamortised against cumulative profit
Notes
- All cost fields are optional — omitting them means no cost data for that resource (no behaviour change)
- Currency conversion will be needed when costs and revenues are in different currencies — defer to follow-up
- Cost data is admin-only; never exposed to end users
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request