Menu

A dunning run with preview, interval and customer block - plain SQL in a Uniface service
📰

A dunning run with preview, interval and customer block - plain SQL in a Uniface service

DEV Community: sql·Franz·2 days ago
#NaJj79oS
#devtosql#devto#dev#dunning#customer
Long article (2232 words) — no AI summary yet.
Reading 0:00
15s threshold

Payment reminders sound simple: find the overdue invoices, send a letter. In practice the person running the dunning wants to see first what will happen, some customers must never get a reminder (a dispute, a payment plan, a key account), and nobody wants a second reminder two days after the first.

This article walks through the dunning part of a small Uniface customer app: the selection rule, a preview that shows exactly what the run will do, a dunning block without a schema change, the run itself, and the tests. The reminders and letters themselves come from a dunning service that already existed; the new code only selects, shows and orchestrates.

Tested with Rocket Uniface 10.4.03 Community Edition (10.4.03.021) on Windows with SQLite, November 2026.

The rule

An invoice gets the next reminder when all four conditions hold:

It is open: status ISSUED or PARTLY_PAID .

Its due date is more than DUNNING_GRACE_DAYS days in the past (default 7).

Its highest reminder level so far is below 3.

It has no…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.