CalculateFinanceChargeFromRules

Calculate Finance Charge from Rules

Major Business Rule

Object Name: B03B0029

Parent DLL: CFIN

Location: Client/Server

Language: C

B03B0029
Calculate Finance Charge from Rules


Functional Description


Purpose

This business function will calculate the finance charge (delinquency fee) of the amount open based 

on the dates passed in and the information retrieved from the policy table F03B27.  The calculated 

amount returned to the calling program is in the same currency as the amount passed in.


The finance charge is calculated based on the number of days between Date - Net Due(DDJ) and Date - 

Age as of(DAG), if Date - Last Fee Calculated(LFCJ) is blank.  Otherwise, the calculation is based on 

the number of days between the Date - Last Fee Calculated and the Date - Age as of.  The finance charge 

calculated is returned to the calling program by Amount Calculated(AG).


The finance charge will not be calculated if: 

• both Calculate On Open and Calculate On Paid Late flags are off or
• the number of days late is less than Days Between Fees or
• the Last Fee Calculated Date is not blank but greater than the As Of Date or
• the As Of Date does not fall in between Start Effective Date and Ending Effective Date or
• If the number of days late of a pay item does not fall in between the Aging Begin Days and the Aging 
End Days 


Setup Notes and Prerequisites

A Due Date or a Last Fee Calculated Date is Required in order to calculate the difference between the 

dates for the purpose of exceeding the number of days between fees and the number of days to 

calculate a finance charge for.

If the Policy Number is passed in as 0, then no policy information will be checked.

As Of Date is required and cannot be blank.


Special Logic

None.


Technical Specifications


Parameters

ItemDescriptionI/OReq?Notes

PLYPolicy NumberIY

DDJDate - Net DueIY

LFCJDate - Last Fee CalculatedIY

DAGDate - Age as ofIY

AAPAmount OpenIY

LNIDPolicy Line NumberON

AGAmount - GrossOY

EV01Retroactive FeeON

EV02Compounded FeeON

EV03Calculate on OpenON

EV04Calculate on Paid LateON

EV05Collection Mgr Approval RequiredON

EV06Notify Coll. ManagerON

AIPRPriority Action ItemON

CURRCurrency CodeIYIf Currency is on.

AN8Address NumberIYIf Currency is on.

DGLDate - G/L and VoucherIYIf Currency is on.


Related Tables

F03B11Invoice Detail File

F03B25Delinquency Policies

F03B27Policy Fee File


Related Business Functions

N7000850B03B0029 - Plug & Play

B0000033Get Exchange Rate

B1100006Decimal Trigger Get By Currency

B0000027CurrencyConvForAndDom


Processing

• Fetch the policy from the policy table.  If fail, then end
• If both Calculate On Open and Calculate On Paid Late flags are off, then end
• If the Retroactive flag is on, then the CalculatedDate variable = Due Date, otherwise = Due Date 
+ Grace Day 

• If CalculatedDate is greater than As Of Date then end
• If the Last Fee Calculated Date is not blank but greater than the As Of Date, then end
• If the As Of Date subtracted by the Last Fee Calculated Date is less than the Days between fee, 
then end

• If the As Of Date does not fall in between Start Effective Date and Ending Effective Date, then 
end

• If the number of days late of a pay item does not fall in between the Aging Begin Days and the 
Aging End Days, then end

• If the Last Fee Calculated Date is not blank, change the number of days late to be the As Of Date 
subtracted by the Last Fee Calcualted Date.

• If the Retroactive flag is off, the number of days late is then subtracted by the Grace Days
• Calculate the finance charge using the formula: finance charge = ((Annual Percentage 
Rate/100)/365)*number of days late * open amount

• If the finance charge is greater than the Minimum Amount(converted to the same currency), then 
return information (Retroactive, Compounded Fee, Calculate On Open, Calculate On Paid Late, 

Collection Manager Approval Required, Notify Collection Manager, Priority Action Item) back to the caller, 

otherwise finance charge is 0


^

Data Structure

D03B0029 - Calculate Finance Charge from Rules

Parameter NameData ItemData TypeReq/OptI/O/Both
mnPolicynumberPLYMATH_NUMERICNONENONE

A number that the system assigns to each policy record to identify it.

jdDateduejulianDDJJDEDATENONENONE

In Accounts Receivable, the date that the net payment is due. In Accounts Payable, the date that the payment is due to receive a discount 
or, if no discount is offered, the net due date. The system calculates the due date based on the payment term entered, or you can enter it 
manually. If you enter a negative voucher or invoice (debit or credit memo), the system might use the G/L date as the due date regardless of the 
payment term entered. A processing option in the master business function (P0400047 for vouchers and P03B0011 for invoices) controls how 
the system calculates the due date for debit and credit memos.

jdDatelastfeecalculatedLFCJJDEDATENONENONE

The most recent date on which the fees were calculated. The system uses this date for further fee calculations, by determining the number 
of days that elapse between calculations.

jdDateageasofDAGJDEDATENONENONE

