PUQ Mautic

Admin Area

PUQ Account Statement module WHMCS Order now — Download — Community This chapter describes all management actions and configurations available in the WHMCS admin area for the PUQ Account Statement module.

Admin Area Overview

PUQ Account Statement module WHMCS

Order now | Download | Community

This page provides an overview of the administrative interface and actions available to administrators.

Accessing the Admin Area

To access the admin area of the module:

  1. Log in to your WHMCS Admin Area.
  2. Navigate to Addons > PUQ Account Statement

Management Actions

The admin interface allows performing the following actions:

Settings

Explain settings and tools:

Screenshot

Admin area interface overview 02-dashboard.png

Dashboard

PUQ Account Statement module WHMCS

Order now | Download | Community

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

PUQ Account Statement module WHMCS

Order now | Download | Community

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

PUQ Account Statement module WHMCS

Order now | Download | Community

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

PUQ Account Statement module WHMCS

Order now | Download | Community

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

PUQ Account Statement module WHMCS

Order now | Download | Community

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.


Sending All Outstanding Unpaid Invoices

To configure a recurring schedule that automatically sends statements with all unpaid invoices (regardless of the year the invoice was issued):

  1. Click Add New (or edit an existing schedule).
  2. In General Settings:
    • Enter a Name (e.g., Weekly Outstanding Invoices Reminder).
    • Select your desired Frequency (e.g., Weekly or Monthly).
    • Select Period Type as All Unpaid Invoices (or All Time).
  3. In Client Filter:
    • Select With Unpaid Invoices. This ensures only clients with unpaid balances are selected.
  4. In Include Options:
    • Check Unpaid only.
    • Uncheck Paid, Refunded, Transactions, and Credits so the statement focuses strictly on the unpaid balance and does not include historical paid items.
  5. In Output:
    • Check Send Email (and optionally Save to Archive).
  6. Click Save Schedule.

[!TIP] When using All Unpaid Invoices, the module inspects all invoices from 1970-01-01 to the current date, ensuring unpaid invoices from prior years (2025, 2026, 2027, etc.) are never missed. If a client has zero unpaid invoices, the module automatically skips them and does not send empty emails.


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

PUQ Account Statement module WHMCS

Order now | Download | Community

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 Week, Last Month, Last Quarter, Last Year, All Time, or All Unpaid Invoices

[!TIP] All Unpaid Invoices Period Type: Choosing All Unpaid Invoices sets the statement to cover all unpaid and overdue invoices regardless of when they were issued (from 1970-01-01 to current date). This ensures clients with unpaid invoices from any prior or current year (e.g., 2025, 2026, 2027) will see all their outstanding balances in one clean statement. Pair this with the With Unpaid Invoices client filter and check only Unpaid under Include Options.


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

PUQ Account Statement module WHMCS

Order now | Download | Community

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

PUQ Account Statement module WHMCS

Order now | Download | Community

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)

Database Verification

The module provides an automated database maintenance and verification tool.

Database Verification — schema inspection and repair 24-database-verification.png

Action Description
Check and Update Database Schema Non-destructively inspects all module database tables (puq_acc_st_settings, puq_acc_st_statements, puq_acc_st_schedules, puq_acc_st_templates, puq_license) and automatically creates any missing tables or columns. Useful after upgrading module files to ensure new database columns are properly added without data loss.

Saving

Click Save Settings to save all configuration changes.