PUQ Mautic

Account Statement WHMCS Addon

WHMCS addon module for generating comprehensive financial statements for clients. Consolidates invoices, transactions, and credits into detailed account statements with PDF and CSV export, scheduled generation, bulk processing, and client area self-service access.

Description

Account Statement addon WHMCS

Order now | Download | FAQ

PUQ Account Statement — WHMCS Addon

PUQ Account Statement is an addon module for WHMCS that generates comprehensive financial statements for clients. It consolidates invoices, transactions, and credits into detailed account statements with PDF and CSV export, scheduled automatic generation, bulk processing, and client area self-service access.


Key Features


System Requirements

Requirement Minimum
WHMCS 8.x, 9.x
PHP 7.4, 8.1, 8.2+
ionCube Loader v13 or newer (v14, v15)

The module ships as separate ionCube-encoded builds per PHP version. Pick the build that matches your PHP:

WHMCS Supported PHP Build to use
WHMCS 8 7.4, 8.1, 8.2 php74, php81, or php82 (match your PHP)
WHMCS 9 8.2+ php82

For any PHP 8.2 or newer, always use the php82 build.


Changelog

Account Statement addon WHMCS

Order now | Download | FAQ

v1.2 — 2026-06-05

The clarity update. Your customers now see, at a glance, exactly how much they owe — in their own language and in your date format.

New Features

Improvements

Bug Fixes


v1.1 — 2026-02-25

Bug Fixes

Improvements

New Features


v1.0 — 2026-02-18

First release.

New Features

Installation and Update

Account Statement addon WHMCS

Order now | Download | FAQ

System Requirements

Requirement Minimum
PHP 7.4, 8.1, 8.2 or newer
WHMCS 8.x, 9.x or newer
ionCube Loader v13 or newer (v14, v15)

Note: The module uses ionCube encoding. Make sure ionCube Loader is installed and active on your server.

Which build do I need?

The module is distributed as separate ionCube-encoded builds, one per PHP version. The PHP version determines which build you download — an archive encoded for one PHP version will not run on another.

WHMCS Supported PHP Build to download
WHMCS 8 7.4, 8.1, 8.2 php74, php81, or php82 — match the PHP your WHMCS runs on
WHMCS 9 8.2 or newer php82

Rule of thumb: for any PHP 8.2 or newer, always use the php82 build. Use php74/php81 only if your server still runs PHP 7.4 or 8.1 (WHMCS 8 only).


Download

The module can be ordered and downloaded from PUQ Cloud:

PHP 7.4 (WHMCS 8 only):

wget https://download.puqcloud.com/WHMCS/addons/PUQ_WHMCS-Account-Statement/php74/PUQ_WHMCS-Account-Statement-latest.zip

PHP 8.1 (WHMCS 8 only):

wget https://download.puqcloud.com/WHMCS/addons/PUQ_WHMCS-Account-Statement/php81/PUQ_WHMCS-Account-Statement-latest.zip

PHP 8.2+ (WHMCS 8 and 9):

wget https://download.puqcloud.com/WHMCS/addons/PUQ_WHMCS-Account-Statement/php82/PUQ_WHMCS-Account-Statement-latest.zip

All versions are available at: https://download.puqcloud.com/WHMCS/addons/PUQ_WHMCS-Account-Statement/

After downloading, extract the archive:

unzip PUQ_WHMCS-Account-Statement-latest.zip

Installation

Step 1: Upload Files

Extract the module archive and upload the puq_account_statement directory to the WHMCS addons directory:

/your-whmcs/modules/addons/puq_account_statement/

Directory structure after upload:

modules/addons/puq_account_statement/
    puq_account_statement.php
    hooks.php
    whmcs.json
    version
    logo.png
    lib/
        puqAccountStatement.php
        StatementGenerator.php
        PdfGenerator.php
        CsvGenerator.php
    lang/
        english.php
    templates/
        ...
    templates/pdf/
        classic.tpl
        modern.tpl
        detailed.tpl
        ...
    templates/client/
        statement.tpl

Step 2: Activate the Module

  1. Log in to the WHMCS admin panel
  2. Go to Setup > Addon Modules
  3. Find PUQ Account Statement in the list
  4. Click Activate