A date that the system uses to determine the aging category to which to assign an invoice. The system compares the aging date to the 
invoice date, statement date, due date, or G/L date, which is defined by the value in the Date Aging Based On field (AGE), and then uses the 
value in the Aging Method field (AGEM) to determine which aging category to update. If you use method 1, the aging categories are defined in 
the Aging Days fields (CRDY, AGR1, AGR2, AGR3, AGR4, AGR5, AGR6, and AGR7) in the Accounts Receivable constants.  If you leave this 
field blank, the system uses the current date.  Note: The Sales Order Management system also uses this date for credit checks. Leave this 
field blank to ensure that the credit checks are always current.

mnAmountopenAAPMATH_NUMERICNONENONE

The amount of an invoice or voucher pay item that is unpaid.

mnLinenumberLNIDMATH_NUMERICNONENONE

A number that identifies multiple occurrences, such as line numbers on a purchase order or other document. Generally, the system assigns 
this number,but in some cases you can override it.

mnAmountcalculatedfinancechargCFCAMATH_NUMERICNONENONE

The amount of the finance charges calculated from the amount open using the information contained in the Policy Table. This is a currency 
field but the currency does not matter because the finance charge is calculated from a percent of the total open amount. So, even if the 
amount open is in a foreign currency, the percentage still remains the same.

cRetroactivefeeRETFcharNONENONE

An option that specifies whether the system calculates delinquency fees based on the invoice due date or on the invoice due date plus the 
grace period days. If you turn this option on, the system calculates the fee based on the invoice due date, but not until the grace-period days 
have expired. The system uses this option only when the fee is calculated for the first time. The system generates subsequent fees based 
on the Date - Last Fee Calculated field and does not consider grace days.     

cCompoundedfeeCMFcharNONENONE

An option that specifies whether the system assesses a fee on unpaid delinquency fees that were previously generated. Valid settings 
are: On Assess fees on previously generated fees that are unpaid. Off Do not assess fees on previously generated fees that are unpaid.

cCalculateonopenamountsCOPNcharNONENONE

An option that indicates whether you want the system to assess fees on open invoices that are past due. Valid values are: On Assess fees 
on open invoices that are past due   Off Do not assess fees on open invoices that are past due

cCalculateonpaidlateamountsCPADcharNONENONE

An option that specifies whether the system calculates delinquency fees on invoices that are paid after their due dates. The system uses 
the Date Invoice Closed field (JCL) to determine when the invoice was paid. Valid values are: On The system generates fees on invoices that 
were paid after their due dates. Off The system does not generate fees on invoices that were paid after their due dates.

cCollectionmanagerapprovalrequCMARcharNONENONE

An option in Fee Instructions and Notification Instructions that specifies the status that the system assigns to a delinquency fee or notice. 
Valid settings are: On The system assigns a Pending status to the fee or notice. The collection manager must approve it before processing can 
be completed. Off The system assigns an Approved status to the fee or notice.

cNotifycollectionmanagerNTCMcharNONENONE

An option that indicates whether you want the system to send a workflow message to the collection manager when an invoice becomes 
overdue. 

cPriorityactionitemAIPRcharNONENONE

A code that specifies the order in which the system displays activity messages that it generates when you run statements, notices, fees, 
and so on. Valid values are 1 through 5, where 1 is the highest priority and 5 is the lowest priority.

szCurrencyCodeBaseBCRCcharNONENONE

A code that represents the currency of the company for a transaction. For a foreign currency transaction, this is the currency code of the 
domestic side of the transaction.

mnAddressNumberAN8MATH_NUMERICNONENONE

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

jdDateForGLandVoucherJuliaDGJJDEDATENONENONE

A date that identifies the financial period to which the transaction will be posted. You define financial periods for a date pattern code that you 
assign to the company record. The system compares the date that you enter on the transaction to the fiscal date pattern assigned to the 
company to retrieve the appropriate fiscal period number, as well as to perform date validations.

mnPaymentIDPYIDMATH_NUMERICOPTNONE

A number that the system assigns from Next Numbers to identify and track payment records.

cCashReceiptTranCodeTYINcharOPTNONE

A user defined code (03B/TI) that indicates the type of receipt record in the Receipts Header (F03B13) and Receipts Detail (F03B14) 
tables. Valid values are: A Applied receipt. D Draft receipt. G General ledger receipt. L Logged receipt. R Receipt rounding record. The system 
generates this record for balancing purposes when the payment of foreign invoices produces a small amount difference that occurs from 
rounding. U Unapplied receipt.

cFeesCurrencyABCOcharOPTNONE

A code that specifies whether to associate the beneficiaries with individual benefit plans. Valid values are:    1   Associate beneficiaries with 
benefit plans.    0   Do not associate beneficiaries with benefit plans.

Related Functions

N7000850 B03B0029 - Plug & Play - 03B

Related Tables

F03B11 Customer Ledger
F03B25 Delinquency Policy
F03B27 A/R Delinquency Policy Detail - Fees