The maximum number of dunning levels is 4. In case the first level is not flagged as reminder, the maximum number of levels is 3.

+

The maximum number of dunning levels is 4. In case the first level is not flagged as reminder, the maximum number of levels is 3. When the maximum level is reached, the dunning key of the receivable is set to 99.

=== Business Rule BR-DUN-030: No sub-sequent key for the current key ===

=== Business Rule BR-DUN-030: No sub-sequent key for the current key ===

Introduction

This document describes detailed requirements of the dunning module.
It is split in two main areas:

User Stories area describes all requirements related to new windows and processes.

Gaps area describes all changes to be developed on existing Openbravo functionalities.

Each area includes a description of the user story or the gap, and some sub-sections related to user interfaces and business rules.
Each requirement element (a story, a gap, a user interface, a business rule) is assigned a unique code.

User Stories

User Story US-DUN-001: Dunning Keys Setup

As a financial user, I can enter the dunning keys window and define a new key.
I assign the code 15 for the organization California, the name “Dunning 15” and I set coming into effect to 20 days. This is a dunning key which is a sub-sequent key for another one. Therefore, I save the record and create a new one, code 14, name “Dunning 14”, I select 15 from the sub-sequent key list, and I set coming into effect to 30 days. If I want to configure a key that is the last one in a dunning case, I can select 00 or 99 as sub-sequent key.

User Interface UI-DUN-001: Dunning key

Name

Widget Type

Data Type

Length

Default

Constraint

Mandatory

Client

Drop-Down List

Reference to list of clients

Yes

Organization

Drop-Down List

Reference to list of organizations

Yes

Name

Text

String

60

Yes

Key

Text

String

2

Just digits, if one digit is entered, a leading 0 is added

Yes

Sub-sequent key

Drop-Down List Reference to list of keys

The list includes just keys of the same client/organization, plus the default keys '00' and '99'

Yes

Coming into effect

Number

Integer

2

30

Range between 1 and 99

Yes

Dunning Fee

Number

Decimal 2,2 (Percentage)

No

Dunning Cost

Number

Decimal 2,2 (Money)

Active

Check-Box

Boolean

True

Yes

Business Rule BR-DUN-001: Dunning key mandatory fields

It is not possible to create a dunning key if at least one of the following field is not filled: key, name, sub-sequent key, coming into effect.

Business Rule BR-DUN-002: Uniqueness of dunning key

It is not possible to create a dunning key with the same code of another key for the same client/organization.

Business Rule BR-DUN-003: Sub-sequent keys must exist

It is not possible to set a sub-sequent key if the corresponding key does not exist in the same client/organization.

Business Rule BR-DUN-004: Circularity of dunning keys is not possible

It is not possible to create a chain of sub-sequent keys which generates a circularity. As an example, if 13 is sub-sequent of 12, and 12 is sub-sequent of 11, 11 cannot be sub-sequent of 13.

Business Rule BR-DUN-032: Cannot be created keys 00 and 99

It is not possible to create a key with code 00 or 99. These keys are already pre-loaded at the setup of each organization including "*".

User Story US-DUN-002: Setup Base Interest Rates

As a financial user, I can enter the base interest rate. Base interest rates can be defined just on 1st Jan and 1st July of each year.

User Interface UI-DUN-003: Base Interest Rates

Name

Widget Type

Data Type

Length

Default

Constraint

Mandatory

Client

Drop-Down List

Reference to list of clients

Yes

Organization

Drop-Down List

Reference to list of organizations

Yes

Date

Date

Date

Only 01/01 and 01/07 are allowed

Yes

Rate

Number

Decimal

2,2

Yes

Active

Check-Box

Boolean

True

Yes

Business Rule BR-DUN-013: It is not possible to have gaps exceeding 6 months

When entering a new base interest rate, the new date cannot exceed 6 months from the most recent date. As an example, if the last rate was entered on 01/01/2010, the user can enter a new record with date 01/07/2010, cannot enter 01/01/2011 or any past date.

User Story US-DUN-003: Start a dunning run

As a financial user, I can execute a dunning run. I set a date that will be used as reminder date and select a type of receivable. I also need to select either the level or the key (or both). I then press the search button and retrieve all dunnings meeting the parameters being entered.
I can select which of the retrieved dunnings are included in this run and then press the process button. I am finally presented with a short message informing that the process is completed.
The process is described in the user story US-DUN-004.