On activation, the module creates four database tables: puq_acc_st_settings, puq_acc_st_statements, puq_acc_st_schedules, and puq_acc_st_templates.

Step 3: Configure the License Key

  1. After activation, click Configure next to the module
  2. Enter your license key in the License key field
  3. Select admin role groups that should have access to the module
  4. Click Save Changes

After saving, a verification status will appear below the license key field (e.g., success: 2027-02-18T01:32:13+01:00).

Module configuration with license key and access control 01-addon-config-license.png

Step 4: Access the Module

Go to Addons > PUQ Account Statement to access the dashboard.


Update

Step 1: Backup

Before updating, we recommend backing up:

Step 2: Upload New Files

Extract the new version and overwrite all files in:

/your-whmcs/modules/addons/puq_account_statement/

Step 3: Re-activate (if needed)

If the update adds new database columns, deactivate and re-activate the module:

  1. Go to Setup > Addon Modules
  2. Click Deactivate, then Activate again

This is safe — the module only creates tables/columns if they don't already exist. Your settings and saved statements are preserved.

Step 4: Verify

  1. Go to Addons > PUQ Account Statement
  2. Check the version number in the top-right corner of the navigation bar (e.g., v1.0.0)

Deactivation

  1. Go to Setup > Addon Modules
  2. Click Deactivate next to PUQ Account Statement
  3. Confirm the deactivation

Warning: Deactivation drops the module's database tables (puq_acc_st_settings, puq_acc_st_statements, puq_acc_st_schedules, puq_acc_st_templates). All your saved statements, schedules, templates, and settings will be lost. Export your data before deactivating if you want to preserve it.


License

The module requires an active license for full functionality. The license is verified through the PUQ Cloud license server.

How License Verification Works

Without an Active License

After Activating a License

  1. The warning banner disappears
  2. All pages and features become accessible
  3. Enter your license key in Setup > Addon Modules > PUQ Account Statement > Configure

Purchase a License

https://puqcloud.com/store/whmcs-addon-modules

https://puqcloud.com/submitticket.php

Dashboard

Account Statement addon WHMCS

Order now | Download | FAQ

The Dashboard is the home page of the module, available at: Addons > PUQ Account Statement > Dashboard

It provides a complete overview of your statement activity — key metrics, quick generation, recent statements, and upcoming schedules.

Dashboard — metrics, quick generate, recent statements, and upcoming schedules 02-dashboard.png


Key Metrics

The top section displays summary cards with color-coded borders:

Metric Description
This Month Statements Number of statements generated in the current month
Total Statements Total number of saved statements in the archive
Active Schedules Number of currently active automatic schedules
Next Scheduled Run Date and time of the next scheduled statement generation

Quick Generate

A search panel for quickly generating a statement for a specific client:

  1. Start typing a client name or email in the search field
  2. Select the client from the dropdown results (powered by Select2 with AJAX search)
  3. Click Generate to navigate to the Generate page with the client pre-selected

Recent Statements

A table showing the 10 most recently generated statements:

Column Description
Date When the statement was generated
Client Client full name
Period Statement date range (from — to)
Generated By How the statement was created: manual, schedule, or bulk
Actions View button to open the saved statement

Upcoming Schedules

A table showing up to 5 active schedules with their next run times:

Column Description
Name Schedule name
Frequency How often it runs (Daily, Weekly, Monthly, Quarterly, Yearly)
Next Run Date and time of the next execution
Status Badge: Active (green) or Inactive (gray)

Generate Statement

Account Statement addon WHMCS

Order now | Download | FAQ

The Generate page is available at: Addons > PUQ Account Statement > Generate

This is the main page for creating individual account statements for a specific client.

Generate Statement — parameters and preview 03-generate.png


Generate from a Client's Profile

You can also start a statement directly from a client's profile. Open Clients > select a client, and on the Summary tab use the Account Statement panel and click Generate Account Statement. This opens the Generate page with the client pre-selected.

Generate Account Statement button on the client profile Summary tab 21-admin-client-profile.png


Statement Parameters

Client Selection

