Skip to content

File tree

1 file changed

+150
-0
lines changed

1 file changed

+150
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
= Introducing Business Date into Fineract
2+
3+
For banks, Apache Fineract is introducing transaction idempotency, business and
4+
effective date configuration as an addition to the currently supported
5+
6+
* System date
7+
* Tenant date
8+
* User-provided date
9+
10+
Bank business date or business day can be any day when a bank is open to the
11+
public for all of its business. Business date may or may not
12+
depend on a few things:
13+
14+
* Region
15+
* Location
16+
* Government
17+
* Country
18+
* Circumstantial conditions
19+
20+
As an example, business date can exclude weekends or government holidays. Bank
21+
may decide to close on a day as per circumstances with due notice as regulated
22+
by regulatory bodies, authorities, or government. Bank can also open itself for
23+
specific operations for the public and not everything on a open day.
24+
25+
Business date can be also termed as business day, defining a full operations day
26+
of bank per date independent of the physical calendar.
27+
28+
With Fineract, customers and developers can now integrate business date into the
29+
bank functionalities.
30+
31+
= Features
32+
33+
Customers and developers can now:
34+
35+
* Enabling closing of business day
36+
* Having closing of business day relevant operations
37+
* Supporting logical date management
38+
* Define their own business date operations and boundaries
39+
* Closing a business day i.e., partially or completely limiting usual operations.
40+
* Testing purpose.
41+
42+
Business date can be used in every situation where the transaction date/value
43+
date is not provided by the user or the user-provided date shall be validated.
44+
45+
* Opening date
46+
* Closing date
47+
* Disbursal date
48+
* Transaction/Value date
49+
* Submitted date
50+
* Reversal date
51+
52+
This excludes audit purposes:
53+
54+
* Created on date
55+
* Updated on date
56+
57+
= How to enable business date as a functionality
58+
59+
Business date functionality can be added using Fineract job or using API. Both
60+
of these performs proper checks and output outcome parameter for the customers
61+
and developers. These also support timezones, daylight savings.
62+
63+
== Job
64+
65+
This depends on defining the closing of business day (CoB) operations. Customers
66+
and developers can now:
67+
68+
* Scheduled job
69+
70+
As an example:
71+
72+
```POST /fineract-provider/api/v1/jobs/<job_id>?command=executeJob``
73+
74+
== API
75+
76+
Customers and developers can now manage business date using API calls.
77+
78+
79+
= Business date use case scenarios
80+
81+
== Apply for loan
82+
83+
* Tenant date
84+
* Business date
85+
* Submitted on date
86+
* Outcome: SUCESS/FAILURE
87+
* Message
88+
* Reason
89+
* Loan application details
90+
91+
92+
== Repayment for a loan
93+
94+
* Tenant date
95+
* Business date
96+
* Transaction date
97+
* Outcome: SUCCESS/FAILURE
98+
* Loan transaction details
99+
* Submitted on date
100+
* Transaction date
101+
* Created on date
102+
103+
= Business date code examples
104+
105+
== Increase Business date by 1 day
106+
107+
```
108+
{
109+
110+
IF (ENABLE_BUSINESS_DATE == TRUE) {
111+
//VALIDATION
112+
IF (ACTUAL_BUSINESS_DATE == null) {
113+
THROW ERROR;
114+
}
115+
IF (ENABLE_AUTOMATIC_COB_DATE_ADJUSTMENT == TRUE) {
116+
NEW_COB_DATE = ACTUAL_BUSINESS_DATE;
117+
}
118+
NEW_BUSINESS_DATE = ACTUAL_BUSINESS_DATE + 1 DAY;
119+
}
120+
}
121+
```
122+
123+
== API:
124+
125+
Fetch business date using:
126+
127+
`GET /fineract-provider/api/v1/businessdates/BUSINESS`
128+
129+
130+
```json
131+
132+
Response
133+
{
134+
"type": "BUSINESS",
135+
"date": [2022, 5, 13]
136+
}
137+
```
138+
139+
= Business date specifics
140+
141+
== Business date type name
142+
143+
* Type
144+
* Locale
145+
* DateFormat
146+
* DateValue
147+
148+
== Business date configuration domain service
149+
150+
* isBusinessDateEnabled()

0 commit comments

Comments
 (0)