User Interface UI-DUN-004: Dunning Run

Note that the header of the select column in the search table must be a check-box too to be used to quickly select/unselect all records.

Name

Widget Type

Data Type

Length

Default

Constraint

Mandatory

Client

Drop-Down List

Reference to list of clients

Yes

Organization

Drop-Down List

Reference to list of organizations

Yes

Reminder Date

Date

Date

Current date

Must greater or equal to the the current date

Yes

Type of Receivable

Drop-Down List

List of {Private, Public}

Yes

Level

Drop-Down List

List of {1, 2, 3}

No

Key

Drop-Down List

Reference to dunning keys

No

Search

Button

Not enabled until either dunning level or dunning key has not been selected.

Search Results

Search Table

Table

All select check-box are true for all records. Not visible until the user has not pressed the Search button.

Process

Button

Enabled only if at least one dunning is selected in the search result table.

Search table specification
All the fields of the search table cannot be edited but the selection of the select check-box.

Name

Widget Type

Data Type

Length

Default

Constraint

Mandatory

Select

Check-Box

Boolean

True

Receivable

Link

Link to the receivable

Type

Text

String

Due Date

Date

Date

Dunning Date

Date

Date

Granted Deferral

Date

Date

Outstanding Amount

Number

Decimal

Business Rule BR-DUN-014: Minimum parameters to search dunnings

It is not possible to search dunning cases if the user has not selected either a dunning level or a dunning key, or both. Moreover it is mandatory to select the type of receivable. If private the application will filter dunning cases of customers subject to private law, if public the application will filter dunning cases of customers subject to public law.

Business Rule BR-DUN-015: Reminder date cannot be in the past

It is not possible to execute a dunning run if the reminder date is in the past.

Business Rule BR-DUN-017: Dunning key 00 and 99

All receivables whose dunning key is 00 or 99 are not displayed in the search result.

Business Rule BR-DUN-018: Search by dunning key

In case a dunning key has been selected as a parameter, all receivables whose dunning key match the selected dunning key and the current date is greater than the dunning date are retrieved.

Business Rule BR-DUN-019: Search by dunning level

In case a dunning level has been selected as a parameter, all receivables whose dunning level is equal to the selected level minus 1 and the current date is greater than the dunning date are retrieved.

Business Rule BR-DUN-020: Search by dunning level and key

In case both a dunning level and dunning key have been selected as a parameters, both rules BR-DUN-018 and BR-DUN-019 are applied in “and” condition.

User Story US-DUN-004: Dunning run process

After the user has pressed the dunning run button, the application performs the following steps.

Case 1: Type Public

This step is executed only if the type of the receivable is public (customer subject to public law) and only if the current dunning key associated to the receivable is not flagged as reminder.

If it's the first time this receivable is dunned, the application calculates the dunning fee and creates a receivable for the dunning fee.
The application calculates the fine for late payments and creates a receivable for the fine.

Case 2: Type Private

This step is executed only if the type of the receivable is private (customer subject to private law) and only if the current dunning key associated to the receivable is not flagged as reminder.

The application calculates the interest on arrears and creates a receivable for the interests.
The application calculates the dunning costs and creates a receivable for the dunning costs.

Case 3: Deferral

This step is executed only if the current date is greater than the granted deferral date, if a granted deferral date for a receivable has been set and if the current dunning key is not flagged as reminder. This step is executed regardless of the type of the receivable.

The application calculates interests on deferral and creates a receivable for the interest.

Whatever is the applied case, the application assigns the receivable a new dunning key (the sub-sequent key of the current key) and increases the level by one. In case of the first dun, being the dunning level not set for the receivable, the new dunning level will be 1.
The new dunning date is calculated by adding the coming into effect days of the new dunning key to previous dunning date (see BR-DUN-016). The application records a new entry in the dunning history and creates the dunning file.

Business Rule BR-DUN-033: How to get dunning configuration

In order to get the general dunning configuration relevant for a receivable (dunning case), the application takes into account the dunning configuration for the same organization set for the receivable. If a dunning configuration is not defined for the organization, the application searches up in the organization hierarchy until a dunning configuration is found.
If a dunning configuration is not found, the application skips the processing of the dunning case and writes a warning at the end of the process.