Use the search field to find a client by first name, last name (or both together), company, email, or client ID. The field uses Select2 with AJAX search — start typing to see results. Searching a full name such as "John Smith" matches first name + last name in any order.

Tip: You can navigate here from the Dashboard's Quick Generate feature, which pre-selects the client.

Date Range

Set the date range for the statement using:

Include Options

Select which financial data to include in the statement:

Option Description
Paid Include paid invoices
Unpaid Include unpaid/outstanding invoices
Refunded Include refunded invoices
Transactions Include payment transactions
Credits Include credit entries

Advanced Filters

Filter Description
Payment Methods Filter invoices by payment gateway (multi-select). Leave empty for all
Product Groups Filter invoices by product group (multi-select). Leave empty for all

Actions

View Statement

Click View Statement to generate and display the statement preview inline on the page. The preview shows the rendered HTML statement with all sections.

Reading the balance: The summary shows two distinct figures — Account Credit (the credit available on the client's WHMCS account) and the Closing Balance, which is the outstanding amount. A negative Closing Balance means the client owes that amount, and it always ties out with the Debit and Credit columns. The Open Balance line carries forward any unpaid invoices from before the statement period and can be hidden via Settings → Show Open Balance.

Language & dates: Statements (preview, PDF, and CSV) are generated in the client's own language when available — falling back to the system language, then English. Dates follow your WHMCS Global Date Format.

Download PDF

Click Download PDF to generate and download the statement as a PDF file. The PDF uses the template configured in the Settings page.

Download CSV

Click Download CSV to generate and download the statement data as a CSV file for import into spreadsheets or accounting software.


Statement Preview Actions

After viewing a statement, additional action buttons appear in the preview header:

Action Description
Save to Archive Save the statement to the saved statements archive for future reference
Send to Client Send the statement to the client via email with PDF attachment
Generate Link Generate a public shareable link (copied to clipboard automatically)

Statement preview with action buttons 04-generate-preview.png

Saved Statements

Account Statement addon WHMCS

Order now | Download | FAQ

The Saved Statements page is available at: Addons > PUQ Account Statement > Saved Statements

This page shows all previously saved account statements with filtering, pagination, and management tools.

Saved Statements — list with filters and actions 05-saved-statements.png


Filters

The top panel provides search and filter options:

Filter Description
Client Search for a specific client by name or email (Select2 AJAX search)
Date From Filter statements created from this date
Date To Filter statements created up to this date
Generated By Filter by generation method: All, Manual, Schedule, or Bulk

Click Filter to apply the filters and reload the results.


Statements Table

The main table lists saved statements with the following columns:

Column Description
# Statement ID
Client Client name, company name, and email
Period Statement date range (from — to)
Generated By How the statement was created: manual, schedule, or bulk
Generated At Timestamp when the statement was generated
Status Badge: Active (green) or expired status
Actions Action buttons (see below)

Actions Per Statement

Each statement row has the following action buttons:

Button Icon Description
PDF file-pdf Download/view the statement as PDF (opens in new tab)
CSV file-csv Download the statement data as CSV
Send envelope Send the statement to the client via email with PDF attachment
Copy Link link Generate a public shareable link and copy it to clipboard
Delete trash Delete the saved statement (requires confirmation)

Pagination

When there are more statements than the configured per-page limit (default: 25), pagination controls appear at the bottom of the table with page numbers and previous/next navigation.


Auto-Cleanup

Saved statements can be automatically deleted after a configurable number of days. This is set in Settings > Auto Cleanup Days. Set to 0 to disable auto-cleanup.

Bulk Generate

Account Statement addon WHMCS

Order now | Download | FAQ

The Bulk Generate page is available at: Addons > PUQ Account Statement > Bulk Generate

This page allows you to generate statements for multiple clients at once with a single operation.

Bulk Generate — client filter, options, and progress 06-bulk-generate.png


Client Filter

Choose which clients to generate statements for:

Option Description
All Clients Generate for every client in the system
By Client Group Filter by WHMCS client group (dropdown appears for selection)
By Country Filter by client country (dropdown appears for selection)
With Unpaid Invoices Only clients that have outstanding unpaid invoices

When selecting By Client Group or By Country, a dropdown field appears to select the specific group or country.


Date Range & Options

Date Range

Set the statement period using:

The default period is set to Last Month.

Include Options

Same checkboxes as the Generate page:

Actions

Choose what to do with each generated statement:

Action Description
Save to Archive Save each statement to the saved statements archive (checked by default)
Send Email Send each statement to the respective client via email with PDF attachment

Workflow

Step 1: Count Clients

Click Count Clients to see how many clients match your filter criteria. The result appears next to the button (e.g., "42 clients matched").

Step 2: Start Bulk Generate

After counting, the Start Bulk Generate button becomes enabled. Click it and confirm the operation.

Step 3: Monitor Progress

A progress bar appears showing:

The bulk operation processes clients in batches of 10 for optimal performance and to avoid timeouts.

Step 4: Review Results

After completion, a results panel shows:

Metric Description
Clients Processed Total number of clients processed
Statements Generated Number of statements successfully created
Emails Sent Number of emails sent (if email option was enabled)
Errors Number of errors encountered during processing

Schedules

Account Statement addon WHMCS

Order now | Download | FAQ

The Schedules page is available at: Addons > PUQ Account Statement > Schedules > All Schedules

This page manages automated statement generation schedules. Schedules run automatically via WHMCS cron.

Schedules — list of configured schedules 07-schedules.png


Schedules Table

The table lists all configured schedules with the following columns:

Column Description
Name Schedule name for identification
Frequency How often it runs: Daily, Weekly, Monthly, Quarterly, Yearly
Client Filter Target clients: All, By Group, By Country, or With Unpaid Invoices
Next Run Date and time of the next scheduled execution
Last Run Date and time of the most recent execution
Status Badge: Active (green) or Inactive (gray)
Actions Action buttons (see below)

Actions Per Schedule

Button Icon Description
Edit edit Open the schedule editor to modify settings
Run Now play Execute the schedule immediately without waiting for the next scheduled time
Toggle power-off Enable or disable the schedule
Delete trash Delete the schedule (requires confirmation)

Creating a New Schedule

Click the Add New button at the top or go to Schedules > Add Schedule in the navigation menu.

See the Schedule Editor page for details on configuring a schedule.


How Schedules Work

Schedules are executed by the WHMCS cron job. When a schedule's next run time is reached:

  1. The module identifies matching clients based on the schedule's client filter
  2. For each client, a statement is generated for the configured period
  3. Depending on the schedule's output settings, statements are saved to archive and/or emailed to clients
  4. The schedule's next run time is updated based on its frequency
  5. Execution details are logged for reference

Schedule Editor

Account Statement addon WHMCS

Order now | Download | FAQ

The Schedule Editor page is available at: Addons > PUQ Account Statement > Schedules > Add Schedule (or click Edit on an existing schedule)

This page allows you to create or edit an automated statement generation schedule.

Schedule Editor — configure automated statement generation 08-schedule-edit.png


General Settings

Setting Description
Name A descriptive name for the schedule (e.g., "Monthly Client Statements")
Frequency How often the schedule runs: Daily, Weekly, Monthly, Quarterly, Yearly
Period Type What period the statement covers: Last Month, Last Quarter, Last Year, or Custom

Client Filter

Choose which clients receive statements when the schedule runs:

Filter Description
All Clients Generate for every client
By Client Group Only clients in a specific WHMCS client group
By Country Only clients from a specific country
With Unpaid Invoices Only clients with outstanding invoices

When selecting By Client Group or By Country, a text field appears to enter the filter value.


Include Options

Configure what financial data to include in the generated statements:

Advanced Filters

Filter Description
Payment Methods Only include invoices paid via specific gateways (multi-select, leave empty for all)
Product Groups Only include invoices for specific product groups (multi-select, leave empty for all)

Output

Configure what happens with each generated statement:

Option Description
Save to Archive Save the statement to the saved statements archive (checked by default)
Send Email Send the statement to the client via email with PDF attachment

Saving

Click Save Schedule to create or update the schedule. After saving a new schedule, the page reloads with the schedule ID in the URL for future editing.

Click Cancel to return to the schedules list without saving.

PDF Style

Account Statement addon WHMCS

Order now | Download | FAQ

The PDF Style page is available at: Addons > PUQ Account Statement > Configuration > PDF Style

This page allows you to customize the appearance and content of generated PDF statements.

PDF Style — template editor with typography, colors, and display options 09-pdf-style.png


General

An informational note that PDF layout and orientation are determined by the PDF template selected in the Settings page. The Style editor controls visual appearance within the selected template.


Typography

Setting Description
Font Family Choose the PDF font: Helvetica, Times, Courier, DejaVu Sans, Free Serif
Font Size Base font size in points (6–24, default: 10)

Tip: Use DejaVu Sans or Free Serif for full Unicode character support (Cyrillic, Asian characters, etc.).


Colors

Setting Description
Primary Color Main color used for headings, table headers, and accents (default: #337ab7)
Secondary Color Secondary color for subtitles and less prominent text (default: #555555)
Header Background Background color for table header rows (default: #f5f5f5)

Display Options

Toggle which sections appear in the generated PDF:

Option Description
Show Logo Display the company logo at the top of the statement
Company Details Show company name, address, and contact information
Client Details Show client name, address, and contact information
Summary Show the financial summary section (totals for invoices, transactions, credits)
Aging Report Show the aging report section for overdue invoice analysis
Statement Table Show the detailed statement table with individual line items
Balance Show the running balance and final balance totals

Custom Content

Setting Description
Header Text Custom text displayed at the top of the statement (below the logo/company info)
Footer Text Custom text displayed at the bottom of the statement
Custom CSS Additional CSS styles applied to the PDF. Use for fine-tuning fonts, spacing, borders, etc.

Preview

Click the Preview button to generate a sample PDF with the current (unsaved) settings. This opens the PDF in a new browser tab so you can review changes before saving.

Note: The preview uses current unsaved settings, allowing you to experiment without affecting live statements.


Saving

Click Save Template to save all style settings. These settings apply globally to all PDF statements generated by the module.


PDF Template Examples

The module includes several built-in PDF templates. The template is selected in Settings > PDF Template.

Classic (Portrait)

Traditional bank statement layout with bordered table and alternating rows.

Classic PDF template — portrait orientation 12-pdf-classic.png

Classic (Landscape)

Same classic layout in landscape orientation, showing more columns.

Classic PDF template — landscape orientation 13-pdf-classic-landscape.png

Modern (Portrait)

Clean modern design with color-coded summary cards and running balance column.

Modern PDF template — portrait orientation 14-pdf-modern.png

Detailed (Portrait)

Comprehensive layout with full company details, client information, and detailed transaction table.

Detailed PDF template — portrait orientation 15-pdf-detailed.png

Modern (Landscape)

Modern layout in landscape orientation with expanded column space.

Modern PDF template — landscape orientation 16-pdf-modern-landscape.png

Summary (Landscape)

Executive summary format with color-coded totals and compact transaction table.

Summary PDF template — landscape orientation 17-pdf-summary-landscape.png


Custom PDF Templates

You can create custom PDF templates by adding .tpl files to the templates/pdf/ directory.

PDF templates directory structure 18-pdf-templates-tree.png

Each template file must start with a PHP comment header that defines its metadata:

<?php
// Template: My Custom Template
// Orientation: P
// Paper: A4
// Description: My custom statement layout

PDF template code structure 19-pdf-template-code.png

Template Header Fields

Field Description
Template Display name shown in the Settings dropdown
Orientation P for Portrait, L for Landscape
Paper Paper size: A4, Letter, etc.
Description Optional description shown as tooltip

Available Template Variables

Templates receive the following variables:

Variable Description
$config Style settings (colors, fonts, display options) from the PDF Style page
$company Company details (name, address, logo, tax info)
$statement Statement data (client info, period, invoices, transactions, credits, summary)

After adding a new template file, it automatically appears in the Settings > PDF Template dropdown.

Settings

Account Statement addon WHMCS

Order now | Download | FAQ

The Settings page is available at: Addons > PUQ Account Statement > Configuration > Settings

This page controls the module's global settings including client area access, defaults, PDF template selection, email configuration, and advanced options.

Settings — general, defaults, client area, email, and advanced options 10-settings.png


General

Setting Description
Enable Client Area Allow clients to access the Account Statement page in the client area
Add to Billing Menu Show an "Account Statement" link in the client area billing navigation menu
Show Payment Method Show the payment method / gateway column in statements (admin preview, PDF, and CSV). Disable to hide it everywhere
Show Open Balance Show the Open Balance line on statements. Disable to show only the Account Credit and Closing (amount owed) figures

Defaults

Default Date Range

Set the default date range preset that is used when a client opens the statement page:

Option Period
This Month First to last day of the current month
Last Month First to last day of the previous month
This Quarter First day of current quarter to today
Last Quarter First to last day of the previous quarter
This Year January 1 to December 31 of current year
Last Year January 1 to December 31 of previous year

Default Include Options

Set which financial data types are included by default when generating statements:


PDF Template

Setting Description
PDF Template Select the PDF layout template for generating statements. Available templates include Classic, Modern, Detailed — in Portrait or Landscape orientation

The dropdown is dynamically populated from template files in the templates/pdf/ directory. Each option shows the template name and orientation.


Client Area

Setting Description
Client Area URL The direct link to the client area statement page (read-only, with copy button)
Client Can Download PDF Allow clients to download PDF versions of their statements
Client Can Download CSV Allow clients to download CSV versions of their statements

Email

Setting Description
Email Template Select which WHMCS email template to use when sending statements to clients
Create (+) Click the + button to create the default "Account Statement" email template in WHMCS if it doesn't exist yet

The dropdown is populated with all available WHMCS General email templates.

Email Example

When a statement is sent to a client (manually, via bulk, or via schedule), they receive an email with a PDF attachment and a summary of the statement:

Email with account statement — PDF attachment and summary 20-email-statement.png

The email includes:


Advanced

Setting Description
Statement Expiry Days Number of days before shared statement links expire. Set to 0 for links that never expire (default: 30)
Auto Cleanup Days Automatically delete saved statements older than this many days. Set to 0 to disable auto-cleanup (default: 90)
Per Page Number of records per page in statement lists (5–100, default: 25)

Saving

Click Save Settings to save all configuration changes.

Client Area

Account Statement addon WHMCS

Order now | Download | FAQ

This page describes the client-facing Account Statement functionality available in the WHMCS client area.


Accessing the Client Area Page

Clients can access their Account Statement page in two ways:

  1. Direct URL — navigate to https://your-whmcs.com/index.php?m=puq_account_statement
  2. Billing Menu — if "Add to Billing Menu" is enabled in Settings, a link appears in the client area billing navigation

Note: The client area page is only available when "Enable Client Area" is checked in the module Settings.

When "Add to Billing Menu" is enabled, clients reach the page from Billing > Account Statement in the client area navigation:

Account Statement link in the client area Billing menu 22-client-billing-menu.png

Client Area — account statement generation and saved statements 11-client-area.png


Generate Statement

The top section allows clients to generate their own account statements:

Date Range

Include Options

Checkboxes to select what financial data to include:

Action Buttons

Button Description Visibility
View Generate and display the statement preview inline Always visible
Download PDF Download the statement as a PDF file Only if "Client Can Download PDF" is enabled in Settings
Download CSV Download the statement data as a CSV file Only if "Client Can Download CSV" is enabled in Settings

Statement Preview

After clicking View, the generated statement is displayed inline below the form. The preview shows the same rendered HTML statement that administrators see.

Client area statement preview with summary 23-client-area-preview.png


Saved Statements

The bottom section shows the client's previously saved statements (generated by admin, schedule, or bulk operations):

Column Description
Date When the statement was generated
Period Statement date range (from — to)
Generated By How the statement was created: manual, schedule, or bulk
Actions Download buttons and view link

Actions Per Saved Statement

Button Description Visibility
PDF Download the statement as PDF Always visible
CSV Download the statement as CSV Only if "Client Can Download CSV" is enabled
View Open the statement via public link (if available) Only if statement has an access hash

Pagination

When there are multiple pages of saved statements, pagination controls appear below the table with page numbers and previous/next navigation.


Important Notes