P4 Software / cifraHQ

Late Fees

Late Fees

CifraHQ can automatically charge a late-fee invoice to any customer with an overdue balance. A daily background job scans every overdue invoice, calculates the fee as a percentage of the outstanding balance, posts a new fiscal invoice for that fee, submits it to your PAC, and emails it to the customer, all without manual intervention.

How to enable

Go to Setup > System > Configuration, then navigate the tree to Business > Operations > Sales > Late Fee. Configure the five settings you find there:

Setting What it does Default
Enable automatic late-fee invoice generation Master switch. Turn on to activate the daily scan. Off
Days past invoice due date before a late fee applies Grace period before the first fee is charged. An invoice overdue by fewer days than this value is skipped. 30
Late-fee rate as percentage of outstanding balance Fee amount as a percentage. 1.5 charges 1.5% of whatever is still outstanding. 1.5
SKU of the Service product used for the late-fee invoice line The SKU of an existing Service product that becomes the line item on every fee invoice. Create a dedicated "Late Fee" service product in your catalog if you don't have one already. (blank)
Email the late-fee invoice automatically to the customer billing email When on, CifraHQ emails the generated invoice PDF to the customer's billing email immediately after posting. On

All five settings save immediately - no restart required.

When fees are charged

The daily scan runs every morning. The schedule:

  1. First fee: charged when the invoice's due date is at least Grace Days in the past.
  2. Recurring fees: one additional fee per calendar month, on each monthly anniversary of the first fee's date, as long as the original invoice remains unpaid.
  3. Stop: no new fees are generated once the original invoice is fully paid, voided, or archived.
**Example:** Grace period is 30 days. Invoice due 1 January. First fee charged on 31 January. Next fee on 28 February (or the next monthly anniversary). CifraHQ uses calendar-month math that clamps correctly at month boundaries.

The job is idempotent: if it runs twice in one day, no duplicate fees are generated.

Skipped Invoices

The following are never charged a late fee regardless of settings:

  • Customers with Disable automatic late fees checked on their customer record.
  • Customers classified as Foreign Business.
  • Invoices that are Paid, Voided, or Archived.
  • Invoices with an outstanding balance of zero.
  • Invoices that are themselves a generated late-fee invoice. Once CifraHQ creates a late-fee invoice (prefix REC-), that invoice will never have a further late fee applied to it, even if it goes unpaid past its own due date. This prevents recursive late-fee compounding.

Document Numbering and prefix

Late-fee Invoices use their own document code prefix and their own auto-increment counter, separate from regular Invoices.

  • Prefix: the default value is REC- (short for "Recargo"). Codes are generated as REC-00000001, REC-00000002, and so on, independently from the INV- sequence used by manually-created Invoices.
  • Where the prefix is stored: the Business_NamingConventions_Sales_LateFeeInvoice config entry. Change it through your existing ConfigEntry workflow if you want a different prefix (for example LFE-). Existing late-fee Invoices keep the code they were originally assigned, only new ones use the new prefix.
  • Where the counter shows up: the LateFeeInvoice row appears on Settings > Document Numbering the first time a late fee is generated. From there you can adjust the next number just like Invoice, SalesOrder, or Quote.

Disabling late fees for a specific customer

Open the customer record and go to the Settings section. Toggle Disable automatic late fees on. Save. That customer is excluded from all future late-fee runs while the flag is on.

Sales > Late Fees page

Go to Sales > Late Fees to monitor and control the process.

Pending tab

Shows a live preview of every invoice that would be charged if you ran the job right now. Columns include the invoice number, customer, outstanding balance, days late, and projected fee amount. Use this to verify your configuration before the first live run.

Each row has a checkbox. Tick the Invoices you want to charge and a Process Selected button appears in the header, letting you generate late fees for only those Invoices instead of the whole list. Leave everything unchecked to keep the default behavior (process all eligible Invoices with Run now). The selection count chip in the header shows how many are picked; clear it to return to the full list.

History tab

A paginated log of every late-fee run. Each row shows:

Column Meaning
Run Date When the fee was generated
Original Invoice The overdue invoice that triggered the fee (click to open)
Generated Invoice The new late-fee invoice that was posted (click to open)
Outstanding Balance at the time of the run
Fee Amount Actual fee charged
Status Generated (success), PAC Failed (invoice posted but electronic submission failed), Email Failed (posted and submitted but email could not be sent), Generation Failed (invoice could not be posted)
Error Error detail when status is not Generated

Running manually

Click Run now at the top of the page to trigger the scan immediately for every eligible invoice. A confirmation dialog appears before anything is processed. The result summary appears below the tabs when complete.

To process only some Invoices, tick their checkboxes on the Pending tab and click Process Selected. The confirmation dialog lists the chosen invoice numbers (for up to five) or the count. Only the selected Invoices are charged; everything else is left untouched. If a selected invoice is no longer eligible by the time you confirm (for example it was paid in the meantime), it is safely skipped and reported in the Skipped count, never charged incorrectly.

Retrying failures

Rows with PAC Failed or Email Failed status show a Retry action in the row menu. Retry re-attempts only the failed step - it does not regenerate the invoice.

  • PAC Failed retry: re-submits the existing posted invoice to the PAC.
  • Email Failed retry: re-sends the invoice PDF to the customer's billing email.

Once retry succeeds the row status updates to Generated.

What the generated invoice looks like

Each late-fee invoice is a standard fiscal Invoice with:

  • Code: uses the late-fee prefix (default REC-) and the dedicated LateFeeInvoice counter, for example REC-00000001.
  • Customer: same as the original overdue invoice.
  • Product line: the Service product you configured in settings, quantity 1, price equal to the calculated fee amount.
  • Reference: the original invoice's number, for traceability.
  • Comments: a plain-language note showing the percentage and outstanding balance used.
  • Taxes: inherited from the fee product's tax configuration.
  • Currency: same as the original invoice.

The invoice goes through the full posting pipeline: GL Journal Entries are created, the PAC submission is attempted (if auto-submit is on), and the customer's balance increases.

If the posting period for today's date is locked, the invoice cannot post. The run is logged as **Generation Failed** with an error mentioning the closed posting period. Unlock the period or wait until the next open period before retrying.

Related: Invoices - Customers - System Configuration

Was this page helpful?