# Changelog

### Hetzner Datacenter module **[WHMCS](https://puqcloud.com/link.php?id=77)**

#####  [Order now](https://puqcloud.com/whmcs-module-hetzner-datacenter.php) | [Download](https://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-HetznerDatacenter/) | [FAQ](https://faq.puqcloud.com/)

#####  

##### v2.1.1 Released 08-10-2025

1. **noVNC Console Connection**
    
    
    - Fixed: `action.status` now correctly accepts both `running` and `success`.
    - Fixed: Properly parses `wss_url` to prevent duplicated host entries in the WSS URL (AJAX handler).
2. **Cloud-init Pipeline**
    
    
    - Changed: `_CreateAccount` now decodes `package_settings.user_data` from Base64 before performing variable replacement; passes a plain `#cloud-config` string to the API.
    - Changed: `requestConsole` now validates the presence of both `wss_url` and `password` instead of relying solely on strict status checks.
3. **Deep Diagnostic Logging**
    
    
    - Added: `replaceCloudInitConfigVariables` now logs input shape, detected placeholders, replacements map, output structure, and full final `user_data`.
    - Added: `createServer` logs presence, length, and headers of `user_data`, all request parameters (safe view), and structured API response (server/action).

- - - - - -

##### v2.1 Released 06-10-2025

1. **Automatic Pricing UI**
    - Added bulk selection of currencies and billing periods with instant preview table.
    - Added Base price (Net/Gross) selector and percentage margin input.
    - Preview recalculates immediately when Base price or Percentage changes.
    - Added “Automatically apply price daily” toggle.
2. **Data storage &amp; compatibility**  
    
    - Improved merge logic to prevent overwriting other saved fields.
3. **Bulk pricing logic (AJAX)**  
    
    - Automatically updates or creates missing `tblpricing` rows based on selected currencies and billing periods.
    - Applies Hetzner base price, margin, WHMCS currency rates, and period multipliers with rounding up to currency precision.
4. **Daily Cron automation**
    - Extended `DailyCronJob` to respect saved bulk pricing configuration.
    - Fetches fresh Hetzner base price once per run and applies to all selected currencies and periods.
    - Creates missing `tblpricing` rows and logs detailed status for each action.
5. **Currency and rounding policy**
    - Using Hetzner Cloud API currency (`/pricing.currency`) instead of hard-coded EUR.
    - Introduced rule: always round UP according to ISO-4217 minor units (0/2/3 decimals).
    - Unified logic: monthly price is rounded first, then multiplied by period factor and rounded again.
    - Both JS preview and server-side calculation now follow identical rounding logic.
6. **Improved server selection UI**
    - Expanded dropdown descriptions: `name – architecture – cores – memory – disk`.
7. **Admin tools for stock management**
    - Added “Clear and Reset” button in product configuration to restore `stockcontrol` and `qty` values.
8. **Fixes and resilience**
    - <article class="text-token-text-primary w-full focus:outline-none scroll-mt-[calc(var(--header-height)+min(200px,max(70px,20svh)))]" data-scroll-anchor="true" data-testid="conversation-turn-4" data-turn="assistant" data-turn-id="request-WEB:5f0d6601-af7c-4e8c-a363-41c87cb3b080-34" dir="auto" tabindex="-1">Fixed issues with potentially lost or overwritten settings.
        
        </article>
    - Handled HTML-encoded inputs safely.

- - - - - -

##### v2.0.3 Released 03-05-2025

1. Added automatic initialization of the database table during module installation and fixed related issues.
2. General optimization and stability improvements.

- - - - - -

##### v2.0.2 Released 04-04-2025

1. Automatically restores product settings if the server becomes available again.
2. Added logic for store and revert product data.
3. Refined retrieval and storage of `stockcontrol` and `qty` for quicker recovery.
4. Optimized
5. Fix some bugs

- - - - - -

##### v2.0.1 Released 17-10-2024

1. Added the ability to set the user as root in the package settings.
2. The Public Network DNS PTR list will be copied into the domain field if the field is empty.
3. Fix a bug preventing the use of SSH keys.
4. Fix a bug in handling cloud-init when saving a package.

- - - - - -

##### v2.0 Released 24-09-2024

<p class="callout info">**Module is coded ionCube v13**</p>

Supported php version:

- php 7.4 WHMCS 8.11.0 -
- php 8.1 WHMCS 8.11.0 +
- php 8.2 WHMCS 8.11.0 +

- - - - - -

##### v1.0 Released 02-09-2024

First version