Business Rule BR-DUN-021: Parameters of new receivables

When the application creates new receivables for fees, interests, costs, etc., these receivables are linked to the same invoice from the originating receivable, the same type, level, key and dunning date are assigned, and the due date is set at the current date. The total amount of these receivables is flagged as not paid.

Business Rule BR-DUN-022: Dunning file format and location

TBD

Business Rule BR-DUN-023: Calculation of dunning fees

The application gets the dunning fee for the current dunning key. If no dunning fee is set for the dunning key, the application gets the dunning fee from the general dunning configuration (base percentage of dunning fee section in the window Dunning Configuration). The application also gets the minimum and maximum charge from the dunning configuration.

The dunning fee is calculated as (outstanding amount x dunning fee) rounded to the second decimal digit.
In any case, the dunning fee amount cannot be below the minimum charge or above the maximum charge.

As an example, assuming that the base rate for dunning fee is 0,5%, minimum amount is € 4,00, maximum amount is € 75,00, if the outstanding amount is € 1000, then the dunning fee is € 5,00; if the outstanding amount is € 500, although the result of the calculation is € 2,50, the dunning fee will be € 4,00; as well, if the outstanding amount is € 50000, although the result of the calculation is € 250,00, the dunning fee will be € 75,00.

Business Rule BR-DUN-024: Calculation of fines for late payment

The application gets the fine percentage, rounding and minimum default days from the general dunning configuration.

The application calculates the number of whole months from the due date. In order to perform this calculation, retrieve the number of days between the current date and the due date, then divide by 30 and round up the result to the first whole number. As an example, if the dunning date is May 5th and the current date is July 16th, the number of whole months is 3, in fact the period includes 72 days, if you divide by 30 you get 2,4 which turns in 3 when rounded up to the first whole number.
No fines are applied before the minimum number of default days after the dunning date. In the example above, if the dunning date is June 4th, no fines can be applied before June 10th, assuming that the minimum default days is set to 6.
Retrieve the outstanding amount and calculate the base amount for fine by rounding down the outstanding amount based on the rounding parameter. In order to perform this calculation, calculate the whole division of the outstanding amount by the rounding amount, then multiply the result for the rounding amount.

As an example assume that the outstanding amount is € 115 and rounding is set to € 50,00, then the base amount for fine is (€ 115,00 / € 50,00) = 2 --> 2 x € 50,00 = € 100,00.

The fine is calculated as (base amount x fine percentage x number of whole months). According to the example above, that is an outstanding amount of € 115,00 with due date May 5th and current date July 16th, and assuming the fine percentage is configured to 1,0%, then the fine will be (€ 100 x 0,01 x 2) = € 2,00.

Business Rule BR-DUN-025: Calculation of interest on arrears

The application gets the private and business person percentages from the general dunning configuration.

Calculate the total interest to be applied, by summing the base interest rate to the spread (private percentage in case of private person, business percentage in case of business person). The base interest rate is the last available.
Calculate the number of days between the due date and the current date. As an example, if the due date is May 5th and the current date is June 16th, the number of days is 42.
Calculate the interest by applying the formula ((outstanding amount x total interest) / 360 x number of days). The result is rounded to the second decimal digit. As an example, assuming the outstanding amount is € 115,00, the base interest is 0,12% at Jan 1st, the dunning customer is a private person, the private percentage is 5,0%, and the number of days is 42, then the interest on arrears will be ((€ 115,00 x (0,12% + 5%) / 360 x 42) = € 0,69.

If the dunning procedure continues through several rates of the base interest default, the interest on arrears must be split for each rate. This is explained with the following example. The base rate is 0,12 from Jan 1st, and 0,15 from Jul 1st. Assume that the due date is May 5th and the current date is July 16th. In this case we have to distinguish two periods, a period starting May 5th until June 30th (56 days) with base interest rate 0,12%, another period starting July 1st until July 16th (16 days) with base interest rate 0,15%. The interest is calculated with the following formula: ((€ 115,00 x (0,12% + 5%) / 360 x 56) + ((€ 115,00 x (0,15% + 5%) / 360 x 16) = € 0,92 + € 0,26 = € 1,18. Rounding is applied separately to the two periods.
If a period includes full 6 months, the total number of days for this period must be assumed to be 180.

Business Rule BR-DUN-026: Calculation of dunning costs

The application gets the dunning cost for the current dunning key. If no dunning cost is set for the dunning key, the application gets the dunning cost from the general dunning configuration (amount of dunning cost section in the window Dunning Configuration).

Business Rule BR-DUN-027: Calculation for deferral

The application gets the deferral spread from the general dunning configuration (spread of deferral spread section in the window Dunning Configuration).

If the current date is before the granted deferral date, no deferral interest must be calculated. Otherwise:
The application calculate the total interest to be applied, by summing the deferral spread to the base interest rate. The base interest rate is the last available.
Then it calculate the number of days between the due date and the current date. As an example, if the due date is May 5th and the current date is June 16th, the number of days is 42.
It calculate the interest by applying the formula ((outstanding amount x total interest) / 360 x number of days). The result is rounded to the second decimal digit. As an example, assuming the outstanding amount is € 115,00, the base interest is 0,12% at Jan 1st, the deferral spread is 2,0%, and the number of days is 42, then the interest on deferral will be ((€ 115,00 x (0,12% + 2%) / 360 x 42) = € 0,28.
If the dunning procedure for deferral continues through several rates of the base interest default, the same rules as describes in BR-DUN-025 steps 4 and 5 must be followed.

Business Rule BR-DUN-028: History Record

If the dunning case’s level is 0, this is the first dunning run involving this case, therefore a new entry is recorded in the dunning history. It must be recorded the reference to the receivable, the dunning run date for level 1, the dunning key for level 1.
If the dunning case’s level is above 0, the dunning history entry must updated by recording the dunning run date and the dunning key for the relevant level.

Business Rule BR-DUN-029: Maximum number of levels

The maximum number of dunning levels is 4. In case the first level is not flagged as reminder, the maximum number of levels is 3. When the maximum level is reached, the dunning key of the receivable is set to 99.

Business Rule BR-DUN-030: No sub-sequent key for the current key

If the current dunning key for a receivable being processed by a dunning run is not configured with a sub-sequent key, the new dunning key will be set to 00 and no dunning date is calculated. This receivable will not be subject to a dunning run anymore.

User Story US-DUN-005: View Dunning History

User Story US-DUN-006: Setup Dunning Configuration

As a financial user, I can setup parameters for dunning runs.

User Interface UI-DUN-009: Window Name

Name

Widget Type

Data Type

Length

Default

Constraint

Mandatory

Client

Drop-Down List

Reference to list of clients

Yes

Organization

Drop-Down List

Reference to list of organizations

Yes

Private Person

Number

Decimal 2,2 (Percentage)

5,0%

Yes

Business Person

Number

Decimal 2,2 (Percentage)

8,0%

Yes

Base Percentage

Number

Decimal 2,2 (Percentage)

0,5%

Yes

Minimum Charge

Number

Decimal 2,2 (Money)

4,00

Yes

Maximum Charge

Number

Decimal 2,2 (Money)

75,00

Yes

Fine Percentage

Number

Decimal 2,2 (Percentage)

1,0%

Yes

Rounding

Number

Decimal 2,2 (Money)

50,00

Yes

Minimum Default Days

Number

Integer

6

Yes

Amount

Number

Decimal 2,2 (Money)

Yes

Description

Text

String

Yes

Spread

Number

Decimal 2,2 (Percentage)

3,0%

Yes

Active

Check-box

Boolean

true

Yes

User Story US-DUN-007: Customer Dunning Configuration

As a user, when setting up a customer data, I can configure dunning setup. The configuration includes if the customer is subject to private or public law. In case it is subject to private law, I can define if the customer is a private person or a public person. I can then assign a dunning key and optionally and just for private law customers I can force a specific interest spread.
It is important noting that I can create different dunning configuration for different organizations.

User Interface UI-DUN-008: Customer Dunning Configuration

This is a nested tab of the Customer tab of the Business Partner window.

Name

Widget Type

Data Type

Length

Default

Constraint

Mandatory

Subject to private law

Check-box

Boolean

false (it means the customer is subject to public law)

Yes

Private Person

Check-box

Boolean

false (it means the customer is a business person)

This field is visible only if the flag subject to private law is checked.

Yes

Dunning key

Drop-Down List

Reference to list of dunning keys

No

Override Interest Rate Spread

Check-box

Boolean

false (it means that standard interest spreads are applied)

This field is visible only if the flag subject to private law is checked.

Yes

Interest Rate Spread

Number

Decimal 2,2 (Percentage)

It is shown the standard interest spread according if the customer is private or public

This field is visible only if the flag Override Interest Rate Spread is checked.

Yes

Business Rule BR-DUN-005: Customer dunning key must not be sub-sequent

It is not possible to assign a dunning key to a customer if this dunning key is a sub-sequent key of another key (that's to say the key is a root key). However it is always possible to assign keys 00 and 99.

Business Rule BR-DUN-031: One customer dunning configuration for each organization

It is not possible to create more than one customer dunning configuration for a given organization.

User Story US-DUN-008: Generate Dunning Report

TO BE COMPLETED

Gaps

Gap GP-DUN-002: Create Invoice Header

As a user, when setting up a customer data, I can configure the dunning key of the customer and if it is a private or business person.

User Interface UI-DUN-006: Invoice Header

Name

Widget Type

Data Type

Length

Default

Constraint

Mandatory

Dunning key

Drop-Down List

Reference to list of dunning keys

When a user selects a business partner, the dunning key is automatically selected to the dunning key of the customer, if any.

No

Business Rule BR-DUN-007: Invoice dunning key must not be sub-sequent

It is not possible to assign a dunning key to an invoice if this dunning key is a sub-sequent key of another key.

Business Rule BR-DUN-008: Invoice dunning key can’t belong to a different organization

It is not possible to assign a dunning key to an invoice if this dunning key is defined on an organization different from the organization of the invoice.

Gap GP-DUN-003: Automatic generation of invoice from sales order

When a sales order is completed, if the document type is POS Order or Pre-Paid order, the application automatically generates a completed invoice. In this case, the dunning key of the invoice will be the dunning key of the relevant customer.
In case the document type is Return Material, although the application automatically creates an invoice (a negative invoice), the dunning key must not be linked to this invoice, being dunning immaterial for payables.

Gap GP-DUN-004: Invoice generation processes

When the user generates invoices by means of the Generate Invoices or Generate Invoices from Sales Order Processes, the application automatically generates a completed invoice. In this case, the dunning key of the invoice will be the dunning key of the relevant customer.

Gap GP-DUN-005: Generation of receivable for invoice

When an invoice is completed, the application generates a receivable. The dunning key must be set as the dunning key of the invoice, the dunning level must be set to 0.
The application sets the type of the receivable (TBC).

User Interface UI-DUN-007: Payment tab

Name

Widget Type

Data Type

Length

Default

Constraint

Mandatory

Dunning key

Drop-Down List

Reference to list of dunning keys

No

Dunning Level

Number

Integer

1

Read-Only

No

Type

Drop-Down List

Read-Only

Business Rule BR-DUN-009: Receivable dunning key must not be sub-sequent

It is not possible to “manually” assign a dunning key to a receivable if this dunning key is a sub-sequent key of another key.

Business Rule BR-DUN-010: Receivable dunning key can’t belong to a different organization

It is not possible to assign a dunning key to a receivable if this dunning key is defined on an organization different from the organization of the receivable.

Business Rule BR-DUN-011: Dunning keys can’t be defined for payable

It is not possible to assign a dunning key to a payable.

Business Rule BR-DUN-012: Receivable sub-sequent dunning key can’t be changed by the user

It is not possible to change a dunning key which is a sub-sequent key, then automatically assigned by the application. This rule can also be read as it is not possible to change a dunning key of a receivable if the dunning level is strictly greater than 0.

Business Rule BR-DUN-016: Dunning Date

The application sets the dunning date of the receivable according to the following rule.
If no dunning key is set for the receivable the dunning date is left null.
Otherwise, the application retrieves the coming into effect days from the dunning key and adds this number of days to the due date of the receivable. If the dunning date falls in a non-business day, the application moves the dunning date to the next day, and so on until a valid business day is found. A business day is any date from Monday to Friday with the exception of the non business days as defined in the relevant fiscal calendar of the organization.