Compare commits
499
Commits
1f7cd4d293
...
121f945af5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
121f945af5 | ||
|
|
b48bc62691 | ||
|
|
4b392a830c | ||
|
|
9fe16ecb11 | ||
|
|
eb6e85eb99 | ||
|
|
4452b45425 | ||
|
|
7f4c1b6ea5 | ||
|
|
c2a9da951a | ||
|
|
2f04750650 | ||
|
|
62b78c122c | ||
|
|
b12d7551e5 | ||
|
|
8fcdd3443f | ||
|
|
b9efbb5580 | ||
|
|
5fd83722ed | ||
|
|
8d58cb8a84 | ||
|
|
3324e2318c | ||
|
|
e3c6c84c3e | ||
|
|
43fe7265f5 | ||
|
|
e782a8b416 | ||
|
|
7ee6a22df5 | ||
|
|
fca10c9c5b | ||
|
|
221e3439ad | ||
|
|
583fbf8459 | ||
|
|
874d6845d0 | ||
|
|
20908a80ac | ||
|
|
bc0323be91 | ||
|
|
ef57e7167b | ||
|
|
c17364a897 | ||
|
|
f1a74827bf | ||
|
|
722f11354f | ||
|
|
693172d07f | ||
|
|
a46ebaa001 | ||
|
|
aae2e50acd | ||
|
|
d5498b92ae | ||
|
|
4b01f3f669 | ||
|
|
6f63a33ef4 | ||
|
|
ce971b246e | ||
|
|
c9e3e06e17 | ||
|
|
546400c387 | ||
|
|
666362f159 | ||
|
|
26bed02096 | ||
|
|
a3dc8ff378 | ||
|
|
051e0372f5 | ||
|
|
fffa2fa952 | ||
|
|
a8fe964fad | ||
|
|
12abc17a88 | ||
|
|
28f0c80b84 | ||
|
|
5b1b917d04 | ||
|
|
dcad3955e1 | ||
|
|
2c42d926cc | ||
|
|
49ac64020a | ||
|
|
6f55953384 | ||
|
|
e4c604004c | ||
|
|
ad51a6b62f | ||
|
|
ee223dab61 | ||
|
|
c6fc2aa1ce | ||
|
|
d17e783617 | ||
|
|
5237061ce0 | ||
|
|
4387d25559 | ||
|
|
313f8c51a1 | ||
|
|
f37b2ea2ae | ||
|
|
aa8a6873e0 | ||
|
|
bb12ed1c45 | ||
|
|
ae9b812d8c | ||
|
|
0ea0ea662a | ||
|
|
385c1e7fe5 | ||
|
|
a8d31aacc9 | ||
|
|
9ee36e42f5 | ||
|
|
8d61042005 | ||
|
|
436e9d7952 | ||
|
|
297df3b750 | ||
|
|
6d04dadd6b | ||
|
|
1873e73aa8 | ||
|
|
b29d9423dd | ||
|
|
c849ac04fd | ||
|
|
fcbbeee3fb | ||
|
|
43722131b8 | ||
|
|
3e04aa5dff | ||
|
|
69c2885175 | ||
|
|
d9368ee3b0 | ||
|
|
b9de8455e3 | ||
|
|
4e8177ff86 | ||
|
|
4c5cbb38bb | ||
|
|
b33bb5583e | ||
|
|
e5b42aa296 | ||
|
|
1bc0963be9 | ||
|
|
20705e5e63 | ||
|
|
99ecf67993 | ||
|
|
d95d5764e7 | ||
|
|
e32bebf7d6 | ||
|
|
a6b94bcfb8 | ||
|
|
2dd0087d87 | ||
|
|
eb0651e838 | ||
|
|
5da24f6281 | ||
|
|
abbff93950 | ||
|
|
c3a9132f16 | ||
|
|
bb278855cf | ||
|
|
c902fa5808 | ||
|
|
f839f1f38b | ||
|
|
2ef53a6589 | ||
|
|
c869abcaab | ||
|
|
0aaf2681f8 | ||
|
|
9010ae6a80 | ||
|
|
94e11c2dea | ||
|
|
bf7c531851 | ||
|
|
a941bbdded | ||
|
|
be4a9a9f69 | ||
|
|
2e75240784 | ||
|
|
f00d212e8f | ||
|
|
8fe439698c | ||
|
|
8fc9651410 | ||
|
|
1b1b628690 | ||
|
|
fa59a1eddc | ||
|
|
7e9fc03dc5 | ||
|
|
cf20cae7d7 | ||
|
|
628a6d778b | ||
|
|
e42b3bb524 | ||
|
|
b764082717 | ||
|
|
1d9d4a5118 | ||
|
|
b72c0074e6 | ||
|
|
d2eac27f5f | ||
|
|
b898a657a4 | ||
|
|
1a694096af | ||
|
|
5fa55031c1 | ||
|
|
23b0cb75e2 | ||
|
|
178952cc8b | ||
|
|
b2c225efe7 | ||
|
|
5db999b5ba | ||
|
|
678728c2b7 | ||
|
|
4f83102834 | ||
|
|
fda126474c | ||
|
|
f283acad5a | ||
|
|
ced8811011 | ||
|
|
7ec60c9eba | ||
|
|
db5c91fea8 | ||
|
|
58eda88327 | ||
|
|
8f3a607067 | ||
|
|
48233290e4 | ||
|
|
7b2c769b63 | ||
|
|
d4c75a7667 | ||
|
|
95713f2777 | ||
|
|
876bca05d2 | ||
|
|
7f2b5ee810 | ||
|
|
c28ea2b4fc | ||
|
|
a4f8b5cdfa | ||
|
|
bde74b8e24 | ||
|
|
f56f748ac0 | ||
|
|
69d923d135 | ||
|
|
78845348a1 | ||
|
|
a71dea0766 | ||
|
|
7982cbeb2b | ||
|
|
fb71820c5c | ||
|
|
c008ed7ff1 | ||
|
|
c3224c5e11 | ||
|
|
62ff19e0d2 | ||
|
|
45be083ddb | ||
|
|
ee6df1fbc3 | ||
|
|
8d702705b7 | ||
|
|
86bb794f41 | ||
|
|
8189d5ac50 | ||
|
|
b602ca0b00 | ||
|
|
71de48414f | ||
|
|
50cf269bac | ||
|
|
4e934ae0a0 | ||
|
|
97f681244a | ||
|
|
14589590a6 | ||
|
|
1aa309c465 | ||
|
|
122e63254c | ||
|
|
4b885019b3 | ||
|
|
c6048f928c | ||
|
|
a999cdf8af | ||
|
|
8b20c562bf | ||
|
|
dd29b41aab | ||
|
|
b371526214 | ||
|
|
cb698466f6 | ||
|
|
5e3a10bf2b | ||
|
|
fc829a48f1 | ||
|
|
c2a5f8de61 | ||
|
|
348b469652 | ||
|
|
83c6442c4b | ||
|
|
f915222c23 | ||
|
|
d414e677d6 | ||
|
|
3019f28371 | ||
|
|
5094f8b89e | ||
|
|
95cc4c6365 | ||
|
|
3c9184bf1c | ||
|
|
7c91a3a83b | ||
|
|
10ad444668 | ||
|
|
6c091489d2 | ||
|
|
799dcfb4e3 | ||
|
|
dfd0bed94c | ||
|
|
6def2fd978 | ||
|
|
cd1af19601 | ||
|
|
c1ce9a5d33 | ||
|
|
0ae342211a | ||
|
|
5527d59620 | ||
|
|
bf6eb00b6a | ||
|
|
4d50d4b583 | ||
|
|
92d882565f | ||
|
|
ce0e52e387 | ||
|
|
41e7f2b915 | ||
|
|
e6293c3651 | ||
|
|
423f8bf07a | ||
|
|
371352cc5f | ||
|
|
1a521852a0 | ||
|
|
f6b071cc17 | ||
|
|
7a05bb6b6a | ||
|
|
8ed65fc734 | ||
|
|
0393ed5017 | ||
|
|
7faaee70b4 | ||
|
|
8b89c9a584 | ||
|
|
256cdd3c47 | ||
|
|
fa80413d5e | ||
|
|
c58d541279 | ||
|
|
2d2028bb69 | ||
|
|
6527e8d459 | ||
|
|
7fc4fd12e4 | ||
|
|
59f1c0ce8a | ||
|
|
b3d7b98f08 | ||
|
|
6dda7180cf | ||
|
|
b64ec8addb | ||
|
|
8690bbbc47 | ||
|
|
8c81fe7fc1 | ||
|
|
f0ee892050 | ||
|
|
106fc2d56d | ||
|
|
af1f5de611 | ||
|
|
44d864e7aa | ||
|
|
232426fd42 | ||
|
|
d797a53d1f | ||
|
|
5c49c54206 | ||
|
|
cdcba05040 | ||
|
|
30fd2faff6 | ||
|
|
6a8eb79e97 | ||
|
|
4d7106c28e | ||
|
|
dd145c7fc1 | ||
|
|
989a869eb8 | ||
|
|
5672ce1722 | ||
|
|
3e1a32cb3c | ||
|
|
83cf141f57 | ||
|
|
fd8ab3e072 | ||
|
|
3edceae00d | ||
|
|
3dc08ed5ba | ||
|
|
8054592990 | ||
|
|
9a83c5097e | ||
|
|
f4574ce858 | ||
|
|
af3d917441 | ||
|
|
ac9c6a792b | ||
|
|
ed0bbff7ee | ||
|
|
5ac5af1c6a | ||
|
|
23197537fa | ||
|
|
4e0b70aee2 | ||
|
|
435e0a0259 | ||
|
|
8d53d854e0 | ||
|
|
8733e10729 | ||
|
|
6ce926f01f | ||
|
|
4d419c3e45 | ||
|
|
97daba62cb | ||
|
|
be304ae4b2 | ||
|
|
792877ef8c | ||
|
|
720b1f49af | ||
|
|
18ee622a03 | ||
|
|
d7bbdad075 | ||
|
|
066adccc44 | ||
|
|
881ddf9c07 | ||
|
|
d259ca3448 | ||
|
|
5bff72fe87 | ||
|
|
96c535a8b6 | ||
|
|
06f2da8443 | ||
|
|
379d052a6c | ||
|
|
740906300b | ||
|
|
b4daa22510 | ||
|
|
47feb800ab | ||
|
|
efbb1e3b2f | ||
|
|
52051865ee | ||
|
|
8e0427d633 | ||
|
|
997fd4d3e2 | ||
|
|
4059e1900a | ||
|
|
c62ee07d45 | ||
|
|
86a9badb56 | ||
|
|
16996b5e8c | ||
|
|
59580e6f3b | ||
|
|
d2036447b1 | ||
|
|
e99834bd83 | ||
|
|
5ce21c9b32 | ||
|
|
c332e7037f | ||
|
|
d858221e3a | ||
|
|
68c58da786 | ||
|
|
0e4d0b4cfc | ||
|
|
c05a0dc1d7 | ||
|
|
bd93ce67ea | ||
|
|
a18197d15b | ||
|
|
15311f6425 | ||
|
|
9c1f9cd912 | ||
|
|
14c8eabdcc | ||
|
|
01d0772261 | ||
|
|
90169da8e4 | ||
|
|
4dbd0cf7fd | ||
|
|
7478e17f3c | ||
|
|
3a5b95bc25 | ||
|
|
bc41c58947 | ||
|
|
b373458f57 | ||
|
|
6683e0e9ca | ||
|
|
8ef012826c | ||
|
|
eb082d5ec5 | ||
|
|
4d473ac4db | ||
|
|
c08d163562 | ||
|
|
14e5504588 | ||
|
|
7f062a394b | ||
|
|
ffa5435765 | ||
|
|
96789be7ad | ||
|
|
42a2428774 | ||
|
|
e2c4ce9a13 | ||
|
|
721a12c2fa | ||
|
|
2d4050de12 | ||
|
|
94150b91ad | ||
|
|
17454ce21a | ||
|
|
6933cdfafb | ||
|
|
afaa4ba372 | ||
|
|
b5d6c163c6 | ||
|
|
c1b6e59f0a | ||
|
|
0ec17a6c1d | ||
|
|
421623359e | ||
|
|
7db939a971 | ||
|
|
18d65f2890 | ||
|
|
042df1a3b1 | ||
|
|
da50121437 | ||
|
|
a55f17c7b5 | ||
|
|
7680ca8284 | ||
|
|
07f4f1430d | ||
|
|
3d69e7fe55 | ||
|
|
ebd1de95fb | ||
|
|
f86ffd81ab | ||
|
|
6c5b751f10 | ||
|
|
ee43ea9643 | ||
|
|
5f5074a768 | ||
|
|
27dc2a9650 | ||
|
|
9cff637e16 | ||
|
|
683ba2ad76 | ||
|
|
89a28c8901 | ||
|
|
90427e7c0b | ||
|
|
81e02c497d | ||
|
|
badfc547a7 | ||
|
|
c896e3d1bd | ||
|
|
fb8fd9c91f | ||
|
|
418790f59e | ||
|
|
14251f425b | ||
|
|
af8a0b4209 | ||
|
|
c9976e92fa | ||
|
|
7b408b9bc6 | ||
|
|
e3a0aa71a4 | ||
|
|
5b53c7f8ed | ||
|
|
9705761bdb | ||
|
|
6a6f576a61 | ||
|
|
2d0bc0390c | ||
|
|
2ef76e174f | ||
|
|
df8a2eb4a2 | ||
|
|
813b8292b0 | ||
|
|
1173aa855d | ||
|
|
b859ea3c3a | ||
|
|
65efe649b2 | ||
|
|
56d7761554 | ||
|
|
17c7eb8da4 | ||
|
|
2b5b3249a6 | ||
|
|
a11161208d | ||
|
|
14968ba220 | ||
|
|
c3cc584c02 | ||
|
|
2582f8925c | ||
|
|
7343b54bd8 | ||
|
|
f91bbc9e5d | ||
|
|
4d6820333f | ||
|
|
2725ff1c4c | ||
|
|
fe8992ee19 | ||
|
|
8f13475076 | ||
|
|
a44585454e | ||
|
|
5d0feaece1 | ||
|
|
a60b2f221d | ||
|
|
f5b2a27628 | ||
|
|
5596efcf55 | ||
|
|
fd63749085 | ||
|
|
bee72af096 | ||
|
|
4de397cf1c | ||
|
|
133590c54a | ||
|
|
dd5a1cf995 | ||
|
|
dbde325c27 | ||
|
|
58900e4375 | ||
|
|
63a1310d44 | ||
|
|
25709269b6 | ||
|
|
7987c29960 | ||
|
|
2634a1a464 | ||
|
|
86a123b702 | ||
|
|
021a6b38de | ||
|
|
3e10423e86 | ||
|
|
24bbd13716 | ||
|
|
135933c65e | ||
|
|
596ff161b0 | ||
|
|
4e489fa3e6 | ||
|
|
bf841ebb16 | ||
|
|
c7f12d9eb3 | ||
|
|
959889175e | ||
|
|
dca5d0b36b | ||
|
|
8a86289c9d | ||
|
|
4712a1e3a9 | ||
|
|
38dd9a7e09 | ||
|
|
485d6f10e3 | ||
|
|
9755b94a48 | ||
|
|
e14a8bbe1f | ||
|
|
f206f20eca | ||
|
|
d097ef966c | ||
|
|
57791b8f37 | ||
|
|
2dba94f198 | ||
|
|
f11fe9cdef | ||
|
|
8145887f31 | ||
|
|
1272e5c852 | ||
|
|
ce22d5dcb5 | ||
|
|
8b4de075a2 | ||
|
|
ce11cbbeb5 | ||
|
|
0d18ddc034 | ||
|
|
6c28c684c2 | ||
|
|
40126a0ae2 | ||
|
|
4b0307b293 | ||
|
|
5332d4b98a | ||
|
|
28c9a0ba53 | ||
|
|
0fb77461e9 | ||
|
|
6c04f5d520 | ||
|
|
97b8dab831 | ||
|
|
e55a37fe1a | ||
|
|
db9a5b6d16 | ||
|
|
f9ff58b4be | ||
|
|
23a24e8607 | ||
|
|
495c4b7109 | ||
|
|
581e003285 | ||
|
|
d1031555ce | ||
|
|
e63c26194c | ||
|
|
f8f697cc17 | ||
|
|
052eb845c9 | ||
|
|
c99d2f6114 | ||
|
|
49eed78d57 | ||
|
|
d71d9b6b2e | ||
|
|
de818af7b3 | ||
|
|
c5f7b9c325 | ||
|
|
a52698c8db | ||
|
|
c594a00163 | ||
|
|
6810906feb | ||
|
|
a76a268560 | ||
|
|
1114a3b5ca | ||
|
|
7b7b2cf1da | ||
|
|
381b096cac | ||
|
|
295eefc579 | ||
|
|
21b7eeca33 | ||
|
|
9bc31cf8ae | ||
|
|
a93d307e20 | ||
|
|
e8b8cf4f8a | ||
|
|
d8913ab758 | ||
|
|
aaeec4e9f3 | ||
|
|
3fbd32918f | ||
|
|
5a2acd7897 | ||
|
|
b93cdaaa82 | ||
|
|
95647fea1b | ||
|
|
ef1d0e2219 | ||
|
|
4319fdb512 | ||
|
|
176facea13 | ||
|
|
50628ad943 | ||
|
|
187c37437e | ||
|
|
d5b790f202 | ||
|
|
d17aec1eb2 | ||
|
|
99adb3e2fa | ||
|
|
e0119ea230 | ||
|
|
2dc27fa4eb | ||
|
|
d3915703a5 | ||
|
|
857d7a70be | ||
|
|
93db849d39 | ||
|
|
56fdd170ca | ||
|
|
0caf255a60 | ||
|
|
17cc35d27a | ||
|
|
d5ef1033c3 | ||
|
|
339b95e615 | ||
|
|
23b079f4a6 | ||
|
|
0070dfa611 | ||
|
|
950f6a5f44 | ||
|
|
92f3c1474e | ||
|
|
cedd05b0bc | ||
|
|
61b6bbf3f9 | ||
|
|
5d9a93c7d7 | ||
|
|
574cd2f7d8 | ||
|
|
74a5cafc6c | ||
|
|
5573a0f8c4 | ||
|
|
834ee8f76e | ||
|
|
4826c181a7 | ||
|
|
03f4644a61 | ||
|
|
cf3c030db7 | ||
|
|
f107d185e8 | ||
|
|
c73ac95466 | ||
|
|
20bcd8bd6c | ||
|
|
7476d9775b | ||
|
|
b70f2e06b4 | ||
|
|
b35d7a6249 | ||
|
|
b27b574d76 | ||
|
|
f9f55b8b3a | ||
|
|
bc85e81316 |
+340
-1
@@ -5,13 +5,352 @@ See VERSIONING (https://github.com/openMF/mifosx/blob/master/VERSIONING.md) for
|
||||
|
||||
Releases
|
||||
===============
|
||||
|
||||
1. 20 July 2013 - 1.6.0.RELEASE
|
||||
1. 14 July 2013 - 1.5.0.RELEASE
|
||||
1. 25 Jun 2013 - 1.4.1.RELEASE
|
||||
1. 20 Jun 2013 - 1.4.0.RELEASE
|
||||
1. 10 Jun 2013 - 1.3.0.RELEASE
|
||||
1. 06 Jun 2013 - 1.2.1.RELEASE
|
||||
1. 27 May 2013 - 1.2.0.RELEASE
|
||||
1. 24 May 2013 - 1.1.4.RELEASE
|
||||
1. 22 May 2013 - 1.1.3.RELEASE
|
||||
1. 19 May 2013 - 1.1.2.RELEASE
|
||||
1. 12 May 2013 - 1.1.1.RELEASE
|
||||
1. 09 May 2013 - 1.1.0.RELEASE
|
||||
1. 08 May 2013 - 1.0.1.RELEASE
|
||||
1. 07 May 2013 - 1.0.0.RELEASE
|
||||
1. 30 April 2013 - 0.12.1.beta
|
||||
2. 30 April 2013 - 0.11.4.beta
|
||||
1. 22 April 2013 - 0.12.0.beta
|
||||
1. 17 April 2013 - 0.11.3.beta
|
||||
1. 10 April 2013 - 0.11.2.beta
|
||||
1. 05 April 2013 - 0.11.1.beta
|
||||
1. 05 April 2013 - 0.11.0.beta
|
||||
|
||||
1.6.0.RELEASE
|
||||
=============
|
||||
Feature (and Bug) Release
|
||||
|
||||
This Feature release focussed on various improvements to the Savings functionality as requested by Musoni, support for defining working days and the beta version of the batch jobs scheduler along with minor bug fixes
|
||||
|
||||
Platform & API
|
||||
|
||||
Bug
|
||||
- [MIFOSX-400] - If one withdrawal is made between two deposits and amount equal to sum of 2 deposits it is accepting, (Though all 3 transactions happened in different dates)
|
||||
- [MIFOSX-404] - In Transactions -> Savings account activity table interest displayed is inconsistent.
|
||||
- [MIFOSX-412] - If only interest amount is balance in savings account, Compound interest is not getting calculated for that amount in future dates.
|
||||
- [MIFOSX-469] - In Groups unable to activate the created group
|
||||
- [MIFOSX-489] - If "New loan application" is submitted for an inactive client under Groups, no proper error message is displayed about the approval status, also activation of the client.
|
||||
- [MIFOSX-551] - For Groups, Loan First Repayment date is taking after expected disbursement date than actual disbursement date.
|
||||
- [MIFOSX-552] - Group Loan is getting disbursed on meeting date if holiday is declared on that day.
|
||||
- [MIFOSX-558] - In modify loan application, am able to define an "application submitted on date" after the loan product's "close date"
|
||||
|
||||
New Features & Improvements
|
||||
- [MIFOSX-406] - Provide ability to edit all details of pending savings account application
|
||||
- [MIFOSX-541] - Introduce application process around savings accounts similiar to loan accounts
|
||||
- [MIFOSX-543] - Support working days in loan lifecycle
|
||||
- [MIFOSX-550] - Ability to View Holidays
|
||||
|
||||
Reference App
|
||||
- [MIFOSX-500] - Select Applicable Codes from a Combobox while creating new Data Tables
|
||||
- [MIFOSX-549] - Loan Product inactivation date improvements
|
||||
|
||||
1.5.0.RELEASE
|
||||
=============
|
||||
Feature (and Bug) Release
|
||||
|
||||
This feature (and bug) release focussed on adding support for Holidays and various improvements and bug fixes for Group Functionality
|
||||
|
||||
Platform & API
|
||||
|
||||
Bug
|
||||
- [MIFOSX-443] - Additional data tables added to groups are appearing for Centers
|
||||
- [MIFOSX-471] - Group activation is accepting dates prior to office opening
|
||||
- [MIFOSX-491] - In data table, if string length is more than the defined length, no error message is displayed
|
||||
- [MIFOSX-493] - For groups, in "Change Loan Application" page not able to modify the "Product" (ie modified product details not getting updated/saved)
|
||||
- [MIFOSX-494] - If any changes are made in "Change loan application" (For group loan), the loan cannot be approve (multiple pages popup for single click on "Approve" tab.)
|
||||
- [MIFOSX-498] - Searched "Center" is behaving as Group entity
|
||||
- [MIFOSX-516] - No/Incorrect error messages on "Register Data Table" screens
|
||||
- [MIFOSX-519] - In "add code" page if already existing Code name is entered in the field, no proper error message is displaying
|
||||
- [MIFOSX-521] - Not able to disburse the Group Loan
|
||||
- [MIFOSX-522] - In add new group form if activation date field is empty, showing connection failure on the UI.
|
||||
- [MIFOSX-525] - Not able to select an existing client as Guarantor
|
||||
- [MIFOSX-526] - Issues with fields in Add Guarantors Page
|
||||
- [MIFOSX-527] - In "New loan application" / "Change loan application" not able to add Collaterals
|
||||
- [MIFOSX-528] - For a loan, same guarantor can be associated more than once.
|
||||
- [MIFOSX-529] - For the loan under "Pending Approval" stage not able to edit or delete (already added) collaterals.
|
||||
- [MIFOSX-531] - Able to approve loans for a Closed client. (ie, client got closed after submitting "new loan application")
|
||||
- [MIFOSX-533] - Able to associate closed clients with Groups
|
||||
- [MIFOSX-534] - In Client's page not able to assign staff from parent office
|
||||
- [MIFOSX-536] - Client search doesn't work at all at present and should support not only account no but also search by any part of client name
|
||||
|
||||
New Features & Improvements
|
||||
- [MIFOSX-76] - Support for Holidays
|
||||
- [MIFOSX-438] - Allow closing of clients
|
||||
- [MIFOSX-486] - Show loanofficers at higher hierarchical level in client product template
|
||||
- [MIFOSX-518] - Capture "Repayments rescheduled to" date for a holiday and add processed field
|
||||
- [MIFOSX-212] - loan cycle concept for loans
|
||||
- [MIFOSX-499] - Inactivate a loan Product
|
||||
- [MIFOSX-537] - Ability to display "Note" related to client in Client's page and "note" related to Loan in Loan's page
|
||||
- [MIFOSX-475] - Regenerate loan repayment dates if group meeting frequency is changed
|
||||
- [MIFOSX-361] - Inconsistent "From Date" and "To Date" formats in View Journal Entry Screens
|
||||
- [MIFOSX-362] - Date format is not similar In Balance Sheet as in other pages.
|
||||
|
||||
Reference App
|
||||
- [MIFOSX-535] - Client details screen centers on screen when there are many notes - it should align to top
|
||||
- [MIFOSX-309] - Move Global Search to end of the Header
|
||||
- [MIFOSX-530] - Connection fail message is displayed by clicking on delete button in Add/Edit code value page
|
||||
- [MIFOSX-483] - Support wizard view for Loan Product creation
|
||||
- [MIFOSX-476] - Group permissons (in portfolio grouping) makes reference UI grotesque
|
||||
|
||||
1.4.1.RELEASE
|
||||
=============
|
||||
Bug Release
|
||||
|
||||
Platform & API
|
||||
|
||||
Bug
|
||||
- [MIFOSX-362] - Date format is not similar In Balance Sheet as in other pages.
|
||||
- [MIFOSX-473] - "Accounting Rules" created for Branch office (at Head office) is not displaying in head office.
|
||||
- [MIFOSX-479] - Scheduled jobs only run for tenant with identifier 'default'
|
||||
- [MIFOSX-480] - Not able to "Create A Group" under Branch Office using Head Office staff.
|
||||
- [MIFOSX-488] - With DELETE datatables service, one can drop system tables
|
||||
|
||||
Reference App
|
||||
- [MIFOSX-388] - Buttons on table based reports no longer working
|
||||
- [MIFOSX-463] - Numeric ids are number formated (causing NumberFormatException )
|
||||
- [MIFOSX-467] - Unable to create group in spanish locale as activation date doesnt pick up on culture/locale in datepicker
|
||||
- [MIFOSX-481] - Not able to navigate to the immediate previous page from "Clients loan application" page
|
||||
- [MIFOSX-482] - In Groups -> Clients loan application page -> no error message is displaying asking for proper inputs
|
||||
- [MIFOSX-484] - While creating a "new client" for group (in branch office), Not able to select "Staff" from that (branch) office, if user is Admin.
|
||||
|
||||
1.4.0.RELEASE
|
||||
=============
|
||||
Feature Release
|
||||
|
||||
This feature release focussed on moving groups functionality from BETA to public API.
|
||||
|
||||
Along with Group releated work, key improvements was the addition of a UI and API for adding 'additional data' and staff relationship to clients.
|
||||
|
||||
Platform & API
|
||||
|
||||
Bug
|
||||
- [MIFOSX-420] - In "Change loan application" not able to save the modifications made because of error message getting displayed on charges.
|
||||
- [MIFOSX-424] - In new loan application, loan is getting approved for the Principal amount beyond the range (Minimum and Maximum) defined in the loan product.
|
||||
- [MIFOSX-429] - App user of one branch can edit client of another branch
|
||||
- [MIFOSX-446] - New loan application is not validating Min-Max Principal defined in the product defination
|
||||
- [MIFOSX-447] - New loan application is not validating Min-Max for "# Of Repayments" defined in the product defination
|
||||
- [MIFOSX-448] - New loan application is not validating Min-Max "Nominal interest rate %" defined in the product defination
|
||||
- [MIFOSX-468] - In "Change loan application" error message is displaying for the second charge which was applied before.
|
||||
- [MIFOSX-474] - Adjusting an existing loan transaction fails when 'note' information is passed
|
||||
|
||||
New Features & Improvements
|
||||
- [MIFOSX-365] - Simplify "Data Tables" functionality
|
||||
- [MIFOSX-421] - Ability to create and associate Group Roles
|
||||
- [MIFOSX-434] - Allow linking of staff to Clients
|
||||
- [MIFOSX-445] - Show loanofficers at higher hierarchical level in product template
|
||||
- [MIFOSX-449] - Group and JLG loans repayment schedule should match group meeting dates if loan repayment is synched with group meeting
|
||||
- [MIFOSX-457] - Update API param names for accounting rules to be consistent with rest of the accounting services
|
||||
- [MIFOSX-458] - Unable to create accounting rules with Tag Id, multiple debits/credits etc
|
||||
|
||||
Reference App
|
||||
- [MIFOSX-378] - TEVI: Produce 'role-based' dashboards as entry/landing page for users that login
|
||||
- [MIFOSX-455] - CodeValues functionality broken on the reference Client app
|
||||
- [MIFOSX-469] - In Groups unable to activate the created group
|
||||
- [MIFOSX-464] - Unable to edit the created charge in "charge details" page
|
||||
|
||||
BETA (functionality related to BETA functionality
|
||||
- [MIFOSX-456] - CRUD services and UI for creating Holidays
|
||||
- [MIFOSX-411] - While creating new savings account, If "Interest posting period" is defined Annually, it is getting posted monthly.
|
||||
|
||||
|
||||
1.3.0.RELEASE
|
||||
=============
|
||||
Feature Release
|
||||
|
||||
This feature release focussed mainly on features requested by Musoni for their upcoming m-lite product and by Quipu technolgies for their TEVI project.
|
||||
|
||||
Key changes are improvements to accounting and flexible support for grace concepts in loan repayment schedule.
|
||||
|
||||
Platform & API
|
||||
|
||||
Bug
|
||||
- [MIFOSX-427] - Charges and penalties functionality wonky when multiple charges/penalties are due on the same date
|
||||
|
||||
New Features & Improvements
|
||||
- [MIFOSX-391] - "Advanced" accounting rules for compound Journal entries
|
||||
- [MIFOSX-413] - Ability to account different charges (both fees and penalties) under different heads
|
||||
- [MIFOSX-295] - Support Prinicpal and Interest Grace Periods for Loans, Loan Schedules
|
||||
- [MIFOSX-297] - Support over payment of loan scenarios common when repayments through mobile, third party
|
||||
- [MIFOSX-374] - TEVI: Repayment strategy to support payment ordering of Interest, Principal, Penalties, Fees
|
||||
- [MIFOSX-376] - TEVI: Track additional details on the loan repayment schedule
|
||||
|
||||
Reference App
|
||||
- [MIFOSX-405] - In client's General page not able to differentiate between Activated and not Activated savings accounts.
|
||||
- [MIFOSX-416] - Distinguish between Individual and JLG loans in clients general details
|
||||
- [MIFOSX-418] - Hide/show Centers and center creation based on permissions
|
||||
- [MIFOSX-419] - Display Center summary details in UI
|
||||
- [MIFOSX-423] - Unable to view group loan in group context
|
||||
|
||||
BETA (functionality related to BETA functionality
|
||||
- [MIFOSX-344] - Add overnight scheduled task to detect if annual fee is due on savings account and apply it
|
||||
- [MIFOSX-325] - GSOC 2013 - Savings accounts server side sorting and pagination on retrieve all
|
||||
- [MIFOSX-310] - Generate Collection sheet based on meeting calendar dates
|
||||
- [MIFOSX-356] - Modify unassign staff API call in group
|
||||
- [MIFOSX-69] - Amazon S3 appender for document upload
|
||||
- [MIFOSX-395] - TEVI: Support hierarchial staff and organisational roles on staff with linkage to Application User
|
||||
|
||||
1.2.1.RELEASE
|
||||
=============
|
||||
Bug Release
|
||||
|
||||
Platform & API
|
||||
|
||||
Bug
|
||||
- [MIFOSX-402] - Unable to use 'days' period frequency when entering value for 'lockin' on savings product/account
|
||||
- [MIFOSX-398] - In savings account - " New saving product" is getting activated before Client activation date.
|
||||
- [MIFOSX-399] - If full balance amount is withdrawn from saving account, it is displaying negative balance as withdrawal fee is defined in saving product.
|
||||
|
||||
Reference App
|
||||
- [MIFOSX-358] - Register/Deregister datatables for groups and centers
|
||||
- [MIFOSX-396] - Not able to deposit / Withdraw amount in savings account
|
||||
- [MIFOSX-401] - While Updating the saving product if withdrawal fee is defined as "0" error message is displayed.
|
||||
- [MIFOSX-403] - While defining and updating the saving product if Annual fee is defined as "0" error message is displayed.
|
||||
- [MIFOSX-407] - For some transactions by clicking on Deposit/Withdraw, 2-3 popup pages displayed as blank.
|
||||
- [MIFOSX-410] - While defining saving product if Annual fee and date text field kept blank it is displaying error. But while editing saving product if Annual fee and date text field kept blank it is accepting.
|
||||
|
||||
1.2.0.RELEASE
|
||||
=============
|
||||
Feature Release
|
||||
|
||||
This feature release is focussed on 'Accounting' improvements that provide greater flexibility in use of accounting for MFIs that use mobile money and wish to be able to track through what channels repayments are disbursements go.
|
||||
|
||||
The BETA functionality for savings is now integrated with accounting on platform/api side.
|
||||
|
||||
It also contains a number of improvements to the reference app UI.
|
||||
|
||||
Platform & API
|
||||
- [MIFOSX-223] - Add functionality for Loan Disbursement and Repayment channels/types
|
||||
- [MIFOSX-286] - Ability to setup and use Accounting rules for Manual Journal Entries
|
||||
- [MIFOSX-338] - Tagging Journal Entries
|
||||
- [MIFOSX-392] - Not able to upload .docx (word doccument) and .xlsx (Excel doccument) in Client's "Identity Doccuments" and in "Client Doccuments"
|
||||
- [MIFOSX-328] - Loan approval date should not be earlier to the Client activation date.
|
||||
- [MIFOSX-246] - Add ability to associate fees with savings product/account
|
||||
- [MIFOSX-331] - Add capability to filter the calendars based on Calendar Type.
|
||||
|
||||
Reference App
|
||||
- [MIFOSX-320] - Beautify Login page
|
||||
- [MIFOSX-149] - Add status colors to UI
|
||||
- [MIFOSX-147] - Allow ability to produce easy to print loan schedule from the loan screen
|
||||
- [MIFOSX-317] - Add Tooltips that explain the significance of mapped "Accounts" in Loan Product Screens
|
||||
- [MIFOSX-347] - When creating a new GL Account, pick up on selected category from tree view
|
||||
- [MIFOSX-313] - Fix CSS issues with Accounting section of "Define New Loan Products"
|
||||
- [MIFOSX-346] - Upgrade Reference UI to JQuery UI 1.10.3 (latest stable version)
|
||||
- [MIFOSX-384] - JQuery upgrading breaking the functionality of Add LoanProduct.
|
||||
- [MIFOSX-386] - In "Add Loan Product" not able to delete the "Charges"added , similarly in "Accounting" not able to delete "Advanced accounting rules"(ie, Payment Type and Fund Source). Issue may be of latest updation, because in demo version it is working fine.
|
||||
|
||||
1.1.4.RELEASE
|
||||
=============
|
||||
Bug Release
|
||||
|
||||
Platform & API
|
||||
- [MIFOSX-387] - Loans template for Client not showing currencies
|
||||
|
||||
Reference App
|
||||
- [MIFOSX-382] - In Change Loan Application by changing the "Product" name, Details are not getting updated (ie, in Terms & settings),since "currencies" of two loan products are different
|
||||
- [MIFOSX-390] - Regression in ability to associate a fund with a loan application through reference app
|
||||
|
||||
|
||||
1.1.3.RELEASE
|
||||
=============
|
||||
Bug Release
|
||||
|
||||
Bug
|
||||
- [MIFOSX-367] - Not able to figure out the loan details, if proper Account no. is entered in Search text field
|
||||
- [MIFOSX-368] - To add a new client of client type "corporate" error message is showing "First name is mandatory" and Last name is mandatory" than Full name or Business name.
|
||||
- [MIFOSX-369] - Client is getting activated before the date of opening of the related office.
|
||||
- [MIFOSX-379] - For applying "New Loan Application", if loan product currency is in US Dollars the charges applied is in Indian Rupees also, it is accepting.
|
||||
- [MIFOSX-380] - Smart search on Gaurantors is broken after change of clients api to paginated response
|
||||
|
||||
Improvement
|
||||
|
||||
- [MIFOSX-359] - Edit functionality for "Code Values" not intuitive (and inconsistent with rest of the User Interface)
|
||||
- [MIFOSX-360] - Inconsistent verbiage for "Cancel" button in "Add/Edit Code Value: " page
|
||||
- [MIFOSX-363] - Background is broken in the middle of the table in "Client Loans Listing" page
|
||||
|
||||
1.1.2.RELEASE
|
||||
=============
|
||||
Bug Release
|
||||
- MIFOSX-353 - datetime column in custom table report causes violation
|
||||
- MIFOSX-364 - New loan application save button restriction
|
||||
|
||||
1.1.1.RELEASE
|
||||
=============
|
||||
Bug Release
|
||||
- MIFOSX-348 - General API concepts do not work for paginated endpoints
|
||||
|
||||
1.1.0.RELEASE
|
||||
=============
|
||||
Feature Release
|
||||
|
||||
Scope of release:
|
||||
|
||||
General improvements to display of audit details, pagination of list apis. New api to list loans/loan applications.
|
||||
|
||||
In addition to items mentioned below see 1.1.0.RELEASE on JIRA: https://mifosforge.jira.com/browse/MIFOSX/fixforversion/11932 for full details of issues addressed in release.
|
||||
|
||||
Core Issues:
|
||||
|
||||
- [MIFOSX-334] - Group loses clients when updating
|
||||
- [MIFOSX-226] - Add ability to API to list loans for applications that require loan centric view of data
|
||||
- [MIFOSX-339] - Allow retrieving of all items on paginated endpoints
|
||||
|
||||
1.0.1.RELEASE
|
||||
=============
|
||||
Bug Release
|
||||
- MIFOSX-343 - When viewing Audit details, integer values (rather than string values) for officeId and clientId cause exception
|
||||
|
||||
1.0.0.RELEASE
|
||||
=============
|
||||
|
||||
The first community sanctioned public release of new mifos platform project ('Mifos X').
|
||||
|
||||
Scope of release:
|
||||
|
||||
In addition to items mentioned below see 1.0.0.RELEASE on JIRA: https://mifosforge.jira.com/browse/MIFOSX/fixforversion/11833 for full details of issues addressed in release.
|
||||
|
||||
Operational Functionality:
|
||||
- Client Loan Portfolio Management
|
||||
- Cash-based Accounting
|
||||
- Audit of all changes
|
||||
- Reporting (about 30 Reports)
|
||||
- Comprehensive and flexible ability to configure (on request) MFI specific additional client and loan data.
|
||||
|
||||
Organisational Functionality:
|
||||
- Currency, Funds, Offices, Staff/Loan Officers
|
||||
- Loan Products
|
||||
- support for declining balance or flat interest methods
|
||||
- Ability to configure mfi customised repayment processing
|
||||
- Charges
|
||||
- Fees & Penalties
|
||||
|
||||
User Admin Functionality:
|
||||
- Users, Roles, Permissions
|
||||
- 4-eye principle / Maker-Checker
|
||||
|
||||
0.12.1.beta
|
||||
==========
|
||||
|
||||
Bug Release
|
||||
- MIFOSX-311 - Zero % loan products or loan applications are not allowed due to validation checks
|
||||
|
||||
0.11.4.beta
|
||||
==========
|
||||
Back ported bug fixes in 0.12.1 to 0.11.x series for production installation.
|
||||
|
||||
Bug Release
|
||||
- MIFOSX-311 - Zero % loan products or loan applications are not allowed due to validation checks
|
||||
|
||||
0.12.0.beta
|
||||
==========
|
||||
|
||||
|
||||
+3
-1
@@ -1,4 +1,6 @@
|
||||
Contributors
|
||||
=====
|
||||
|
||||
List of code contributors can be viewed @ https://github.com/openMF/mifosx/contributors
|
||||
List of code contributors on the mifosplatform codebase (mifosx) can be viewed @ https://github.com/openMF/mifosx/contributors
|
||||
|
||||
List of code contributors on applications built on mifosplatform such as the reference app (IndividualLendingJavascript) can be viewed @ https://github.com/openMF/mifosx-community-apps/contributors
|
||||
|
||||
+217
@@ -0,0 +1,217 @@
|
||||
# Installation Mifos Platform
|
||||
|
||||
This file describes how to install mifos platform for use in a production or test environment.
|
||||
|
||||
## Release Artifact Structure
|
||||
|
||||
The release artifact (.zip file) has the following structure:
|
||||
|
||||
```
|
||||
+ mifosplatform-X.Y.Z.RELEASE ... parent folder which will have the release number on it
|
||||
|
|
||||
+ api-docs ... folder contains html based documentation on the platform API for this release
|
||||
+ database ... folder contains database setup and upgrade scripts required for installation
|
||||
+ pentahoReports ... folder contains any out-of-the-box reports provided through pentaho
|
||||
+ apps ... folder contains apps like reference app that speak to the platform
|
||||
|
|
||||
-- CHANGELOG.MD ... file documents changelog of project up to this release
|
||||
-- CONTRIBUTORS.MD ... file provides details on contributors to project
|
||||
-- INSTALL.MD ... file provides details on installation instructions
|
||||
-- LICENSE.MD ... file provides details on the open source license used by the project
|
||||
-- mifosng-provider.war ... the platform WAR file to be dropped into Tomcat 7
|
||||
-- README.MD ... initial readme file for the project
|
||||
-- VERSIONING.MD ... file provides details on approach to release versioning
|
||||
```
|
||||
|
||||
## How to Install
|
||||
|
||||
The two ways to get up and running with mifos platform is:
|
||||
|
||||
1. Use Amazon AWS and mifosplatform public AMI to spin up a new instance in the cloud
|
||||
2. Manually install the prerequisite software on your own machine, follow setup instructions and use release artifacts to get platform running yourself.
|
||||
|
||||
## 1. Amazon Public AMI
|
||||
|
||||
Launch instance <a target="_blank" href="https://console.aws.amazon.com/ec2/home?region=eu-west-1#launchAmi=ami-2b2d3f5f" title="Mifos Platform Public AMI 1.4.0.RELEASE">ami-2b2d3f5f</a>
|
||||
|
||||
*Name:* Mifos Platform 1.4.0.RELEASE Public AMI
|
||||
|
||||
- AMI ID: ami-2b2d3f5f
|
||||
- Kernel ID: aki-71665e05
|
||||
- Name: Mifos Platform 1.4.0.RELEASE Public AMI
|
||||
- Owner: 476083131096
|
||||
- Source: 476083131096/Mifos Platform 1.4.0.RELEASE Public AMI
|
||||
- Architecture: Ubuntu12.04 LTS x86_64
|
||||
- Built starting from Ubuntu AMI ami-35acbb41
|
||||
- Java 1.6_45 32 bit JVM
|
||||
- Tomcat 7.0.39 (with SSL configured for self-signed certificate)
|
||||
- MySql 5.5.31
|
||||
- Mifos Platform 1.4.0.RELEASE
|
||||
- Mifos Reference App 1.4.0.RELEASE
|
||||
|
||||
## 2. Manual Installation
|
||||
|
||||
### 2.1 Prerequisite Software
|
||||
|
||||
Before running mifos platform you must have the following software installed:
|
||||
- Oracle Java - JDK/JRE 1.6 (NOT 1.7) (http://www.oracle.com/technetwork/java/javase/downloads/index.html)
|
||||
- Oracle MySQL - (http://dev.mysql.com/downloads/)
|
||||
- Apache Tomcat 7 - (http://tomcat.apache.org/download-70.cgi)
|
||||
|
||||
### 2.2 MySQL Setup
|
||||
|
||||
Assumption: MySQL server is now installed.
|
||||
|
||||
You should know your password for MySQL root user. If you wish you can change it by doing:
|
||||
```
|
||||
mysqladmin -u root -p 'oldpassword' password newpassword
|
||||
```
|
||||
The mifosplatform settings default to a mysql root user with username: root, password: mysql
|
||||
|
||||
If you have never installed mifosplatform before follow section 2.2.1 for first time setup of database, otherwise read section 2.2.2 on database upgrades.
|
||||
|
||||
#### 2.2.1 First Time Database setup
|
||||
|
||||
Mifos platform has support for hosting multiple tenants so we use two database schemas:
|
||||
- *mifosplatform-tenants*: which is responsible for persisting the tenant information which is used when deciding what schema each incoming request in the platform should route to. It acts as a registry which contains the details of all the tenant databases, and their connection information, which is used by MifosX to connect to the appropriate tenant.
|
||||
- *mifostenant-default*: All tenant specific schemas follow the pattern mifostenant-xxxx, out of the box the default schema is used.
|
||||
|
||||
Step one: create mifosplatform-tenants database
|
||||
```
|
||||
mysql -uroot -pmysql
|
||||
create database `mifosplatform-tenants`;
|
||||
exit
|
||||
```
|
||||
|
||||
Step two: populate mifosplatform-tenants database using ```database/mifospltaform-tenants-first-time-install.sql```
|
||||
```
|
||||
mysql -uroot -pmysql mifosplatform-tenants < database/mifospltaform-tenants-first-time-install.sql
|
||||
```
|
||||
|
||||
Step three: create mifostenant-default database
|
||||
```
|
||||
mysql -uroot -pmysql
|
||||
create database `mifostenant-default`;
|
||||
exit
|
||||
```
|
||||
|
||||
#### 2.2.2 Upgrade existing database(s)
|
||||
|
||||
Any *tenant* databases will be upgraded automatically when the application starts if the *auto_update* field of the *tenants* database table is enabled(=1). This is the default setting.
|
||||
|
||||
Upgrading your database in this way is the recomended way as it will upgrade any *tenants* setup in the *mifosplatform-tenants* database but can be disabled by setting the *auto_update* field of the tenant to zero.
|
||||
|
||||
### 2.3 Tomcat 7 Setup
|
||||
|
||||
Assumption: You have downloaded and installed Tomcat 7 correctly for your operation system: see http://tomcat.apache.org/tomcat-7.0-doc/setup.html
|
||||
|
||||
#### 2.3.1 Environment Variables Check
|
||||
|
||||
Check that the following environment variables exist:
|
||||
- JAVA_HOME ... should point to directory where a 1.6 JDK or JRE is on machine
|
||||
- CATALINA_HOME ... should point to a directory where a Tomcat 7 instance is installed
|
||||
|
||||
Check that the following is on your path:
|
||||
- %JAVA_HOME%\bin;
|
||||
|
||||
#### 2.3.2 Logging
|
||||
|
||||
- In the [TOMCAT_HOME]/logs create a file called ```mifos-platform.log```
|
||||
|
||||
#### 2.3.3 Libraries
|
||||
|
||||
Ensure the following libraries are in the [TOMCAT_HOME]/lib folder
|
||||
- tomcat-jdbc.jar
|
||||
- mysql-connector-java-5.1.22 (You will need to download latest MySQL Connector/J Jar file from http://dev.mysql.com/downloads/connector/j/)
|
||||
|
||||
#### 2.3.4 Configure for SSL
|
||||
|
||||
Generate a new keystore using java keytool (if you havent already done this):
|
||||
- Follow docs to create keystore.(http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html#Configuration)
|
||||
- Update server.xml as in docs. (Ther server.xml configuration given in the configure tomcat 7 below is what is need.)
|
||||
|
||||
```sudo keytool -genkey -alias mifostom -keyalg RSA -keystore /home/ubuntu/.keystore```
|
||||
|
||||
#### 2.3.5 Update tomcat configuration files for SSL, compression and JNDI connection to MySql
|
||||
|
||||
```
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<Server port="8005" shutdown="SHUTDOWN">
|
||||
<Listener className="org.apache.catalina.core.JasperListener" />
|
||||
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
|
||||
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
|
||||
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
|
||||
|
||||
<GlobalNamingResources>
|
||||
<Resource name="UserDatabase" auth="Container"
|
||||
type="org.apache.catalina.UserDatabase"
|
||||
description="User database that can be updated and saved"
|
||||
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
|
||||
pathname="conf/tomcat-users.xml"
|
||||
/>
|
||||
|
||||
<Resource type="javax.sql.DataSource"
|
||||
name="jdbc/mifosplatform-tenants"
|
||||
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
|
||||
driverClassName="com.mysql.jdbc.Driver"
|
||||
url="jdbc:mysql://localhost:3306/mifosplatform-tenants"
|
||||
username="root"
|
||||
password="[root mysql password]"
|
||||
initialSize="3"
|
||||
maxActive="10"
|
||||
maxIdle="6"
|
||||
minIdle="3"
|
||||
validationQuery="SELECT 1"
|
||||
testOnBorrow="true"
|
||||
testOnReturn="true"
|
||||
testWhileIdle="true"
|
||||
timeBetweenEvictionRunsMillis="30000"
|
||||
minEvictableIdleTimeMillis="60000"
|
||||
logAbandoned="true"
|
||||
suspectTimeout="60"
|
||||
/>
|
||||
</GlobalNamingResources>
|
||||
|
||||
<Service name="Catalina">
|
||||
|
||||
<Connector protocol="org.apache.coyote.http11.Http11Protocol"
|
||||
port="8443" maxThreads="200" scheme="https"
|
||||
secure="true" SSLEnabled="true"
|
||||
keystoreFile="/home/ubuntu/.keystore"
|
||||
keystorePass="testmifos"
|
||||
clientAuth="false" sslProtocol="TLS"
|
||||
URIEncoding="UTF-8"
|
||||
compression="force"
|
||||
compressableMimeType="text/html,text/xml,text/plain,text/javascript,text/css"/>
|
||||
|
||||
<Engine name="Catalina" defaultHost="localhost">
|
||||
|
||||
<Realm className="org.apache.catalina.realm.LockOutRealm">
|
||||
<Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
|
||||
</Realm>
|
||||
|
||||
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">
|
||||
|
||||
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
|
||||
prefix="localhost_access_log." suffix=".log"
|
||||
pattern="%h %l %u %t "%r" %s %b" />
|
||||
</Host>
|
||||
</Engine>
|
||||
</Service>
|
||||
</Server>
|
||||
```
|
||||
|
||||
#### 2.3.6 Drop application into tomcat webapps folder
|
||||
|
||||
Drop the following from the release artifact into the [TOMCAT_HOME]/webapps folder:
|
||||
- mifosng-provider.war
|
||||
|
||||
Drop the following from the release artifact into [TOMCAT_HOME]/webapps/ROOT folder:
|
||||
- The entire ```apps/IndividualLendingGeneralJavaScript``` folder
|
||||
- The entire api-docs folder
|
||||
|
||||
#### 2.3.7 Startup tomcat
|
||||
Startup tomcat:
|
||||
- Platform application should be available @ https://[server ip address]:8443/mifosng-provider/api/v1/offices?tenantIdentifier=default&pretty=true
|
||||
- Reference application should be available @ https://[server ip address]:8443/IndividualLendingGeneralJavaScript/IndivLendHome.html?baseApiUrl=https://[server ip address]:8443/mifosng-provider/api/v1/
|
||||
- API docs should be available @ https://[server ip address]:8443/api-docs/apiLive.htm
|
||||
@@ -22,9 +22,11 @@ Status](https://openmf.ci.cloudbees.com/job/MIFOSX%20INTEGRATION%20TEST/badge/ic
|
||||
Version
|
||||
==========
|
||||
|
||||
The mifosx platform is currently still in BETA. That means its likely that there will be changes to the Platform API so any use or development against is at your own risk.
|
||||
The mifos-platform (project named 'Mifos X') has reached <b>public release version</b>.
|
||||
|
||||
Latest stable release: <a target="_blank" href="https://github.com/openMF/mifosx/tree/mifosplatform-0.12.0.beta" title="mifosplatform-0.12.0.beta">mifosplatform-0.12.0.beta</a>
|
||||
That means there is a published and stable API. This API is documented in the api-docs under <b>Full API Matrix</b>.
|
||||
|
||||
Latest stable release can always been viewed on master branch: <a target="_blank" href="https://github.com/openMF/mifosx/tree/master" title="Latest Release">Latest Release on Master</a>, <a target="_blank" href="https://github.com/openMF/mifosx/blob/master/CHANGELOG.md" title="Latest release change log">View change log</a>
|
||||
|
||||
License
|
||||
=============
|
||||
@@ -34,15 +36,14 @@ This project is licensed under the open source MPL V2. See https://github.com/op
|
||||
Mifos Platform API
|
||||
=====================
|
||||
|
||||
<a target="_blank" href="https://demo.openmf.org/api-docs/apiLive.htm" title="mifos platform api beta 1">API Documentation (Demo Server)</a>
|
||||
<a target="_blank" href="https://demo.openmf.org/api-docs/apiLive.htm" title="mifos platform api">API Documentation (Demo Server)</a>
|
||||
|
||||
|
||||
Online Client Application Demos
|
||||
Online Demos
|
||||
=============================
|
||||
|
||||
<a target="_blank" href="https://demo.openmf.org" title="Reference Client App">Reference Client App</a>
|
||||
|
||||
|
||||
Developers
|
||||
==========
|
||||
see https://mifosforge.jira.com/wiki/display/MIFOSX/MifosX+Technical - Developers Wiki Page
|
||||
@@ -57,20 +58,13 @@ see https://github.com/openMF/mifosx/wiki/Git-Usuage for info around using git
|
||||
|
||||
see https://www.ohloh.net/p/mifosx for activity overview and basic code analysis.
|
||||
|
||||
Amazon Public AMI
|
||||
=================
|
||||
|
||||
Note: The Public AMI is currently out of date
|
||||
|
||||
Launch instance <a target="_blank" href="https://console.aws.amazon.com/ec2/home?region=eu-west-1#launchAmi=ami-65e6e011" title="Mifos X Public AMI 1">ami-65e6e011</a>
|
||||
|
||||
- Mifos X Public AMI 1
|
||||
- Ubuntu11.10, tomcat7.0.21 (with SSL),MySql 5.1.62, Java 1.6_30, Mifos X Platform
|
||||
|
||||
Roadmap
|
||||
==============
|
||||
|
||||
- http://goo.gl/IXS9Q
|
||||
<a target="_blank" href="http://goo.gl/IXS9Q" title="Community Roadmap (High Level)">Community Roadmap (High Level)</a>
|
||||
|
||||
<a target="_blank" href="https://mifosforge.jira.com/browse/MIFOSX#selectedTab=com.atlassian.jira.plugin.system.project%3Aroadmap-panel"
|
||||
title="Project Release Roadmap on JIRA (Detailed View)">Project Release Roadmap on JIRA (Detailed View)</a>
|
||||
|
||||
Video Demonstration
|
||||
===============
|
||||
|
||||
+4475
-941
File diff suppressed because it is too large
Load Diff
+15
-3
@@ -160,12 +160,11 @@ body {
|
||||
height: 30px;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 20px;
|
||||
left: 10px;
|
||||
font-weight: bold;
|
||||
color: black;
|
||||
font-size: 16px;
|
||||
text-decoration: none;
|
||||
|
||||
}
|
||||
|
||||
.flybar-button {
|
||||
@@ -184,7 +183,7 @@ body {
|
||||
.flybar-nav {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 80px;
|
||||
width: 90px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@@ -725,3 +724,16 @@ strong { font-weight: bold; }
|
||||
.stripe-version {
|
||||
float: left;
|
||||
}
|
||||
|
||||
ul.field {
|
||||
margin: 5px 10px;
|
||||
}
|
||||
|
||||
ul.field li {
|
||||
list-style: square inside none;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
tt {
|
||||
font-size: 9.5pt;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
Mifos Platform Apps
|
||||
======
|
||||
|
||||
Community created apps built on top of mifosplatform are stored in source control repository @ https://github.com/openMF/mifosx-community-apps
|
||||
|
||||
The Reference App
|
||||
===============
|
||||
|
||||
https://github.com/openMF/mifosx-community-apps/tree/master/IndividualLendingGeneralJavaScript
|
||||
|
||||
The reference app is a core part of community release. It is presently used to showcase platform API capabilities and is also used in production by MFIs.
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `m_loan`
|
||||
ADD COLUMN `loan_type_enum` SMALLINT(5) NOT NULL AFTER `loan_status_id`;
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
CREATE TABLE `acc_accounting_rule` (
|
||||
`id` BIGINT(20) NOT NULL,
|
||||
`name` VARCHAR(100) NULL DEFAULT NULL,
|
||||
`office_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`debit_account_id` BIGINT(20) NOT NULL,
|
||||
`credit_account_id` BIGINT(20) NOT NULL,
|
||||
`description` VARCHAR(500) NULL DEFAULT NULL,
|
||||
`system_defined` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `accounting_rule_name_unique` (`name`),
|
||||
INDEX `FK_acc_accounting_rule_acc_gl_account_debit` (`debit_account_id`),
|
||||
INDEX `FK_acc_accounting_rule_acc_gl_account_credit` (`credit_account_id`),
|
||||
INDEX `FK_acc_accounting_rule_m_office` (`office_id`),
|
||||
CONSTRAINT `FK_acc_accounting_rule_acc_gl_account_credit` FOREIGN KEY (`credit_account_id`) REFERENCES `acc_gl_account` (`id`),
|
||||
CONSTRAINT `FK_acc_accounting_rule_acc_gl_account_debit` FOREIGN KEY (`debit_account_id`) REFERENCES `acc_gl_account` (`id`),
|
||||
CONSTRAINT `FK_acc_accounting_rule_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `acc_auto_posting` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`name` VARCHAR(100) NOT NULL,
|
||||
`description` VARCHAR(500) NULL DEFAULT NULL,
|
||||
`office_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`product_type_enum` SMALLINT(5) NOT NULL,
|
||||
`product_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`charge_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`event` INT(11) NOT NULL,
|
||||
`event_attribute` INT(11) NULL DEFAULT NULL,
|
||||
`accounting_rule_id` BIGINT(20) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `auto_posting_name_unique` (`name`),
|
||||
INDEX `FK_acc_auto_posting_m_office` (`office_id`),
|
||||
INDEX `FK_acc_auto_posting_acc_accounting_rule` (`accounting_rule_id`),
|
||||
INDEX `FK_acc_auto_posting_m_code` (`event`),
|
||||
INDEX `FK_acc_auto_posting_m_charge` (`charge_id`),
|
||||
INDEX `FK_acc_auto_posting_m_code_value` (`event_attribute`),
|
||||
CONSTRAINT `FK_acc_auto_posting_acc_accounting_rule` FOREIGN KEY (`accounting_rule_id`) REFERENCES `acc_accounting_rule` (`id`),
|
||||
CONSTRAINT `FK_acc_auto_posting_m_charge` FOREIGN KEY (`charge_id`) REFERENCES `m_charge` (`id`),
|
||||
CONSTRAINT `FK_acc_auto_posting_m_code` FOREIGN KEY (`event`) REFERENCES `m_code` (`id`),
|
||||
CONSTRAINT `FK_acc_auto_posting_m_code_value` FOREIGN KEY (`event_attribute`) REFERENCES `m_code_value` (`id`),
|
||||
CONSTRAINT `FK_acc_auto_posting_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
ALTER TABLE `m_savings_product`
|
||||
ADD COLUMN `annual_fee_amount` DECIMAL(19,6) NULL DEFAULT NULL AFTER `withdrawal_fee_type_enum`,
|
||||
ADD COLUMN `annual_fee_on_month` SMALLINT(5) NULL DEFAULT NULL AFTER `annual_fee_amount`,
|
||||
ADD COLUMN `annual_fee_on_day` SMALLINT(5) NULL DEFAULT NULL AFTER `annual_fee_on_month`;
|
||||
|
||||
ALTER TABLE `m_savings_account`
|
||||
ADD COLUMN `annual_fee_amount` DECIMAL(19,6) NULL DEFAULT NULL AFTER `withdrawal_fee_type_enum`,
|
||||
ADD COLUMN `annual_fee_on_month` SMALLINT(5) NULL DEFAULT NULL AFTER `annual_fee_amount`,
|
||||
ADD COLUMN `annual_fee_on_day` SMALLINT(5) NULL DEFAULT NULL AFTER `annual_fee_on_month`,
|
||||
ADD COLUMN `annual_fee_next_due_date` DATE NULL DEFAULT NULL AFTER `annual_fee_on_day`;
|
||||
|
||||
ALTER TABLE `m_savings_account`
|
||||
ADD COLUMN `total_annual_fees_derived` DECIMAL(19,6) NULL DEFAULT NULL AFTER `total_withdrawal_fees_derived`;
|
||||
@@ -0,0 +1,2 @@
|
||||
alter table `acc_gl_journal_entry`
|
||||
add column `ref_num` varchar(100) default NULL AFTER `reversed`;
|
||||
@@ -0,0 +1,3 @@
|
||||
drop table `acc_auto_posting`;
|
||||
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'ASSOCIATECLIENTS_GROUP', 'GROUP', 'ASSOCIATECLIENTS', 0);
|
||||
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'DISASSOCIATECLIENTS_GROUP', 'GROUP', 'DISASSOCIATECLIENTS', 0);
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
ALTER TABLE stretchy_report_parameter
|
||||
DROP INDEX `report_id_name_UNIQUE` ;
|
||||
@@ -0,0 +1,3 @@
|
||||
ALTER TABLE stretchy_report_parameter
|
||||
ADD UNIQUE INDEX `report_parameter_unique` (`report_id` ASC, `parameter_id` ASC) ;
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
ALTER TABLE `acc_gl_account` ADD COLUMN `hierarchy` varchar(50) AFTER `parent_id`;
|
||||
@@ -0,0 +1,5 @@
|
||||
ALTER TABLE `acc_gl_account`
|
||||
ADD COLUMN `tag_id` INT(11) NULL DEFAULT NULL AFTER `classification_enum`,
|
||||
ADD INDEX `FKGLACC000000002` (`tag_id`),
|
||||
ADD CONSTRAINT `FKGLACC000000002` FOREIGN KEY (`tag_id`) REFERENCES `m_code_value` (`id`);
|
||||
INSERT into m_code(`code_name`,`is_system_defined`) values ('AssetAccountTags',1),('LiabilityAccountTags',1),('EquityAccountTags',1),('IncomeAccountTags',1),('ExpenseAccountTags',1);
|
||||
@@ -0,0 +1,3 @@
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'SAVECOLLECTIONSHEET_GROUP', 'GROUP', 'SAVECOLLECTIONSHEET', 0);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'SAVECOLLECTIONSHEET_CENTER', 'CENTER', 'SAVECOLLECTIONSHEET', 0);
|
||||
@@ -0,0 +1,71 @@
|
||||
|
||||
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `core_report`, `use_report`, `description`, `report_sql`)
|
||||
VALUES ('GroupSummaryDetails', 'Table', true, false, 'Utility query for getting group summary details for a group_id',
|
||||
|
||||
"/*
|
||||
Active Client is a client linked to the 'group' via m_group_client
|
||||
and with an active status_enum (not sure what it means if the group is inactive)
|
||||
|
||||
Active Borrowers - Borrow may be a client or a 'group'
|
||||
|
||||
Currency is an outstanding issue
|
||||
|
||||
Couldn't set up group savings for a client
|
||||
(as opposed to opening a individual clients savings account)
|
||||
*/
|
||||
select x.*
|
||||
from m_office o,
|
||||
m_group g,
|
||||
|
||||
(select a.activeClients,
|
||||
(b.activeClientLoans + c.activeGroupLoans) as activeLoans,
|
||||
b.activeClientLoans, c.activeGroupLoans,
|
||||
(b.activeClientBorrowers + c.activeGroupBorrowers) as activeBorrowers,
|
||||
b.activeClientBorrowers, c.activeGroupBorrowers, d.*,
|
||||
0 as activeSavings, 0 as totalSavingsAmount
|
||||
from
|
||||
(select count(*) as activeClients
|
||||
from m_group topgroup
|
||||
join m_group g on g.hierarchy like concat(topgroup.hierarchy, '%')
|
||||
join m_group_client gc on gc.group_id = g.id
|
||||
join m_client c on c.id = gc.client_id
|
||||
where topgroup.id = ${groupId}
|
||||
and c.status_enum = 300) a,
|
||||
|
||||
(select count(*) as activeClientLoans,
|
||||
count(distinct(l.client_id)) as activeClientBorrowers
|
||||
from m_group topgroup
|
||||
join m_group g on g.hierarchy like concat(topgroup.hierarchy, '%')
|
||||
join m_loan l on l.group_id = g.id and l.client_id is not null
|
||||
where topgroup.id = ${groupId}
|
||||
and l.loan_status_id = 300) b,
|
||||
|
||||
(select count(*) as activeGroupLoans,
|
||||
count(distinct(l.group_id)) as activeGroupBorrowers
|
||||
from m_group topgroup
|
||||
join m_group g on g.hierarchy like concat(topgroup.hierarchy, '%')
|
||||
join m_loan l on l.group_id = g.id and l.client_id is null
|
||||
where topgroup.id = ${groupId}
|
||||
and l.loan_status_id = 300) c,
|
||||
|
||||
(select ifnull(sum(l.principal_disbursed_derived),0) as totalDisbursedAmount,
|
||||
ifnull(sum(l.principal_outstanding_derived),0) as totalLoanOutstandingAmount,
|
||||
count(laa.loan_id) as overdueLoans, ifnull(sum(laa.total_overdue_derived), 0) as totalLoanOverdueAmount
|
||||
from m_group topgroup
|
||||
join m_group g on g.hierarchy like concat(topgroup.hierarchy, '%')
|
||||
join m_loan l on l.group_id = g.id
|
||||
left join m_loan_arrears_aging laa on laa.loan_id = l.id
|
||||
where topgroup.id = ${groupId}
|
||||
and l.disbursedon_date is not null) d) x
|
||||
|
||||
where g.id = ${groupId}
|
||||
and o.id = g.office_id
|
||||
and o.hierarchy like concat('${currentUserHierarchy}', '%')");
|
||||
|
||||
|
||||
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('report', 'READ_GroupSummaryDetails', 'GroupSummaryDetails', 'READ', 0);
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
INSERT INTO `m_code` (`code_name`, `is_system_defined`) VALUES
|
||||
('PaymentType',1);
|
||||
|
||||
/*Update payment detail to add foreign key relationship to user defined Code Value*/
|
||||
update m_loan_transaction set payment_detail_id=null;
|
||||
ALTER TABLE `m_payment_detail`
|
||||
ALTER `payment_type_enum` DROP DEFAULT;
|
||||
ALTER TABLE `m_payment_detail`
|
||||
CHANGE COLUMN `payment_type_enum` `payment_type_cv_id` INT(11) NULL AFTER `id`;
|
||||
delete from m_payment_detail;
|
||||
ALTER TABLE `m_payment_detail`
|
||||
ADD CONSTRAINT `FK_m_payment_detail_m_code_value` FOREIGN KEY (`payment_type_cv_id`) REFERENCES `m_code_value` (`id`);
|
||||
|
||||
/*Map Different Payment Channels to payment Types*/
|
||||
ALTER TABLE `acc_product_mapping`
|
||||
ADD COLUMN `payment_type` INT(11) NULL DEFAULT NULL AFTER `product_type`,
|
||||
ADD CONSTRAINT `FK_acc_product_mapping_m_code_value` FOREIGN KEY (`payment_type`) REFERENCES `m_code_value` (`id`);
|
||||
@@ -0,0 +1 @@
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('organistion', 'DELETE_ACCOUNTINGRULE', 'ACCOUNTINGRULE', 'DELETE', 0),('organistion', 'CREATE_ACCOUNTINGRULE', 'ACCOUNTINGRULE', 'CREATE', 0),('organistion', 'UPDATE_ACCOUNTINGRULE', 'ACCOUNTINGRULE', 'UPDATE', 0);
|
||||
@@ -0,0 +1,90 @@
|
||||
|
||||
DELETE FROM `stretchy_report` where report_name = 'GroupSummaryDetails';
|
||||
DELETE FROM `m_permission` where entity_name = 'GroupSummaryDetails';
|
||||
|
||||
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `core_report`, `use_report`, `description`, `report_sql`)
|
||||
VALUES ('GroupSummaryCounts', 'Table', true, false, 'Utility query for getting group summary count details for a group_id',
|
||||
|
||||
"
|
||||
/*
|
||||
Active Client is a client linked to the 'group' via m_group_client
|
||||
and with an active 'status_enum'.)
|
||||
Active Borrowers - Borrower may be a client or a 'group'
|
||||
*/
|
||||
select x.*
|
||||
from m_office o,
|
||||
m_group g,
|
||||
|
||||
(select a.activeClients,
|
||||
(b.activeClientLoans + c.activeGroupLoans) as activeLoans,
|
||||
b.activeClientLoans, c.activeGroupLoans,
|
||||
(b.activeClientBorrowers + c.activeGroupBorrowers) as activeBorrowers,
|
||||
b.activeClientBorrowers, c.activeGroupBorrowers,
|
||||
(b.overdueClientLoans + c.overdueGroupLoans) as overdueLoans,
|
||||
b.overdueClientLoans, c.overdueGroupLoans
|
||||
from
|
||||
(select count(*) as activeClients
|
||||
from m_group topgroup
|
||||
join m_group g on g.hierarchy like concat(topgroup.hierarchy, '%')
|
||||
join m_group_client gc on gc.group_id = g.id
|
||||
join m_client c on c.id = gc.client_id
|
||||
where topgroup.id = ${groupId}
|
||||
and c.status_enum = 300) a,
|
||||
|
||||
(select count(*) as activeClientLoans,
|
||||
count(distinct(l.client_id)) as activeClientBorrowers,
|
||||
ifnull(sum(if(laa.loan_id is not null, 1, 0)), 0) as overdueClientLoans
|
||||
from m_group topgroup
|
||||
join m_group g on g.hierarchy like concat(topgroup.hierarchy, '%')
|
||||
join m_loan l on l.group_id = g.id and l.client_id is not null
|
||||
left join m_loan_arrears_aging laa on laa.loan_id = l.id
|
||||
where topgroup.id = ${groupId}
|
||||
and l.loan_status_id = 300) b,
|
||||
|
||||
(select count(*) as activeGroupLoans,
|
||||
count(distinct(l.group_id)) as activeGroupBorrowers,
|
||||
ifnull(sum(if(laa.loan_id is not null, 1, 0)), 0) as overdueGroupLoans
|
||||
from m_group topgroup
|
||||
join m_group g on g.hierarchy like concat(topgroup.hierarchy, '%')
|
||||
join m_loan l on l.group_id = g.id and l.client_id is null
|
||||
left join m_loan_arrears_aging laa on laa.loan_id = l.id
|
||||
where topgroup.id = ${groupId}
|
||||
and l.loan_status_id = 300) c
|
||||
) x
|
||||
|
||||
where g.id = ${groupId}
|
||||
and o.id = g.office_id
|
||||
and o.hierarchy like concat('${currentUserHierarchy}', '%')
|
||||
");
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('report', 'READ_GroupSummaryCounts', 'GroupSummaryCounts', 'READ', 0);
|
||||
|
||||
|
||||
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `core_report`, `use_report`, `description`, `report_sql`)
|
||||
VALUES ('GroupSummaryAmounts', 'Table', true, false, 'Utility query for getting group summary currency amount details for a group_id',
|
||||
|
||||
"
|
||||
select ifnull(cur.display_symbol, l.currency_code) as currency,
|
||||
ifnull(sum(l.principal_disbursed_derived),0) as totalDisbursedAmount,
|
||||
ifnull(sum(l.principal_outstanding_derived),0) as totalLoanOutstandingAmount,
|
||||
count(laa.loan_id) as overdueLoans, ifnull(sum(laa.total_overdue_derived), 0) as totalLoanOverdueAmount
|
||||
from m_group topgroup
|
||||
join m_office o on o.id = topgroup.office_id and o.hierarchy like concat('${currentUserHierarchy}', '%')
|
||||
join m_group g on g.hierarchy like concat(topgroup.hierarchy, '%')
|
||||
join m_loan l on l.group_id = g.id
|
||||
left join m_loan_arrears_aging laa on laa.loan_id = l.id
|
||||
left join m_currency cur on cur.code = l.currency_code
|
||||
where topgroup.id = ${groupId}
|
||||
and l.disbursedon_date is not null
|
||||
group by l.currency_code
|
||||
");
|
||||
|
||||
|
||||
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('report', 'READ_GroupSummaryAmounts', 'GroupSummaryAmounts', 'READ', 0);
|
||||
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `acc_accounting_rule`
|
||||
CHANGE COLUMN `id` `id` BIGINT(20) NOT NULL AUTO_INCREMENT FIRST;
|
||||
@@ -0,0 +1,12 @@
|
||||
/*add accounting type field to savings product*/
|
||||
ALTER TABLE `m_savings_product`
|
||||
ADD COLUMN `accounting_type` SMALLINT(5) NOT NULL AFTER `lockin_period_frequency_enum`;
|
||||
|
||||
/*update existing savings products to have "No" accounting*/
|
||||
update m_savings_product set accounting_type=1;
|
||||
|
||||
/*track payment details for savings transactions*/
|
||||
ALTER TABLE `m_savings_account_transaction`
|
||||
ADD COLUMN `payment_detail_id` BIGINT(20) NULL DEFAULT NULL AFTER `savings_account_id`,
|
||||
ADD CONSTRAINT `FK_m_savings_account_transaction_m_payment_detail` FOREIGN KEY (`payment_detail_id`) REFERENCES `m_payment_detail` (`id`);
|
||||
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `m_document`
|
||||
CHANGE COLUMN `type` `type` VARCHAR(500) NULL DEFAULT NULL AFTER `size`;
|
||||
@@ -0,0 +1,11 @@
|
||||
create table `acc_rule_tags` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`acc_rule_id` BIGINT(20) NOT NULL,
|
||||
`tag_id` INT(11) NOT NULL,
|
||||
`acc_type_enum` SMALLINT(5) NOT NULL,
|
||||
primary key(`id`),
|
||||
INDEX `FK_acc_accounting_rule_id` (`acc_rule_id`),
|
||||
INDEX `FK_m_code_value_id` (`tag_id`),
|
||||
CONSTRAINT `FK_acc_accounting_rule_id` FOREIGN KEY (`acc_rule_id`) REFERENCES `acc_accounting_rule` (`id`),
|
||||
CONSTRAINT `FK_m_code_value_id` FOREIGN KEY (`tag_id`) REFERENCES `m_code_value` (`id`)
|
||||
);
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES
|
||||
('configuration', 'CREATE_DATATABLE', 'DATATABLE', 'CREATE', 0),
|
||||
('configuration', 'CREATE_DATATABLE_CHECKER', 'DATATABLE', 'CREATE', 0),
|
||||
('configuration', 'UPDATE_DATATABLE', 'DATATABLE', 'UPDATE', 0),
|
||||
('configuration', 'UPDATE_DATATABLE_CHECKER', 'DATATABLE', 'UPDATE', 0),
|
||||
('configuration', 'DELETE_DATATABLE', 'DATATABLE', 'DELETE', 0),
|
||||
('configuration', 'DELETE_DATATABLE_CHECKER', 'DATATABLE', 'DELETE', 0);
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
ALTER TABLE `m_appuser`
|
||||
ADD COLUMN `staff_id` BIGINT(20) NULL DEFAULT NULL AFTER `office_id` ;
|
||||
|
||||
ALTER TABLE m_appuser
|
||||
ADD CONSTRAINT `fk_m_appuser_002`
|
||||
FOREIGN KEY (`staff_id`)
|
||||
REFERENCES m_staff (`id`)
|
||||
ON DELETE NO ACTION
|
||||
ON UPDATE NO ACTION
|
||||
,ADD INDEX `fk_m_appuser_002x` (`staff_id` ASC);
|
||||
|
||||
ALTER TABLE `m_staff`
|
||||
ADD COLUMN `organisational_role_enum` SMALLINT NULL DEFAULT NULL AFTER `external_id`,
|
||||
ADD COLUMN `organisational_role_parent_staff_id` BIGINT(20) NULL DEFAULT NULL AFTER `organisational_role_enum`;
|
||||
@@ -0,0 +1,78 @@
|
||||
INSERT INTO c_configuration (name,enabled) VALUES ('amazon-S3',0);
|
||||
|
||||
/*New table for storing details of external services used*/
|
||||
CREATE TABLE `c_external_service` (
|
||||
`name` VARCHAR(150) NOT NULL,
|
||||
`value` VARCHAR(250) NULL DEFAULT NULL,
|
||||
UNIQUE INDEX `name` (`name`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO c_external_service (name) VALUES ('s3_bucket_name');
|
||||
INSERT INTO c_external_service (name) VALUES ('s3_access_key');
|
||||
INSERT INTO c_external_service (name) VALUES ('s3_secret_key');
|
||||
|
||||
|
||||
|
||||
/*Image tables stores details of all images*/
|
||||
CREATE TABLE IF NOT EXISTS `m_image`(
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`location` varchar(500),
|
||||
`storage_type_enum` SMALLINT(5),
|
||||
PRIMARY KEY (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
/*Client points to image table*/
|
||||
ALTER TABLE `m_client`
|
||||
ADD COLUMN `image_id` BIGINT(20) NULL DEFAULT NULL AFTER `display_name`,
|
||||
ADD CONSTRAINT `FK_m_client_m_image` FOREIGN KEY (`image_id`) REFERENCES `m_image` (`id`);
|
||||
|
||||
/*Move existing image locations to new table*/
|
||||
drop procedure if exists migrate_customer_image_data;
|
||||
|
||||
delimiter #
|
||||
create procedure migrate_customer_image_data()
|
||||
begin
|
||||
DECLARE v_counter INT DEFAULT 0;
|
||||
DECLARE num_of_clients INT DEFAULT 0;
|
||||
DECLARE curr_image INT DEFAULT 0;
|
||||
DECLARE prev_image INT DEFAULT 0;
|
||||
SELECT COUNT(*) FROM m_client INTO num_of_clients;
|
||||
SET @curr_client := 0;
|
||||
while v_counter < num_of_clients do
|
||||
SET @s = CONCAT('INSERT INTO m_image(`location`,`storage_type_enum`) select image_key, 1 FROM m_client where image_key is not null LIMIT ', v_counter , ', ', 1);
|
||||
PREPARE stmt1 FROM @s;
|
||||
EXECUTE stmt1;
|
||||
DEALLOCATE PREPARE stmt1;
|
||||
|
||||
select ifnull(max(`id`),0) from m_image INTO curr_image;
|
||||
SET @z = CONCAT('select id INTO @curr_client FROM m_client where image_key is not null limit ', v_counter , ', ', 1);
|
||||
PREPARE stmt2 FROM @z;
|
||||
EXECUTE stmt2;
|
||||
|
||||
IF (prev_image != curr_image) THEN UPDATE m_client set image_id = curr_image where id=@curr_client;
|
||||
END IF;
|
||||
|
||||
set prev_image=curr_image;
|
||||
set v_counter=v_counter+1;
|
||||
end while;
|
||||
delete from m_image where `location` is null;
|
||||
end#
|
||||
|
||||
delimiter ;
|
||||
call migrate_customer_image_data();
|
||||
|
||||
/*Now drop the procedure*/
|
||||
drop procedure if exists migrate_customer_image_data;
|
||||
|
||||
/*Delete image key from client*/
|
||||
ALTER TABLE `m_client` DROP COLUMN `image_key`;
|
||||
|
||||
|
||||
/*Add storage type for m_document table and update existing documents to file storage*/
|
||||
ALTER TABLE m_document ADD COLUMN storage_type_enum SMALLINT(5);
|
||||
UPDATE m_document set storage_type_enum=1;
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
CREATE TABLE `m_loan_charge_paid_by` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`loan_transaction_id` BIGINT(20) NOT NULL,
|
||||
`loan_charge_id` BIGINT(20) NOT NULL,
|
||||
`amount` DECIMAL(19,6) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `FK__m_loan_transaction` (`loan_transaction_id`),
|
||||
INDEX `FK__m_loan_charge` (`loan_charge_id`),
|
||||
CONSTRAINT `FK__m_loan_charge` FOREIGN KEY (`loan_charge_id`) REFERENCES `m_loan_charge` (`id`),
|
||||
CONSTRAINT `FK__m_loan_transaction` FOREIGN KEY (`loan_transaction_id`) REFERENCES `m_loan_transaction` (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
ALTER TABLE `m_product_loan`
|
||||
ADD COLUMN `grace_on_principal_periods` SMALLINT(5) NULL DEFAULT NULL AFTER `max_number_of_repayments`,
|
||||
ADD COLUMN `grace_on_interest_periods` SMALLINT(5) NULL DEFAULT NULL AFTER `grace_on_principal_periods`,
|
||||
ADD COLUMN `grace_interest_free_periods` SMALLINT(5) NULL DEFAULT NULL AFTER `grace_on_interest_periods`;
|
||||
|
||||
ALTER TABLE `m_loan`
|
||||
ADD COLUMN `grace_on_principal_periods` SMALLINT(5) NULL DEFAULT NULL AFTER `number_of_repayments`,
|
||||
ADD COLUMN `grace_on_interest_periods` SMALLINT(5) NULL DEFAULT NULL AFTER `grace_on_principal_periods`,
|
||||
ADD COLUMN `grace_interest_free_periods` SMALLINT(5) NULL DEFAULT NULL AFTER `grace_on_interest_periods`;
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
ALTER TABLE `m_loan_repayment_schedule`
|
||||
ADD COLUMN `obligations_met_on_date` DATE NULL DEFAULT NULL AFTER `completed_derived`;
|
||||
|
||||
ALTER TABLE `m_loan_repayment_schedule`
|
||||
CHANGE COLUMN `interest_waived_derived` `interest_waived_derived` DECIMAL(19,6) NULL DEFAULT NULL AFTER `interest_writtenoff_derived` ;
|
||||
@@ -0,0 +1,6 @@
|
||||
ALTER TABLE `acc_accounting_rule`
|
||||
ADD COLUMN `allow_multiple_debits` TINYINT(1) NOT NULL DEFAULT '0' AFTER `debit_account_id`,
|
||||
ADD COLUMN `allow_multiple_credits` TINYINT(1) NOT NULL DEFAULT '0' AFTER `credit_account_id`;
|
||||
|
||||
ALTER TABLE acc_rule_tags
|
||||
ADD UNIQUE KEY `UNIQUE_ACCOUNT_RULE_TAGS` (`acc_rule_id`,`tag_id`,`acc_type_enum`);
|
||||
@@ -0,0 +1,3 @@
|
||||
ALTER TABLE `m_loan_repayment_schedule`
|
||||
ADD COLUMN `total_paid_in_advance_derived` DECIMAL(19,6) NULL DEFAULT NULL AFTER `penalty_charges_waived_derived`,
|
||||
ADD COLUMN `total_paid_late_derived` DECIMAL(19,6) NULL DEFAULT NULL AFTER `total_paid_in_advance_derived`;
|
||||
@@ -0,0 +1,3 @@
|
||||
ALTER TABLE `acc_product_mapping`
|
||||
ADD COLUMN `charge_id` BIGINT(20) NULL DEFAULT NULL AFTER `payment_type`,
|
||||
ADD CONSTRAINT `FK_acc_product_mapping_m_charge` FOREIGN KEY (`charge_id`) REFERENCES `m_charge` (`id`);
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
ALTER TABLE `ref_loan_transaction_processing_strategy`
|
||||
DROP COLUMN `lastmodified_date` ,
|
||||
DROP COLUMN `lastmodifiedby_id` ,
|
||||
DROP COLUMN `created_date` ,
|
||||
DROP COLUMN `createdby_id` ;
|
||||
|
||||
|
||||
INSERT INTO `ref_loan_transaction_processing_strategy` (`id`, `code`, `name`) VALUES
|
||||
(5,'principal-interest-penalties-fees-order-strategy', 'Principal Interest Penalties Fees Order');
|
||||
|
||||
INSERT INTO `ref_loan_transaction_processing_strategy` (`id`,`code`, `name`)
|
||||
VALUES (6,'interest-principal-penalties-fees-order-strategy', 'Interest Principal Penalties Fees Order');
|
||||
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `m_loan`
|
||||
ADD COLUMN `total_overpaid_derived` DECIMAL(19,6) NULL DEFAULT NULL AFTER `total_outstanding_derived`;
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
ALTER TABLE `acc_accounting_rule`
|
||||
CHANGE COLUMN `debit_account_id` `debit_account_id` BIGINT(20) NULL DEFAULT NULL AFTER `office_id`,
|
||||
CHANGE COLUMN `credit_account_id` `credit_account_id` BIGINT(20) NULL DEFAULT NULL AFTER `allow_multiple_debits`;
|
||||
@@ -0,0 +1,22 @@
|
||||
|
||||
create table `m_holiday`(
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(100) NOT NULL,
|
||||
`from_date` DATETIME NOT NULL,
|
||||
`to_date` DATETIME NOT NULL,
|
||||
`description` varchar(100) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `holiday_name` (`name`)
|
||||
);
|
||||
|
||||
CREATE TABLE `m_holiday_office` (
|
||||
`holiday_id` BIGINT(20) NOT NULL,
|
||||
`office_id` BIGINT(20) NOT NULL,
|
||||
PRIMARY KEY (`holiday_id`, `office_id`),
|
||||
INDEX `m_holiday_id_ibfk_1` (`holiday_id`),
|
||||
INDEX `m_office_id_ibfk_2` (`office_id`),
|
||||
CONSTRAINT `m_holiday_id_ibfk_1` FOREIGN KEY (`holiday_id`) REFERENCES `m_holiday` (`id`),
|
||||
CONSTRAINT `m_office_id_ibfk_2` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`)
|
||||
);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('organisation', 'CREATE_HOLIDAY', 'HOLIDAY', 'CREATE', 0);
|
||||
@@ -0,0 +1,22 @@
|
||||
INSERT INTO `m_code` (`code_name`, `is_system_defined`) VALUES ('GROUPROLE', 1);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'ASSIGNROLE_GROUP', 'GROUP', 'ASSIGNROLE', 0);
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'UNASSIGNROLE_GROUP', 'GROUP', 'UNASSIGNROLE', 0);
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'UPDATEROLE_GROUP', 'GROUP', 'UPDATEROLE', 0);
|
||||
|
||||
CREATE TABLE `m_group_roles` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`client_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`group_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`role_cv_id` INT(11) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `FKGroupRoleClientId` (`client_id`),
|
||||
INDEX `FKGroupRoleGroupId` (`group_id`),
|
||||
INDEX `FK_grouprole_m_codevalue` (`role_cv_id`),
|
||||
UNIQUE INDEX `UNIQUE_GROUP_ROLES` (`client_id`, `group_id`, `role_cv_id`),
|
||||
CONSTRAINT `FKGroupRoleClientId` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`),
|
||||
CONSTRAINT `FKGroupRoleGroupId` FOREIGN KEY (`group_id`) REFERENCES `m_group` (`id`),
|
||||
CONSTRAINT `FK_grouprole_m_codevalue` FOREIGN KEY (`role_cv_id`) REFERENCES `m_code_value` (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
@@ -0,0 +1,320 @@
|
||||
/* Leaving as out-of-box (but non-core reports) for now
|
||||
could be removed later if people think too many non-generic
|
||||
reports are being added
|
||||
used in quipo TEVI dashboard (landing pages) */
|
||||
|
||||
DELETE FROM `stretchy_report` where report_name = 'FieldAgentStats';
|
||||
DELETE FROM `stretchy_report` where report_name = 'FieldAgentPrograms';
|
||||
DELETE FROM `stretchy_report` where report_name = 'ProgramDetails';
|
||||
DELETE FROM `stretchy_report` where report_name = 'ChildrenStaffList';
|
||||
DELETE FROM `stretchy_report` where report_name = 'CoordinatorStats';
|
||||
DELETE FROM `stretchy_report` where report_name = 'BranchManagerStats';
|
||||
DELETE FROM `stretchy_report` where report_name = 'ProgramDirectorStats';
|
||||
DELETE FROM `stretchy_report` where report_name = 'ProgramStats';
|
||||
|
||||
DELETE FROM `m_permission` where entity_name = 'FieldAgentStats';
|
||||
DELETE FROM `m_permission` where entity_name = 'FieldAgentPrograms';
|
||||
DELETE FROM `m_permission` where entity_name = 'ProgramDetails';
|
||||
DELETE FROM `m_permission` where entity_name = 'ChildrenStaffList';
|
||||
DELETE FROM `m_permission` where entity_name = 'CoordinatorStats';
|
||||
DELETE FROM `m_permission` where entity_name = 'BranchManagerStats';
|
||||
DELETE FROM `m_permission` where entity_name = 'ProgramDirectorStats';
|
||||
DELETE FROM `m_permission` where entity_name = 'ProgramStats';
|
||||
|
||||
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_category`, `core_report`, `use_report`, `description`, `report_sql`)
|
||||
VALUES ('FieldAgentStats', 'Table', 'Quipo', false, false, 'Field Agent Statistics',
|
||||
|
||||
"
|
||||
select ifnull(cur.display_symbol, l.currency_code) as Currency,
|
||||
/*This query will return more than one entry if more than one currency is used */
|
||||
count(distinct(c.id)) as activeClients, count(*) as activeLoans,
|
||||
sum(l.principal_disbursed_derived) as disbursedAmount,
|
||||
sum(l.principal_outstanding_derived) as loanOutstandingAmount,
|
||||
round((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,
|
||||
'???' as loanOverPaymentAmount,
|
||||
sum(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
l.principal_outstanding_derived,0)) as portfolioAtRisk,
|
||||
|
||||
round((sum(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,
|
||||
|
||||
count(distinct(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
c.id,null))) as clientsInDefault,
|
||||
round((count(distinct(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,
|
||||
(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount
|
||||
from m_staff fa
|
||||
join m_office o on o.id = fa.office_id
|
||||
and o.hierarchy like concat('${currentUserHierarchy}', '%')
|
||||
join m_group pgm on pgm.staff_id = fa.id
|
||||
join m_loan l on l.group_id = pgm.id and l.client_id is not null
|
||||
left join m_currency cur on cur.code = l.currency_code
|
||||
left join m_loan_arrears_aging laa on laa.loan_id = l.id
|
||||
join m_client c on c.id = l.client_id
|
||||
where fa.id = ${staffId}
|
||||
and l.loan_status_id = 300
|
||||
group by l.currency_code
|
||||
");
|
||||
|
||||
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_category`, `core_report`, `use_report`, `description`, `report_sql`)
|
||||
VALUES ('FieldAgentPrograms', 'Table', 'Quipo', false, false, 'List of Field Agent Programs',
|
||||
|
||||
"
|
||||
select pgm.id, pgm.display_name as `name`, sts.enum_message_property as status
|
||||
from m_group pgm
|
||||
join m_office o on o.id = pgm.office_id
|
||||
and o.hierarchy like concat('${currentUserHierarchy}', '%')
|
||||
left join r_enum_value sts on sts.enum_name = 'status_enum' and sts.enum_id = pgm.status_enum
|
||||
where pgm.staff_id = ${staffId}
|
||||
");
|
||||
|
||||
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_category`, `core_report`, `use_report`, `description`, `report_sql`)
|
||||
VALUES ('ProgramDetails', 'Table', 'Quipo', false, false, 'List of Loans in a Program',
|
||||
|
||||
"
|
||||
select l.id as loanId, l.account_no as loanAccountNo, c.id as clientId, c.account_no as clientAccountNo,
|
||||
pgm.display_name as programName,
|
||||
|
||||
(select count(*)
|
||||
from m_loan cy
|
||||
where cy.group_id = pgm.id and cy.client_id =c.id
|
||||
and cy.disbursedon_date <= l.disbursedon_date) as loanCycleNo,
|
||||
|
||||
c.display_name as clientDisplayName,
|
||||
ifnull(cur.display_symbol, l.currency_code) as Currency,
|
||||
ifnull(l.principal_repaid_derived,0.0) as loanRepaidAmount,
|
||||
ifnull(l.principal_outstanding_derived, 0.0) as loanOutstandingAmount,
|
||||
'???' as loanInAdvanceAmount,
|
||||
|
||||
ifnull(laa.principal_overdue_derived, 0.0) as loanInArrearsAmount,
|
||||
if(ifnull(laa.principal_overdue_derived, 0.00) > 0, 'Yes', 'No') as inDefault,
|
||||
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
l.principal_outstanding_derived,0) as portfolioAtRisk
|
||||
|
||||
from m_group pgm
|
||||
join m_office o on o.id = pgm.office_id
|
||||
and o.hierarchy like concat('${currentUserHierarchy}', '%')
|
||||
join m_loan l on l.group_id = pgm.id and l.client_id is not null
|
||||
left join m_currency cur on cur.code = l.currency_code
|
||||
join m_client c on c.id = l.client_id
|
||||
left join m_loan_arrears_aging laa on laa.loan_id = l.id
|
||||
where pgm.id = ${programId}
|
||||
and l.loan_status_id = 300
|
||||
order by c.display_name, l.account_no
|
||||
|
||||
");
|
||||
|
||||
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_category`, `core_report`, `use_report`, `description`, `report_sql`)
|
||||
VALUES ('ChildrenStaffList', 'Table', 'Quipo', false, false, 'Get Next Level Down Staff',
|
||||
|
||||
"
|
||||
select s.id, s.display_name,
|
||||
s.firstname, s.lastname, s.organisational_role_enum,
|
||||
s.organisational_role_parent_staff_id,
|
||||
sp.display_name as `organisational_role_parent_staff_display_name`
|
||||
from m_staff s
|
||||
join m_staff sp on s.organisational_role_parent_staff_id = sp.id
|
||||
where s.organisational_role_parent_staff_id = ${staffId}
|
||||
");
|
||||
|
||||
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_category`, `core_report`, `use_report`, `description`, `report_sql`)
|
||||
VALUES ('CoordinatorStats', 'Table', 'Quipo', false, false, 'Coordinator Statistics',
|
||||
|
||||
"
|
||||
select ifnull(cur.display_symbol, l.currency_code) as Currency,
|
||||
/*This query will return more than one entry if more than one currency is used */
|
||||
count(distinct(c.id)) as activeClients, count(*) as activeLoans,
|
||||
sum(l.principal_disbursed_derived) as disbursedAmount,
|
||||
sum(l.principal_outstanding_derived) as loanOutstandingAmount,
|
||||
round((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,
|
||||
'???' as loanOverPaymentAmount,
|
||||
sum(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
l.principal_outstanding_derived,0)) as portfolioAtRisk,
|
||||
|
||||
round((sum(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,
|
||||
|
||||
count(distinct(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
c.id,null))) as clientsInDefault,
|
||||
round((count(distinct(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,
|
||||
(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount
|
||||
from m_staff coord
|
||||
join m_staff fa on fa.organisational_role_parent_staff_id = coord.id
|
||||
join m_office o on o.id = fa.office_id
|
||||
and o.hierarchy like concat('${currentUserHierarchy}', '%')
|
||||
join m_group pgm on pgm.staff_id = fa.id
|
||||
join m_loan l on l.group_id = pgm.id and l.client_id is not null
|
||||
left join m_currency cur on cur.code = l.currency_code
|
||||
left join m_loan_arrears_aging laa on laa.loan_id = l.id
|
||||
join m_client c on c.id = l.client_id
|
||||
where coord.id = ${staffId}
|
||||
and l.loan_status_id = 300
|
||||
group by l.currency_code
|
||||
");
|
||||
|
||||
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_category`, `core_report`, `use_report`, `description`, `report_sql`)
|
||||
VALUES ('BranchManagerStats', 'Table', 'Quipo', false, false, 'Branch Manager Statistics',
|
||||
|
||||
"
|
||||
select ifnull(cur.display_symbol, l.currency_code) as Currency,
|
||||
/*This query will return more than one entry if more than one currency is used */
|
||||
count(distinct(c.id)) as activeClients, count(*) as activeLoans,
|
||||
sum(l.principal_disbursed_derived) as disbursedAmount,
|
||||
sum(l.principal_outstanding_derived) as loanOutstandingAmount,
|
||||
round((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,
|
||||
'???' as loanOverPaymentAmount,
|
||||
sum(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
l.principal_outstanding_derived,0)) as portfolioAtRisk,
|
||||
|
||||
round((sum(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,
|
||||
|
||||
count(distinct(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
c.id,null))) as clientsInDefault,
|
||||
round((count(distinct(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,
|
||||
(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount
|
||||
from m_staff bm
|
||||
join m_staff coord on coord.organisational_role_parent_staff_id = bm.id
|
||||
join m_staff fa on fa.organisational_role_parent_staff_id = coord.id
|
||||
join m_office o on o.id = fa.office_id
|
||||
and o.hierarchy like concat('${currentUserHierarchy}', '%')
|
||||
join m_group pgm on pgm.staff_id = fa.id
|
||||
join m_loan l on l.group_id = pgm.id and l.client_id is not null
|
||||
left join m_currency cur on cur.code = l.currency_code
|
||||
left join m_loan_arrears_aging laa on laa.loan_id = l.id
|
||||
join m_client c on c.id = l.client_id
|
||||
where bm.id = ${staffId}
|
||||
and l.loan_status_id = 300
|
||||
group by l.currency_code
|
||||
");
|
||||
|
||||
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_category`, `core_report`, `use_report`, `description`, `report_sql`)
|
||||
VALUES ('ProgramDirectorStats', 'Table', 'Quipo', false, false, 'Program DirectorStatistics',
|
||||
|
||||
"
|
||||
select ifnull(cur.display_symbol, l.currency_code) as Currency,
|
||||
/*This query will return more than one entry if more than one currency is used */
|
||||
count(distinct(c.id)) as activeClients, count(*) as activeLoans,
|
||||
sum(l.principal_disbursed_derived) as disbursedAmount,
|
||||
sum(l.principal_outstanding_derived) as loanOutstandingAmount,
|
||||
round((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,
|
||||
'???' as loanOverPaymentAmount,
|
||||
sum(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
l.principal_outstanding_derived,0)) as portfolioAtRisk,
|
||||
|
||||
round((sum(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,
|
||||
|
||||
count(distinct(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
c.id,null))) as clientsInDefault,
|
||||
round((count(distinct(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,
|
||||
(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount
|
||||
from m_staff pd
|
||||
join m_staff bm on bm.organisational_role_parent_staff_id = pd.id
|
||||
join m_staff coord on coord.organisational_role_parent_staff_id = bm.id
|
||||
join m_staff fa on fa.organisational_role_parent_staff_id = coord.id
|
||||
join m_office o on o.id = fa.office_id
|
||||
and o.hierarchy like concat('${currentUserHierarchy}', '%')
|
||||
join m_group pgm on pgm.staff_id = fa.id
|
||||
join m_loan l on l.group_id = pgm.id and l.client_id is not null
|
||||
left join m_currency cur on cur.code = l.currency_code
|
||||
left join m_loan_arrears_aging laa on laa.loan_id = l.id
|
||||
join m_client c on c.id = l.client_id
|
||||
where pd.id = ${staffId}
|
||||
and l.loan_status_id = 300
|
||||
group by l.currency_code
|
||||
");
|
||||
|
||||
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_category`, `core_report`, `use_report`, `description`, `report_sql`)
|
||||
VALUES ('ProgramStats', 'Table', 'Quipo', false, false, 'Program Statistics',
|
||||
|
||||
"
|
||||
select ifnull(cur.display_symbol, l.currency_code) as Currency,
|
||||
/*This query will return more than one entry if more than one currency is used */
|
||||
count(distinct(c.id)) as activeClients, count(*) as activeLoans,
|
||||
sum(l.principal_disbursed_derived) as disbursedAmount,
|
||||
sum(l.principal_outstanding_derived) as loanOutstandingAmount,
|
||||
round((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,
|
||||
'???' as loanOverPaymentAmount,
|
||||
sum(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
l.principal_outstanding_derived,0)) as portfolioAtRisk,
|
||||
|
||||
round((sum(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,
|
||||
|
||||
count(distinct(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
c.id,null))) as clientsInDefault,
|
||||
round((count(distinct(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,
|
||||
(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount
|
||||
from m_group pgm
|
||||
join m_office o on o.id = pgm.office_id
|
||||
and o.hierarchy like concat('${currentUserHierarchy}', '%')
|
||||
join m_loan l on l.group_id = pgm.id and l.client_id is not null
|
||||
left join m_currency cur on cur.code = l.currency_code
|
||||
left join m_loan_arrears_aging laa on laa.loan_id = l.id
|
||||
join m_client c on c.id = l.client_id
|
||||
where pgm.id = ${programId}
|
||||
and l.loan_status_id = 300
|
||||
group by l.currency_code
|
||||
");
|
||||
|
||||
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('report', 'READ_FieldAgentStats', 'FieldAgentStats', 'READ', 0);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('report', 'READ_FieldAgentPrograms', 'FieldAgentPrograms', 'READ', 0);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('report', 'READ_ProgramDetails', 'ProgramDetails', 'READ', 0);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('report', 'READ_ChildrenStaffList', 'ChildrenStaffList', 'READ', 0);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('report', 'READ_CoordinatorStats', 'CoordinatorStats', 'READ', 0);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('report', 'READ_BranchManagerStats', 'BranchManagerStats', 'READ', 0);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('report', 'READ_ProgramDirectorStats', 'ProgramDirectorStats', 'READ', 0);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('report', 'READ_ProgramStats', 'ProgramStats', 'READ', 0);
|
||||
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
|
||||
/* Leaving as out-of-box (but non-core report) for now
|
||||
could be removed later if people think too many non-generic
|
||||
reports are being added
|
||||
similar example used in small MFI Elevate Africa */
|
||||
|
||||
|
||||
delete from stretchy_report_parameter
|
||||
where report_id = (select r.id from stretchy_report r where r.report_name = 'TxnRunningBalances');
|
||||
|
||||
DELETE FROM `stretchy_report` where report_name = 'TxnRunningBalances';
|
||||
|
||||
DELETE FROM `m_permission` where entity_name = 'TxnRunningBalances';
|
||||
|
||||
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_category`, `core_report`, `use_report`, `description`, `report_sql`)
|
||||
VALUES ('TxnRunningBalances', 'Table', 'Transaction', false, false,
|
||||
"Running Balance Txn report for Individual Lending.
|
||||
Suitable for small MFI's. Larger could use it using the branch or other parameters.
|
||||
Basically, suck it and see if its quick enough for you out-of-te box or whether it needs performance work in your situation.
|
||||
",
|
||||
|
||||
"
|
||||
select date('${startDate}') as 'Transaction Date', 'Opening Balance' as `Transaction Type`, null as Office,
|
||||
null as 'Loan Officer', null as `Loan Account No`, null as `Loan Product`, null as `Currency`,
|
||||
null as `Client Account No`, null as Client,
|
||||
null as Amount, null as Principal, null as Interest,
|
||||
@totalOutstandingPrincipal :=
|
||||
ifnull(round(sum(
|
||||
if (txn.transaction_type_enum = 1 /* disbursement */,
|
||||
ifnull(txn.amount,0.00),
|
||||
ifnull(txn.principal_portion_derived,0.00) * -1))
|
||||
,2),0.00) as 'Outstanding Principal',
|
||||
|
||||
@totalInterestIncome :=
|
||||
ifnull(round(sum(
|
||||
if (txn.transaction_type_enum in (2,5,8) /* repayment, repayment at disbursal, recovery repayment */,
|
||||
ifnull(txn.interest_portion_derived,0.00),
|
||||
0))
|
||||
,2),0.00) as 'Interest Income',
|
||||
|
||||
@totalWriteOff :=
|
||||
ifnull(round(sum(
|
||||
if (txn.transaction_type_enum = 6 /* write-off */,
|
||||
ifnull(txn.principal_portion_derived,0.00),
|
||||
0))
|
||||
,2),0.00) as 'Principal Write Off'
|
||||
from m_office o
|
||||
join m_office ounder on ounder.hierarchy like concat(o.hierarchy, '%')
|
||||
and ounder.hierarchy like concat('${currentUserHierarchy}', '%')
|
||||
join m_client c on c.office_id = ounder.id
|
||||
join m_loan l on l.client_id = c.id
|
||||
join m_product_loan lp on lp.id = l.product_id
|
||||
join m_loan_transaction txn on txn.loan_id = l.id
|
||||
left join m_currency cur on cur.code = l.currency_code
|
||||
where txn.is_reversed = false
|
||||
and txn.transaction_type_enum not in (10,11)
|
||||
and o.id = ${officeId}
|
||||
and txn.transaction_date < date('${startDate}')
|
||||
|
||||
union all
|
||||
|
||||
select x.`Transaction Date`, x.`Transaction Type`, x.Office, x.`Loan Officer`, x.`Loan Account No`, x.`Loan Product`, x.`Currency`,
|
||||
x.`Client Account No`, x.Client, x.Amount, x.Principal, x.Interest,
|
||||
cast(round(
|
||||
if (x.transaction_type_enum = 1 /* disbursement */,
|
||||
@totalOutstandingPrincipal := @totalOutstandingPrincipal + x.`Amount`,
|
||||
@totalOutstandingPrincipal := @totalOutstandingPrincipal - x.`Principal`)
|
||||
,2) as decimal(19,2)) as 'Outstanding Principal',
|
||||
cast(round(
|
||||
if (x.transaction_type_enum in (2,5,8) /* repayment, repayment at disbursal, recovery repayment */,
|
||||
@totalInterestIncome := @totalInterestIncome + x.`Interest`,
|
||||
@totalInterestIncome)
|
||||
,2) as decimal(19,2)) as 'Interest Income',
|
||||
cast(round(
|
||||
if (x.transaction_type_enum = 6 /* write-off */,
|
||||
@totalWriteOff := @totalWriteOff + x.`Principal`,
|
||||
@totalWriteOff)
|
||||
,2) as decimal(19,2)) as 'Principal Write Off'
|
||||
from
|
||||
(select txn.transaction_type_enum, txn.id as txn_id, txn.transaction_date as 'Transaction Date',
|
||||
cast(
|
||||
ifnull(re.enum_message_property, concat('Unknown Transaction Type Value: ' , txn.transaction_type_enum))
|
||||
as char) as 'Transaction Type',
|
||||
ounder.`name` as Office, lo.display_name as 'Loan Officer',
|
||||
l.account_no as 'Loan Account No', lp.`name` as 'Loan Product',
|
||||
ifnull(cur.display_symbol, l.currency_code) as Currency,
|
||||
c.account_no as 'Client Account No', c.display_name as 'Client',
|
||||
ifnull(txn.amount,0.00) as Amount,
|
||||
ifnull(txn.principal_portion_derived,0.00) as Principal,
|
||||
ifnull(txn.interest_portion_derived,0.00) as Interest
|
||||
from m_office o
|
||||
join m_office ounder on ounder.hierarchy like concat(o.hierarchy, '%')
|
||||
and ounder.hierarchy like concat('${currentUserHierarchy}', '%')
|
||||
join m_client c on c.office_id = ounder.id
|
||||
join m_loan l on l.client_id = c.id
|
||||
left join m_staff lo on lo.id = l.loan_officer_id
|
||||
join m_product_loan lp on lp.id = l.product_id
|
||||
join m_loan_transaction txn on txn.loan_id = l.id
|
||||
left join m_currency cur on cur.code = l.currency_code
|
||||
left join r_enum_value re on re.enum_name = 'transaction_type_enum'
|
||||
and re.enum_id = txn.transaction_type_enum
|
||||
where txn.is_reversed = false
|
||||
and txn.transaction_type_enum not in (10,11)
|
||||
and (ifnull(l.loan_officer_id, -10) = '${loanOfficerId}' or '-1' = '${loanOfficerId}')
|
||||
and o.id = ${officeId}
|
||||
and txn.transaction_date >= date('${startDate}')
|
||||
and txn.transaction_date <= date('${endDate}')
|
||||
order by txn.transaction_date, txn.id) x
|
||||
");
|
||||
|
||||
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('report', 'READ_TxnRunningBalances', 'TxnRunningBalances', 'READ', 0);
|
||||
|
||||
|
||||
insert into stretchy_report_parameter (report_id, parameter_id)
|
||||
select r.id, p.id
|
||||
from stretchy_report r,
|
||||
stretchy_parameter p
|
||||
where r.report_name = 'TxnRunningBalances'
|
||||
and p.parameter_name in ('startDateSelect', 'endDateSelect', 'OfficeIdSelectOne',
|
||||
'loanOfficerIdSelectAll');
|
||||
@@ -0,0 +1,5 @@
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'UNASSIGNSTAFF_CLIENT', 'CLIENT', 'UNASSIGNSTAFF', 0);
|
||||
ALTER TABLE m_client
|
||||
ADD COLUMN `staff_id` BIGINT(20) NULL DEFAULT NULL AFTER `office_id`,
|
||||
ADD INDEX `client_staff_id` (`staff_id`),
|
||||
ADD CONSTRAINT `FK_m_client_m_staff` FOREIGN KEY (`staff_id`) REFERENCES `m_staff` (`id`);
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
|
||||
|
||||
ALTER TABLE `m_loan`
|
||||
ADD COLUMN `sync_disbursement_with_meeting` TINYINT(1) NULL AFTER `loan_transaction_strategy_id`;
|
||||
@@ -0,0 +1 @@
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'ASSIGNSTAFF_CLIENT', 'CLIENT', 'ASSIGNSTAFF', 0);
|
||||
@@ -0,0 +1,5 @@
|
||||
/***Work around for issues on non Unicode safe connections**/
|
||||
UPDATE `m_currency` SET `display_symbol`=CHAR(226, 130, 185) WHERE `id`=64;
|
||||
|
||||
/***Update organization currencies if applicable***/
|
||||
update m_organisation_currency set display_symbol =CHAR(226, 130, 185) where code = "INR";
|
||||
@@ -0,0 +1,8 @@
|
||||
INSERT INTO `m_code` (`code_name`, `is_system_defined`) VALUES ('ClientClosureReason', 1);
|
||||
|
||||
ALTER TABLE `m_client` ADD COLUMN `closure_reason_cv_id` INT(11) NULL DEFAULT NULL,
|
||||
ADD COLUMN `closedon_date` DATE NULL DEFAULT NULL,
|
||||
ADD CONSTRAINT `FK_m_client_m_code` FOREIGN KEY (`closure_reason_cv_id`) REFERENCES `m_code_value` (`id`);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`) VALUES ('portfolio', 'CLOSE_CLIENT', 'CLIENT', 'CLOSE');
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/* table contains details of loans that have had overpayments aka payments in advance */
|
||||
|
||||
CREATE TABLE `m_loan_paid_in_advance` (
|
||||
`loan_id` bigint(20) NOT NULL,
|
||||
`principal_in_advance_derived` decimal(19,6) NOT NULL DEFAULT '0.000000',
|
||||
`interest_in_advance_derived` decimal(19,6) NOT NULL DEFAULT '0.000000',
|
||||
`fee_charges_in_advance_derived` decimal(19,6) NOT NULL DEFAULT '0.000000',
|
||||
`penalty_charges_in_advance_derived` decimal(19,6) NOT NULL DEFAULT '0.000000',
|
||||
`total_in_advance_derived` decimal(19,6) NOT NULL DEFAULT '0.000000',
|
||||
PRIMARY KEY (`loan_id`),
|
||||
CONSTRAINT `m_loan_paid_in_advance_ibfk_1` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
@@ -0,0 +1,326 @@
|
||||
/* Leaving as out-of-box (but non-core reports) for now
|
||||
could be removed later if people think too many non-generic
|
||||
reports are being added
|
||||
used in quipo TEVI dashboard (landing pages) */
|
||||
|
||||
DELETE FROM `stretchy_report` where report_name = 'FieldAgentStats';
|
||||
DELETE FROM `stretchy_report` where report_name = 'FieldAgentPrograms';
|
||||
DELETE FROM `stretchy_report` where report_name = 'ProgramDetails';
|
||||
DELETE FROM `stretchy_report` where report_name = 'ChildrenStaffList';
|
||||
DELETE FROM `stretchy_report` where report_name = 'CoordinatorStats';
|
||||
DELETE FROM `stretchy_report` where report_name = 'BranchManagerStats';
|
||||
DELETE FROM `stretchy_report` where report_name = 'ProgramDirectorStats';
|
||||
DELETE FROM `stretchy_report` where report_name = 'ProgramStats';
|
||||
|
||||
DELETE FROM `m_permission` where entity_name = 'FieldAgentStats';
|
||||
DELETE FROM `m_permission` where entity_name = 'FieldAgentPrograms';
|
||||
DELETE FROM `m_permission` where entity_name = 'ProgramDetails';
|
||||
DELETE FROM `m_permission` where entity_name = 'ChildrenStaffList';
|
||||
DELETE FROM `m_permission` where entity_name = 'CoordinatorStats';
|
||||
DELETE FROM `m_permission` where entity_name = 'BranchManagerStats';
|
||||
DELETE FROM `m_permission` where entity_name = 'ProgramDirectorStats';
|
||||
DELETE FROM `m_permission` where entity_name = 'ProgramStats';
|
||||
|
||||
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_category`, `core_report`, `use_report`, `description`, `report_sql`)
|
||||
VALUES ('FieldAgentStats', 'Table', 'Quipo', false, false, 'Field Agent Statistics',
|
||||
|
||||
"
|
||||
select ifnull(cur.display_symbol, l.currency_code) as Currency,
|
||||
/*This query will return more than one entry if more than one currency is used */
|
||||
count(distinct(c.id)) as activeClients, count(*) as activeLoans,
|
||||
sum(l.principal_disbursed_derived) as disbursedAmount,
|
||||
sum(l.principal_outstanding_derived) as loanOutstandingAmount,
|
||||
round((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,
|
||||
sum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,
|
||||
sum(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
l.principal_outstanding_derived,0)) as portfolioAtRisk,
|
||||
|
||||
round((sum(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,
|
||||
|
||||
count(distinct(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
c.id,null))) as clientsInDefault,
|
||||
round((count(distinct(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,
|
||||
(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount
|
||||
from m_staff fa
|
||||
join m_office o on o.id = fa.office_id
|
||||
and o.hierarchy like concat('${currentUserHierarchy}', '%')
|
||||
join m_group pgm on pgm.staff_id = fa.id
|
||||
join m_loan l on l.group_id = pgm.id and l.client_id is not null
|
||||
left join m_currency cur on cur.code = l.currency_code
|
||||
left join m_loan_arrears_aging laa on laa.loan_id = l.id
|
||||
left join m_loan_paid_in_advance lpa on lpa.loan_id = l.id
|
||||
join m_client c on c.id = l.client_id
|
||||
where fa.id = ${staffId}
|
||||
and l.loan_status_id = 300
|
||||
group by l.currency_code
|
||||
");
|
||||
|
||||
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_category`, `core_report`, `use_report`, `description`, `report_sql`)
|
||||
VALUES ('FieldAgentPrograms', 'Table', 'Quipo', false, false, 'List of Field Agent Programs',
|
||||
|
||||
"
|
||||
select pgm.id, pgm.display_name as `name`, sts.enum_message_property as status
|
||||
from m_group pgm
|
||||
join m_office o on o.id = pgm.office_id
|
||||
and o.hierarchy like concat('${currentUserHierarchy}', '%')
|
||||
left join r_enum_value sts on sts.enum_name = 'status_enum' and sts.enum_id = pgm.status_enum
|
||||
where pgm.staff_id = ${staffId}
|
||||
");
|
||||
|
||||
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_category`, `core_report`, `use_report`, `description`, `report_sql`)
|
||||
VALUES ('ProgramDetails', 'Table', 'Quipo', false, false, 'List of Loans in a Program',
|
||||
|
||||
"
|
||||
select l.id as loanId, l.account_no as loanAccountNo, c.id as clientId, c.account_no as clientAccountNo,
|
||||
pgm.display_name as programName,
|
||||
|
||||
(select count(*)
|
||||
from m_loan cy
|
||||
where cy.group_id = pgm.id and cy.client_id =c.id
|
||||
and cy.disbursedon_date <= l.disbursedon_date) as loanCycleNo,
|
||||
|
||||
c.display_name as clientDisplayName,
|
||||
ifnull(cur.display_symbol, l.currency_code) as Currency,
|
||||
ifnull(l.principal_repaid_derived,0.0) as loanRepaidAmount,
|
||||
ifnull(l.principal_outstanding_derived, 0.0) as loanOutstandingAmount,
|
||||
sum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,
|
||||
|
||||
ifnull(laa.principal_overdue_derived, 0.0) as loanInArrearsAmount,
|
||||
if(ifnull(laa.principal_overdue_derived, 0.00) > 0, 'Yes', 'No') as inDefault,
|
||||
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
l.principal_outstanding_derived,0) as portfolioAtRisk
|
||||
|
||||
from m_group pgm
|
||||
join m_office o on o.id = pgm.office_id
|
||||
and o.hierarchy like concat('${currentUserHierarchy}', '%')
|
||||
join m_loan l on l.group_id = pgm.id and l.client_id is not null
|
||||
left join m_currency cur on cur.code = l.currency_code
|
||||
join m_client c on c.id = l.client_id
|
||||
left join m_loan_arrears_aging laa on laa.loan_id = l.id
|
||||
left join m_loan_paid_in_advance lpa on lpa.loan_id = l.id
|
||||
where pgm.id = ${programId}
|
||||
and l.loan_status_id = 300
|
||||
order by c.display_name, l.account_no
|
||||
|
||||
");
|
||||
|
||||
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_category`, `core_report`, `use_report`, `description`, `report_sql`)
|
||||
VALUES ('ChildrenStaffList', 'Table', 'Quipo', false, false, 'Get Next Level Down Staff',
|
||||
|
||||
"
|
||||
select s.id, s.display_name,
|
||||
s.firstname, s.lastname, s.organisational_role_enum,
|
||||
s.organisational_role_parent_staff_id,
|
||||
sp.display_name as `organisational_role_parent_staff_display_name`
|
||||
from m_staff s
|
||||
join m_staff sp on s.organisational_role_parent_staff_id = sp.id
|
||||
where s.organisational_role_parent_staff_id = ${staffId}
|
||||
");
|
||||
|
||||
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_category`, `core_report`, `use_report`, `description`, `report_sql`)
|
||||
VALUES ('CoordinatorStats', 'Table', 'Quipo', false, false, 'Coordinator Statistics',
|
||||
|
||||
"
|
||||
select ifnull(cur.display_symbol, l.currency_code) as Currency,
|
||||
/*This query will return more than one entry if more than one currency is used */
|
||||
count(distinct(c.id)) as activeClients, count(*) as activeLoans,
|
||||
sum(l.principal_disbursed_derived) as disbursedAmount,
|
||||
sum(l.principal_outstanding_derived) as loanOutstandingAmount,
|
||||
round((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,
|
||||
sum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,
|
||||
sum(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
l.principal_outstanding_derived,0)) as portfolioAtRisk,
|
||||
|
||||
round((sum(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,
|
||||
|
||||
count(distinct(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
c.id,null))) as clientsInDefault,
|
||||
round((count(distinct(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,
|
||||
(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount
|
||||
from m_staff coord
|
||||
join m_staff fa on fa.organisational_role_parent_staff_id = coord.id
|
||||
join m_office o on o.id = fa.office_id
|
||||
and o.hierarchy like concat('${currentUserHierarchy}', '%')
|
||||
join m_group pgm on pgm.staff_id = fa.id
|
||||
join m_loan l on l.group_id = pgm.id and l.client_id is not null
|
||||
left join m_currency cur on cur.code = l.currency_code
|
||||
left join m_loan_arrears_aging laa on laa.loan_id = l.id
|
||||
left join m_loan_paid_in_advance lpa on lpa.loan_id = l.id
|
||||
join m_client c on c.id = l.client_id
|
||||
where coord.id = ${staffId}
|
||||
and l.loan_status_id = 300
|
||||
group by l.currency_code
|
||||
");
|
||||
|
||||
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_category`, `core_report`, `use_report`, `description`, `report_sql`)
|
||||
VALUES ('BranchManagerStats', 'Table', 'Quipo', false, false, 'Branch Manager Statistics',
|
||||
|
||||
"
|
||||
select ifnull(cur.display_symbol, l.currency_code) as Currency,
|
||||
/*This query will return more than one entry if more than one currency is used */
|
||||
count(distinct(c.id)) as activeClients, count(*) as activeLoans,
|
||||
sum(l.principal_disbursed_derived) as disbursedAmount,
|
||||
sum(l.principal_outstanding_derived) as loanOutstandingAmount,
|
||||
round((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,
|
||||
sum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,
|
||||
sum(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
l.principal_outstanding_derived,0)) as portfolioAtRisk,
|
||||
|
||||
round((sum(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,
|
||||
|
||||
count(distinct(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
c.id,null))) as clientsInDefault,
|
||||
round((count(distinct(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,
|
||||
(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount
|
||||
from m_staff bm
|
||||
join m_staff coord on coord.organisational_role_parent_staff_id = bm.id
|
||||
join m_staff fa on fa.organisational_role_parent_staff_id = coord.id
|
||||
join m_office o on o.id = fa.office_id
|
||||
and o.hierarchy like concat('${currentUserHierarchy}', '%')
|
||||
join m_group pgm on pgm.staff_id = fa.id
|
||||
join m_loan l on l.group_id = pgm.id and l.client_id is not null
|
||||
left join m_currency cur on cur.code = l.currency_code
|
||||
left join m_loan_arrears_aging laa on laa.loan_id = l.id
|
||||
left join m_loan_paid_in_advance lpa on lpa.loan_id = l.id
|
||||
join m_client c on c.id = l.client_id
|
||||
where bm.id = ${staffId}
|
||||
and l.loan_status_id = 300
|
||||
group by l.currency_code
|
||||
");
|
||||
|
||||
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_category`, `core_report`, `use_report`, `description`, `report_sql`)
|
||||
VALUES ('ProgramDirectorStats', 'Table', 'Quipo', false, false, 'Program DirectorStatistics',
|
||||
|
||||
"
|
||||
select ifnull(cur.display_symbol, l.currency_code) as Currency,
|
||||
/*This query will return more than one entry if more than one currency is used */
|
||||
count(distinct(c.id)) as activeClients, count(*) as activeLoans,
|
||||
sum(l.principal_disbursed_derived) as disbursedAmount,
|
||||
sum(l.principal_outstanding_derived) as loanOutstandingAmount,
|
||||
round((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,
|
||||
sum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,
|
||||
sum(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
l.principal_outstanding_derived,0)) as portfolioAtRisk,
|
||||
|
||||
round((sum(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,
|
||||
|
||||
count(distinct(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
c.id,null))) as clientsInDefault,
|
||||
round((count(distinct(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,
|
||||
(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount
|
||||
from m_staff pd
|
||||
join m_staff bm on bm.organisational_role_parent_staff_id = pd.id
|
||||
join m_staff coord on coord.organisational_role_parent_staff_id = bm.id
|
||||
join m_staff fa on fa.organisational_role_parent_staff_id = coord.id
|
||||
join m_office o on o.id = fa.office_id
|
||||
and o.hierarchy like concat('${currentUserHierarchy}', '%')
|
||||
join m_group pgm on pgm.staff_id = fa.id
|
||||
join m_loan l on l.group_id = pgm.id and l.client_id is not null
|
||||
left join m_currency cur on cur.code = l.currency_code
|
||||
left join m_loan_arrears_aging laa on laa.loan_id = l.id
|
||||
left join m_loan_paid_in_advance lpa on lpa.loan_id = l.id
|
||||
join m_client c on c.id = l.client_id
|
||||
where pd.id = ${staffId}
|
||||
and l.loan_status_id = 300
|
||||
group by l.currency_code
|
||||
");
|
||||
|
||||
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_category`, `core_report`, `use_report`, `description`, `report_sql`)
|
||||
VALUES ('ProgramStats', 'Table', 'Quipo', false, false, 'Program Statistics',
|
||||
|
||||
"
|
||||
select ifnull(cur.display_symbol, l.currency_code) as Currency,
|
||||
/*This query will return more than one entry if more than one currency is used */
|
||||
count(distinct(c.id)) as activeClients, count(*) as activeLoans,
|
||||
sum(l.principal_disbursed_derived) as disbursedAmount,
|
||||
sum(l.principal_outstanding_derived) as loanOutstandingAmount,
|
||||
round((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,
|
||||
sum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,
|
||||
sum(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
l.principal_outstanding_derived,0)) as portfolioAtRisk,
|
||||
|
||||
round((sum(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,
|
||||
|
||||
count(distinct(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
c.id,null))) as clientsInDefault,
|
||||
round((count(distinct(
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,
|
||||
(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount
|
||||
from m_group pgm
|
||||
join m_office o on o.id = pgm.office_id
|
||||
and o.hierarchy like concat('${currentUserHierarchy}', '%')
|
||||
join m_loan l on l.group_id = pgm.id and l.client_id is not null
|
||||
left join m_currency cur on cur.code = l.currency_code
|
||||
left join m_loan_arrears_aging laa on laa.loan_id = l.id
|
||||
left join m_loan_paid_in_advance lpa on lpa.loan_id = l.id
|
||||
join m_client c on c.id = l.client_id
|
||||
where pgm.id = ${programId}
|
||||
and l.loan_status_id = 300
|
||||
group by l.currency_code
|
||||
");
|
||||
|
||||
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('report', 'READ_FieldAgentStats', 'FieldAgentStats', 'READ', 0);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('report', 'READ_FieldAgentPrograms', 'FieldAgentPrograms', 'READ', 0);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('report', 'READ_ProgramDetails', 'ProgramDetails', 'READ', 0);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('report', 'READ_ChildrenStaffList', 'ChildrenStaffList', 'READ', 0);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('report', 'READ_CoordinatorStats', 'CoordinatorStats', 'READ', 0);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('report', 'READ_BranchManagerStats', 'BranchManagerStats', 'READ', 0);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('report', 'READ_ProgramDirectorStats', 'ProgramDirectorStats', 'READ', 0);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`)
|
||||
VALUES ('report', 'READ_ProgramStats', 'ProgramStats', 'READ', 0);
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/* initialises m_loan_paid_in_advance table... same sql is run in daily batch job */
|
||||
|
||||
truncate m_loan_paid_in_advance;
|
||||
|
||||
INSERT INTO m_loan_paid_in_advance(loan_id, principal_in_advance_derived, interest_in_advance_derived,
|
||||
fee_charges_in_advance_derived, penalty_charges_in_advance_derived, total_in_advance_derived)
|
||||
select ml.id as loanId,SUM(ifnull(mr.principal_completed_derived, 0)) as principal_in_advance_derived,
|
||||
SUM(ifnull(mr.interest_completed_derived, 0)) as interest_in_advance_derived,
|
||||
SUM(ifnull(mr.fee_charges_completed_derived, 0)) as fee_charges_in_advance_derived,
|
||||
SUM(ifnull(mr.penalty_charges_completed_derived, 0)) as penalty_charges_in_advance_derived,
|
||||
|
||||
(SUM(ifnull(mr.principal_completed_derived, 0)) + SUM(ifnull(mr.interest_completed_derived, 0)) +
|
||||
SUM(ifnull(mr.fee_charges_completed_derived, 0)) + SUM(ifnull(mr.penalty_charges_completed_derived, 0))) as total_in_advance_derived
|
||||
FROM m_loan ml
|
||||
INNER JOIN m_loan_repayment_schedule mr on mr.loan_id = ml.id
|
||||
WHERE ml.loan_status_id = 300 and mr.duedate >= CURDATE()
|
||||
GROUP BY ml.id
|
||||
HAVING (SUM(ifnull(mr.principal_completed_derived, 0)) + SUM(ifnull(mr.interest_completed_derived, 0)) +
|
||||
SUM(ifnull(mr.fee_charges_completed_derived, 0)) + SUM(ifnull(mr.penalty_charges_completed_derived, 0))) > 0.0
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
update stretchy_report
|
||||
set report_sql =
|
||||
"
|
||||
select l.id as loanId, l.account_no as loanAccountNo, c.id as clientId, c.account_no as clientAccountNo,
|
||||
pgm.display_name as programName,
|
||||
|
||||
(select count(*)
|
||||
from m_loan cy
|
||||
where cy.group_id = pgm.id and cy.client_id =c.id
|
||||
and cy.disbursedon_date <= l.disbursedon_date) as loanCycleNo,
|
||||
|
||||
c.display_name as clientDisplayName,
|
||||
ifnull(cur.display_symbol, l.currency_code) as Currency,
|
||||
ifnull(l.principal_repaid_derived,0.0) as loanRepaidAmount,
|
||||
ifnull(l.principal_outstanding_derived, 0.0) as loanOutstandingAmount,
|
||||
ifnull(lpa.principal_in_advance_derived,0.0) as LoanPaidInAdvance,
|
||||
|
||||
ifnull(laa.principal_overdue_derived, 0.0) as loanInArrearsAmount,
|
||||
if(ifnull(laa.principal_overdue_derived, 0.00) > 0, 'Yes', 'No') as inDefault,
|
||||
|
||||
if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),
|
||||
l.principal_outstanding_derived,0) as portfolioAtRisk
|
||||
|
||||
from m_group pgm
|
||||
join m_office o on o.id = pgm.office_id
|
||||
and o.hierarchy like concat('${currentUserHierarchy}', '%')
|
||||
join m_loan l on l.group_id = pgm.id and l.client_id is not null
|
||||
left join m_currency cur on cur.code = l.currency_code
|
||||
join m_client c on c.id = l.client_id
|
||||
left join m_loan_arrears_aging laa on laa.loan_id = l.id
|
||||
left join m_loan_paid_in_advance lpa on lpa.loan_id = l.id
|
||||
where pgm.id = ${programId}
|
||||
and l.loan_status_id = 300
|
||||
order by c.display_name, l.account_no
|
||||
|
||||
"
|
||||
where report_name = 'ProgramDetails';
|
||||
@@ -0,0 +1 @@
|
||||
INSERT INTO `c_configuration` (`name`, `enabled`) VALUES ('reschedule-future-repayments', 1);
|
||||
@@ -0,0 +1,19 @@
|
||||
ALTER TABLE m_product_loan
|
||||
ADD COLUMN `include_in_borrower_cycle` TINYINT(1) NOT NULL DEFAULT '0';
|
||||
|
||||
CREATE TABLE `m_client_loan_counter` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`client_id` BIGINT(20) NOT NULL,
|
||||
`loan_product_id` BIGINT(20) NOT NULL,
|
||||
`loan_id` BIGINT(20) NOT NULL,
|
||||
`running_count` SMALLINT(4) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `FK_m_client_id_loan_counter` (`client_id`),
|
||||
INDEX `FK_m_loan_product_loan_counter` (`loan_product_id`),
|
||||
INDEX `FK_m_client_loan_counter` (`loan_id`),
|
||||
CONSTRAINT `FK_m_client_id_loan_counter` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`),
|
||||
CONSTRAINT `FK_m_loan_product_loan_counter` FOREIGN KEY (`loan_product_id`) REFERENCES `m_product_loan` (`id`),
|
||||
CONSTRAINT `FK_m_client_loan_counter` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
ALTER TABLE `m_holiday`
|
||||
ADD COLUMN `repayments_rescheduled_to` DATETIME NOT NULL AFTER `to_date`,
|
||||
ADD COLUMN `processed` TINYINT(1) NOT NULL DEFAULT '0' AFTER `repayments_rescheduled_to`;
|
||||
@@ -0,0 +1,4 @@
|
||||
DROP TABLE `m_client_loan_counter`;
|
||||
ALTER TABLE `m_loan`
|
||||
ADD COLUMN `loan_counter` SMALLINT NULL DEFAULT NULL AFTER `sync_disbursement_with_meeting`,
|
||||
ADD COLUMN `loan_product_counter` SMALLINT NULL DEFAULT NULL AFTER `loan_counter`;
|
||||
+1
@@ -0,0 +1 @@
|
||||
INSERT INTO `c_configuration` (`name`) VALUES ('reschedule-repayments-on-holidays');
|
||||
@@ -0,0 +1,12 @@
|
||||
/* break-out center and group permissions from porfolio grouping */
|
||||
|
||||
update m_permission
|
||||
set grouping = "portfolio_center"
|
||||
where code like '%center%'
|
||||
and grouping like 'portfolio';
|
||||
|
||||
|
||||
update m_permission
|
||||
set grouping = "portfolio_group"
|
||||
where code like '%group%'
|
||||
and grouping like 'portfolio';
|
||||
@@ -0,0 +1,2 @@
|
||||
alter table `m_product_loan` add column `start_date` DATE NULL DEFAULT NULL ,
|
||||
add column `close_date` DATE NULL DEFAULT NULL ;
|
||||
@@ -0,0 +1,5 @@
|
||||
/* grouping is misspelt but also should be under accounting */
|
||||
|
||||
update m_permission
|
||||
set grouping = 'accounting'
|
||||
where grouping = 'organistion';
|
||||
@@ -0,0 +1,45 @@
|
||||
CREATE TABLE `scheduled_jobs` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`job_name` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
|
||||
`job_display_name` VARCHAR(50) NOT NULL COLLATE 'latin1_swedish_ci',
|
||||
`cron_expression` VARCHAR(20) NOT NULL COLLATE 'latin1_swedish_ci',
|
||||
`create_time` DATETIME NOT NULL,
|
||||
`task_priority` SMALLINT(6) NOT NULL DEFAULT '5',
|
||||
`group_name` VARCHAR(50) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
|
||||
`previous_run_start_time` DATETIME NULL DEFAULT NULL,
|
||||
`next_run_time` DATETIME NULL DEFAULT NULL,
|
||||
`trigger_key` VARCHAR(500) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
|
||||
`job_initializing_errorlog` TEXT NULL COLLATE 'latin1_swedish_ci',
|
||||
`is_active` TINYINT(1) NOT NULL DEFAULT '1',
|
||||
PRIMARY KEY (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `scheduled_job_runhistory` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`job_id` BIGINT(20) NOT NULL,
|
||||
`version` BIGINT(20) NOT NULL,
|
||||
`start_time` DATETIME NOT NULL,
|
||||
`end_time` DATETIME NOT NULL,
|
||||
`status` VARCHAR(10) NOT NULL COLLATE 'latin1_swedish_ci',
|
||||
`errormessage` VARCHAR(500) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
|
||||
`triggertype` VARCHAR(25) NOT NULL COLLATE 'latin1_swedish_ci',
|
||||
`errorlog` TEXT NULL COLLATE 'latin1_swedish_ci',
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `scheduledjobsFK` (`job_id`),
|
||||
CONSTRAINT `scheduledjobsFK` FOREIGN KEY (`job_id`) REFERENCES `scheduled_jobs` (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
|
||||
|
||||
INSERT INTO `scheduled_jobs` (`job_name`, `job_display_name`, `cron_expression`, `create_time`, `task_priority`, `group_name`, `previous_run_start_time`, `next_run_time`, `trigger_key`, `job_initializing_errorlog`, `is_active`) VALUES ('Update loan Summary', 'Update loan Summary', '0 0 22 1/1 * ? *', now(), 5, NULL, NULL, NULL, NULL, NULL, 1);
|
||||
INSERT INTO `scheduled_jobs` (`job_name`, `job_display_name`, `cron_expression`, `create_time`, `task_priority`, `group_name`, `previous_run_start_time`, `next_run_time`, `trigger_key`, `job_initializing_errorlog`, `is_active`) VALUES ('Update Loan Arrears Ageing', 'Update Loan Arrears Ageing', '0 1 0 1/1 * ? *', now(), 5, NULL, NULL, NULL, NULL, NULL, 1);
|
||||
INSERT INTO `scheduled_jobs` (`job_name`, `job_display_name`, `cron_expression`, `create_time`, `task_priority`, `group_name`, `previous_run_start_time`, `next_run_time`, `trigger_key`, `job_initializing_errorlog`, `is_active`) VALUES ('Update Loan Paid In Advance', 'Update Loan Paid In Advance', '0 5 0 1/1 * ? *', now(), 5, NULL, NULL, NULL, NULL, NULL, 1);
|
||||
INSERT INTO `scheduled_jobs` (`job_name`, `job_display_name`, `cron_expression`, `create_time`, `task_priority`, `group_name`, `previous_run_start_time`, `next_run_time`, `trigger_key`, `job_initializing_errorlog`, `is_active`) VALUES ('Apply Annual Fee For Savings', 'Apply Annual Fee For Savings', '0 20 22 1/1 * ? *', now(), 5, NULL, NULL, NULL, NULL, NULL, 1);
|
||||
INSERT INTO `scheduled_jobs` (`job_name`, `job_display_name`, `cron_expression`, `create_time`, `task_priority`, `group_name`, `previous_run_start_time`, `next_run_time`, `trigger_key`, `job_initializing_errorlog`, `is_active`) VALUES ('Apply Holidays To Loans', 'Apply Holidays To Loans', '0 0 12 * * ?', now(), 5, NULL, NULL, NULL, NULL, NULL, 1);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
RENAME TABLE `scheduled_jobs` TO `job`;
|
||||
RENAME TABLE `scheduled_job_runhistory` TO `job_run_history`;
|
||||
|
||||
ALTER TABLE `job`
|
||||
ALTER `job_name` DROP DEFAULT,
|
||||
ALTER `job_display_name` DROP DEFAULT;
|
||||
ALTER TABLE `job`
|
||||
CHANGE COLUMN `job_name` `name` VARCHAR(50) NOT NULL,
|
||||
CHANGE COLUMN `job_display_name` `display_name` VARCHAR(50) NOT NULL;
|
||||
|
||||
ALTER TABLE `job`
|
||||
CHANGE COLUMN `job_initializing_errorlog` `initializing_errorlog` TEXT NULL;
|
||||
|
||||
|
||||
ALTER TABLE `job_run_history`
|
||||
ALTER `triggertype` DROP DEFAULT;
|
||||
ALTER TABLE `job_run_history`
|
||||
CHANGE COLUMN `errormessage` `error_message` VARCHAR(500) NULL DEFAULT NULL,
|
||||
CHANGE COLUMN `triggertype` `trigger_type` VARCHAR(25) NOT NULL,
|
||||
CHANGE COLUMN `errorlog` `error_log` TEXT NULL;
|
||||
@@ -0,0 +1,69 @@
|
||||
ALTER TABLE `m_note`
|
||||
ADD COLUMN `savings_account_id` BIGINT(20) NULL DEFAULT NULL AFTER `loan_transaction_id`,
|
||||
ADD COLUMN `savings_account_transaction_id` BIGINT(20) NULL DEFAULT NULL AFTER `savings_account_id`;
|
||||
|
||||
ALTER TABLE `m_note` ADD CONSTRAINT `FK_savings_account_id` FOREIGN KEY (`savings_account_id` ) REFERENCES `m_savings_account` (`id` ) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD INDEX `FK_savings_account_id` (`savings_account_id` ASC) ;
|
||||
|
||||
|
||||
ALTER TABLE `m_savings_account_transaction`
|
||||
CHANGE COLUMN `is_reversed` `is_reversed` TINYINT(1) NOT NULL AFTER `transaction_type_enum`,
|
||||
CHANGE COLUMN `balance_end_date_derived` `balance_end_date_derived` DATE NULL DEFAULT NULL AFTER `amount`,
|
||||
CHANGE COLUMN `balance_number_of_days_derived` `balance_number_of_days_derived` INT(11) NULL DEFAULT NULL AFTER `balance_end_date_derived`;
|
||||
|
||||
ALTER TABLE `m_savings_account`
|
||||
ADD COLUMN `field_officer_id` bigint(20) DEFAULT NULL AFTER `product_id`,
|
||||
ADD COLUMN `submittedon_date` DATE NOT NULL AFTER `status_enum`,
|
||||
ADD COLUMN `submittedon_userid` bigint(20) DEFAULT NULL AFTER `submittedon_date`,
|
||||
ADD COLUMN `approvedon_date` DATE DEFAULT NULL AFTER `submittedon_userid`,
|
||||
ADD COLUMN `approvedon_userid` bigint(20) DEFAULT NULL AFTER `approvedon_date`,
|
||||
ADD COLUMN `rejectedon_date` DATE DEFAULT NULL AFTER `approvedon_userid`,
|
||||
ADD COLUMN `rejectedon_userid` bigint(20) DEFAULT NULL AFTER `rejectedon_date`,
|
||||
ADD COLUMN `withdrawnon_date` DATE DEFAULT NULL AFTER `rejectedon_userid`,
|
||||
ADD COLUMN `withdrawnon_userid` bigint(20) DEFAULT NULL AFTER `withdrawnon_date`;
|
||||
|
||||
ALTER TABLE `m_savings_account`
|
||||
CHANGE COLUMN `activation_date` `activatedon_date` DATE NULL DEFAULT NULL AFTER `withdrawnon_userid`;
|
||||
|
||||
ALTER TABLE `m_savings_account`
|
||||
ADD COLUMN `activatedon_userid` bigint(20) DEFAULT NULL AFTER `activatedon_date`,
|
||||
ADD COLUMN `closedon_date` DATE DEFAULT NULL AFTER `activatedon_userid`,
|
||||
ADD COLUMN `closedon_userid` bigint(20) DEFAULT NULL AFTER `closedon_date`;
|
||||
|
||||
UPDATE `m_savings_account`
|
||||
SET
|
||||
`submittedon_date`=`activatedon_date`,
|
||||
`approvedon_date`=`activatedon_date`;
|
||||
|
||||
|
||||
INSERT INTO `m_permission`
|
||||
(`grouping`,`code`,`entity_name`,`action_name`,`can_maker_checker`)
|
||||
VALUES
|
||||
('transaction_savings', 'APPROVE_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'APPROVE', 1),
|
||||
('transaction_savings', 'REJECT_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'REJECT', 1),
|
||||
('transaction_savings', 'WITHDRAW_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'WITHDRAW', 1),
|
||||
('transaction_savings', 'APPROVALUNDO_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'APPROVALUNDO', 1),
|
||||
('transaction_savings', 'CLOSE_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'CLOSE', 1);
|
||||
|
||||
INSERT INTO `m_permission`
|
||||
(`grouping`,`code`,`entity_name`,`action_name`,`can_maker_checker`)
|
||||
VALUES
|
||||
('transaction_savings', 'APPROVE_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'APPROVE', 0),
|
||||
('transaction_savings', 'REJECT_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'REJECT', 0),
|
||||
('transaction_savings', 'WITHDRAW_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'WITHDRAW', 0),
|
||||
('transaction_savings', 'APPROVALUNDO_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'APPROVALUNDO', 0),
|
||||
('transaction_savings', 'CLOSE_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'CLOSE', 0);
|
||||
|
||||
|
||||
-- Remove permissions with 'in the past' permissions
|
||||
|
||||
DELETE FROM `m_permission` WHERE `id`='210';
|
||||
|
||||
DELETE FROM `m_permission` WHERE `id`='212';
|
||||
DELETE FROM `m_permission` WHERE `id`='214';
|
||||
DELETE FROM `m_permission` WHERE `id`='217';
|
||||
DELETE FROM `m_permission` WHERE `id`='220';
|
||||
DELETE FROM `m_permission` WHERE `id`='233';
|
||||
DELETE FROM `m_permission` WHERE `id`='235';
|
||||
DELETE FROM `m_permission` WHERE `id`='237';
|
||||
DELETE FROM `m_permission` WHERE `id`='240';
|
||||
DELETE FROM `m_permission` WHERE `id`='243';
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
ALTER TABLE `job`
|
||||
ADD COLUMN `currently_running` TINYINT(1) NOT NULL DEFAULT '0' AFTER `is_active`;
|
||||
|
||||
ALTER TABLE `job`
|
||||
CHANGE COLUMN `trigger_key` `job_key` VARCHAR(500) NULL DEFAULT NULL;
|
||||
@@ -0,0 +1,11 @@
|
||||
CREATE TABLE `m_working_days` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`recurrence` VARCHAR(100) NULL DEFAULT NULL,
|
||||
`repayment_rescheduling_enum` SMALLINT(5) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
ENGINE=InnoDB
|
||||
AUTO_INCREMENT=1;
|
||||
|
||||
INSERT INTO `m_working_days` (`recurrence`, `repayment_rescheduling_enum`) VALUES ('FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR,SA', 2);
|
||||
@@ -0,0 +1,5 @@
|
||||
INSERT INTO `m_permission`
|
||||
(`grouping`,`code`,`entity_name`,`action_name`,`can_maker_checker`)
|
||||
VALUES
|
||||
('transaction_savings', 'UNDOTRANSACTION_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'UNDOTRANSACTION', 1),
|
||||
('transaction_savings', 'UNDOTRANSACTION_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'UNDOTRANSACTION', 0);
|
||||
@@ -0,0 +1,19 @@
|
||||
ALTER TABLE `m_portfolio_command_source`
|
||||
ADD COLUMN `product_id` BIGINT NULL DEFAULT NULL AFTER `processing_result_enum`;
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'CREATE_PRODUCTMIX', 'PRODUCTMIX', 'CREATE', 0);
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'UPDATE_PRODUCTMIX', 'PRODUCTMIX', 'UPDATE', 0);
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'DELETE_PRODUCTMIX', 'PRODUCTMIX', 'DELETE', 0);
|
||||
|
||||
CREATE TABLE `m_product_mix` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`product_id` BIGINT(20) NOT NULL,
|
||||
`restricted_product_id` BIGINT(20) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `FK_m_product_mix_product_id_to_m_product_loan` (`product_id`),
|
||||
INDEX `FK_m_product_mix_restricted_product_id_to_m_product_loan` (`restricted_product_id`),
|
||||
CONSTRAINT `FK_m_product_mix_restricted_product_id_to_m_product_loan` FOREIGN KEY (`restricted_product_id`) REFERENCES `m_product_loan` (`id`),
|
||||
CONSTRAINT `FK_m_product_mix_product_id_to_m_product_loan` FOREIGN KEY (`product_id`) REFERENCES `m_product_loan` (`id`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
ENGINE=InnoDB;
|
||||
@@ -0,0 +1,2 @@
|
||||
TRUNCATE `m_working_days`;
|
||||
INSERT INTO `m_working_days` (`recurrence`, `repayment_rescheduling_enum`) VALUES ('FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR,SA,SU', 2);
|
||||
@@ -0,0 +1 @@
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('jobs', 'UPDATE_SCHEDULER', 'SCHEDULER', 'UPDATE', 0);
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `job`
|
||||
ADD COLUMN `updates_allowed` TINYINT(1) NOT NULL DEFAULT '1' AFTER `currently_running`;
|
||||
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `job`
|
||||
ADD COLUMN `scheduler_group` SMALLINT(2) NOT NULL DEFAULT '0' AFTER `updates_allowed`;
|
||||
@@ -0,0 +1,2 @@
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_subtype`, `report_category`, `report_sql`, `description`, `core_report`, `use_report`) VALUES ('ClientSummary ', 'Table', NULL, NULL, 'SELECT x.* FROM m_client c, m_office o, \n(\n SELECT a.loanCycle, a.activeLoans, b.lastLoanAmount, d.activeSavings, d.totalSavings FROM \n (SELECT IFNULL(MAX(l.loan_counter),0) AS loanCycle, COUNT(l.id) AS activeLoans FROM m_loan l WHERE l.loan_status_id=300 AND l.client_id=${clientId}) a, \n (SELECT count(l.id), IFNULL(l.principal_amount,0) AS \'lastLoanAmount\' FROM m_loan l WHERE l.client_id=${clientId} AND l.disbursedon_date = (SELECT IFNULL(MAX(disbursedon_date),NOW()) FROM m_loan where client_id=${clientId} and loan_status_id=300)) b, \n (SELECT COUNT(s.id) AS \'activeSavings\', IFNULL(SUM(s.account_balance_derived),0) AS \'totalSavings\' FROM m_savings_account s WHERE s.status_enum=300 AND s.client_id=${clientId}) d\n) x\nWHERE c.id=${clientId} AND o.id = c.office_id AND o.hierarchy LIKE CONCAT(\'${currentUserHierarchy}\', \'%\')', 'Utility query for getting the client summary details', 1, 0);
|
||||
INSERT INTO `stretchy_report` (`report_name`, `report_type`, `report_subtype`, `report_category`, `report_sql`, `description`, `core_report`, `use_report`) VALUES ('LoanCyclePerProduct', 'Table', NULL, NULL, 'SELECT lp.name AS \'productName\', MAX(l.loan_product_counter) AS \'loanProductCycle\' FROM m_loan l JOIN m_product_loan lp ON l.product_id=lp.id WHERE lp.include_in_borrower_cycle=1 AND l.loan_product_counter IS NOT NULL AND l.client_id=${clientId} GROUP BY l.product_id', 'Utility query for getting the client loan cycle details', 1, 0);
|
||||
@@ -0,0 +1,5 @@
|
||||
INSERT INTO `m_permission`
|
||||
(`grouping`,`code`,`entity_name`,`action_name`,`can_maker_checker`)
|
||||
VALUES
|
||||
('transaction_savings', 'APPLYANNUALFEE_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'APPLYANNUALFEE', 1),
|
||||
('transaction_savings', 'APPLYANNUALFEE_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'APPLYANNUALFEE', 0);
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
INSERT INTO `m_permission`
|
||||
(`grouping`,
|
||||
`code`,
|
||||
`entity_name`,
|
||||
`action_name`,
|
||||
`can_maker_checker`)
|
||||
VALUES
|
||||
('transaction_loan', 'UPDATELOANOFFICER_LOAN', 'LOAN', 'UPDATELOANOFFICER', 1),
|
||||
('transaction_loan', 'UPDATELOANOFFICER_LOAN_CHECKER', 'LOAN', 'UPDATELOANOFFICER', 0);
|
||||
@@ -1,9 +0,0 @@
|
||||
|
||||
ALTER TABLE m_portfolio_command_source
|
||||
ADD INDEX `action_name` (`action_name` ASC)
|
||||
, ADD INDEX `entity_name` (`entity_name` ASC, `resource_id` ASC)
|
||||
, ADD INDEX `made_on_date` (`made_on_date` ASC)
|
||||
, ADD INDEX `checked_on_date` (`checked_on_date` ASC)
|
||||
, ADD INDEX `processing_result_enum` (`processing_result_enum` ASC)
|
||||
, ADD INDEX `api_operation` (`api_operation` ASC)
|
||||
, ADD INDEX `api_resource` (`api_resource` ASC, `resource_id` ASC) ;
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `enum_value`)
|
||||
VALUES ('loan_status_id', '601', 'Closed - Written Off', 'Closed - Written Off');
|
||||
|
||||
INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `enum_value`)
|
||||
VALUES ('loan_status_id', '602', 'Closed - Reschedule Outstanding Amount', 'Closed - Reschedule Outstanding Amount');
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
ALTER TABLE `m_client`
|
||||
ADD COLUMN `account_no` VARCHAR(20) NOT NULL AFTER `id`;
|
||||
|
||||
UPDATE `m_client`
|
||||
SET
|
||||
`account_no` = `id`
|
||||
WHERE `id` > 0;
|
||||
|
||||
ALTER TABLE `m_client` ADD UNIQUE INDEX `account_no_UNIQUE` (`account_no` ASC);
|
||||
|
||||
|
||||
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
DROP TABLE IF EXISTS `m_portfolio_command_source`;
|
||||
CREATE TABLE `m_portfolio_command_source` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`action_name` varchar(50) NOT NULL,
|
||||
`entity_name` varchar(50) NOT NULL,
|
||||
`office_id` bigint(20) DEFAULT NULL,
|
||||
`group_id` bigint(20) DEFAULT NULL,
|
||||
`client_id` bigint(20) DEFAULT NULL,
|
||||
`loan_id` bigint(20) DEFAULT NULL,
|
||||
`api_get_url` varchar(100) NOT NULL,
|
||||
`resource_id` bigint(20) DEFAULT NULL,
|
||||
`command_as_json` text NOT NULL,
|
||||
`maker_id` bigint(20) NOT NULL,
|
||||
`made_on_date` datetime NOT NULL,
|
||||
`checker_id` bigint(20) DEFAULT NULL,
|
||||
`checked_on_date` datetime DEFAULT NULL,
|
||||
`processing_result_enum` smallint(5) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `FK_m_maker_m_appuser` (`maker_id`),
|
||||
KEY `FK_m_checker_m_appuser` (`checker_id`),
|
||||
KEY `action_name` (`action_name`),
|
||||
KEY `entity_name` (`entity_name`,`resource_id`),
|
||||
KEY `made_on_date` (`made_on_date`),
|
||||
KEY `checked_on_date` (`checked_on_date`),
|
||||
KEY `processing_result_enum` (`processing_result_enum`),
|
||||
KEY `office_id` (`office_id`),
|
||||
KEY `group_id` (`office_id`),
|
||||
KEY `client_id` (`office_id`),
|
||||
KEY `loan_id` (`office_id`),
|
||||
CONSTRAINT `FK_m_checker_m_appuser` FOREIGN KEY (`checker_id`) REFERENCES `m_appuser` (`id`),
|
||||
CONSTRAINT `FK_m_maker_m_appuser` FOREIGN KEY (`maker_id`) REFERENCES `m_appuser` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
DROP TABLE IF EXISTS `c_configuration`;
|
||||
CREATE TABLE `c_configuration` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(50) DEFAULT NULL,
|
||||
`enabled` tinyint(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO `c_configuration`
|
||||
(`name`, `enabled`)
|
||||
VALUES
|
||||
('maker-checker', 0);
|
||||
|
||||
INSERT INTO `m_permission`
|
||||
(
|
||||
`grouping`,
|
||||
`code`,
|
||||
`entity_name`,
|
||||
`action_name`,
|
||||
`can_maker_checker`)
|
||||
VALUES
|
||||
('configuration','UPDATE_CONFIGURATION',
|
||||
'CONFIGURATION','UPDATE',1),
|
||||
('configuration','READ_CONFIGURATION',
|
||||
'CONFIGURATION','READ',1);
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
ALTER TABLE `m_product_loan`
|
||||
ADD COLUMN `accounting_type` SMALLINT(5) NOT NULL AFTER `amortization_method_enum`;
|
||||
|
||||
update m_product_loan set accounting_type=1;
|
||||
|
||||
DROP TABLE if exists `acc_product_mapping`;
|
||||
|
||||
CREATE TABLE `acc_product_mapping` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`gl_account_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`product_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`product_type` SMALLINT(5) NULL DEFAULT NULL,
|
||||
`financial_account_type` SMALLINT(5) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
)
|
||||
ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
|
||||
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
ALTER TABLE `m_client`
|
||||
ADD COLUMN `middlename` VARCHAR(50) DEFAULT NULL AFTER `firstname`;
|
||||
|
||||
ALTER TABLE `m_client`
|
||||
ADD COLUMN `fullname` VARCHAR(100) DEFAULT NULL AFTER `lastname`;
|
||||
|
||||
UPDATE `m_client`
|
||||
SET
|
||||
`fullname` = `lastname`
|
||||
WHERE `firstname` is NULL;
|
||||
|
||||
UPDATE `m_client`
|
||||
SET
|
||||
`lastname` = null
|
||||
WHERE `fullname` is not NULL;
|
||||
@@ -1,13 +0,0 @@
|
||||
ALTER TABLE `m_loan`
|
||||
ADD COLUMN `account_no` VARCHAR(20) NOT NULL AFTER `id`;
|
||||
|
||||
UPDATE `m_loan`
|
||||
SET
|
||||
`account_no` = `id`
|
||||
WHERE `id` > 0;
|
||||
|
||||
ALTER TABLE `m_loan` ADD UNIQUE INDEX `loan_account_no_UNIQUE` (`account_no` ASC);
|
||||
|
||||
|
||||
ALTER TABLE `m_loan` DROP INDEX `org_id`;
|
||||
ALTER TABLE `m_loan` ADD UNIQUE INDEX `loan_externalid_UNIQUE` (`external_id` ASC);
|
||||
@@ -1,45 +0,0 @@
|
||||
-- Make classification an enumeration for GL Account table
|
||||
update acc_gl_account
|
||||
set acc_gl_account.classification=1 where acc_gl_account.classification="ASSET";
|
||||
|
||||
update acc_gl_account
|
||||
set acc_gl_account.classification=2 where acc_gl_account.classification="LIABILITY";
|
||||
|
||||
update acc_gl_account
|
||||
set acc_gl_account.classification=3 where acc_gl_account.classification="EQUITY";
|
||||
|
||||
update acc_gl_account
|
||||
set acc_gl_account.classification=4 where acc_gl_account.classification="INCOME";
|
||||
|
||||
update acc_gl_account
|
||||
set acc_gl_account.classification=5 where acc_gl_account.classification="EXPENSE";
|
||||
|
||||
|
||||
ALTER TABLE `acc_gl_account`
|
||||
ALTER `classification` DROP DEFAULT;
|
||||
ALTER TABLE `acc_gl_account`
|
||||
CHANGE COLUMN `classification` `classification_enum` SMALLINT(5) NOT NULL AFTER `header_account`;
|
||||
|
||||
-- Rename is header account to usage in GL Account Table
|
||||
|
||||
update acc_gl_account
|
||||
set acc_gl_account.header_account=2 where acc_gl_account.header_account=1;
|
||||
|
||||
update acc_gl_account
|
||||
set acc_gl_account.header_account=1 where acc_gl_account.header_account=0;
|
||||
|
||||
ALTER TABLE `acc_gl_account`
|
||||
CHANGE COLUMN `header_account` `account_usage` TINYINT(1) NOT NULL DEFAULT '2' AFTER `manual_journal_entries_allowed`;
|
||||
|
||||
-- Update Type in journal entries table
|
||||
|
||||
update acc_gl_journal_entry
|
||||
set acc_gl_journal_entry.type=1 where acc_gl_journal_entry.type="CREDIT";
|
||||
|
||||
update acc_gl_journal_entry
|
||||
set acc_gl_journal_entry.type=2 where acc_gl_journal_entry.type="DEBIT";
|
||||
|
||||
ALTER TABLE `acc_gl_journal_entry`
|
||||
ALTER `type` DROP DEFAULT;
|
||||
ALTER TABLE `acc_gl_journal_entry`
|
||||
CHANGE COLUMN `type` `type_enum` SMALLINT(50) NOT NULL AFTER `entry_date`;
|
||||
@@ -1,4 +0,0 @@
|
||||
ALTER TABLE m_note
|
||||
ADD COLUMN `saving_account_id` bigint(20) DEFAULT NULL AFTER `deposit_account_id`,
|
||||
ADD KEY `FK_m_note_m_saving_account` (`saving_account_id`),
|
||||
ADD CONSTRAINT `FK_m_note_m_saving_account` FOREIGN KEY (`saving_account_id`) REFERENCES `m_saving_account` (`id`);
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
DROP TABLE IF EXISTS `m_saving_account_transaction`;
|
||||
CREATE TABLE `m_saving_account_transaction` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`saving_account_id` bigint(20) NOT NULL,
|
||||
`transaction_type_enum` smallint(5) NOT NULL,
|
||||
`contra_id` bigint(20) DEFAULT NULL,
|
||||
`transaction_date` date NOT NULL,
|
||||
`amount` decimal(19,6) NOT NULL,
|
||||
`createdby_id` bigint(20) DEFAULT NULL,
|
||||
`created_date` datetime DEFAULT NULL,
|
||||
`lastmodified_date` datetime DEFAULT NULL,
|
||||
`lastmodifiedby_id` bigint(20) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `FKSAT0000000001` (`saving_account_id`),
|
||||
KEY `FKSAT0000000002` (`contra_id`),
|
||||
CONSTRAINT `FKSAT0000000001` FOREIGN KEY (`saving_account_id`) REFERENCES `m_saving_account` (`id`),
|
||||
CONSTRAINT `FKSAT0000000002` FOREIGN KEY (`contra_id`) REFERENCES `m_saving_account_transaction` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
ALTER TABLE `m_saving_account`
|
||||
ADD COLUMN `outstanding_amount` decimal(19,6) NOT NULL AFTER `pre_closure_interest_rate`;
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
Alter TABLE `m_saving_account`
|
||||
add column `interest_posting_every` int(11) DEFAULT NULL AFTER `frequency`,
|
||||
add column `interest_posting_frequency` int(11) DEFAULT NULL AFTER `interest_posting_every`;
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
ALTER TABLE `m_saving_account`
|
||||
ADD COLUMN `interest_posted_amount` decimal(19,6) DEFAULT '0.000000' AFTER `outstanding_amount`,
|
||||
ADD COLUMN `last_interest_posted_date` date DEFAULT NULL AFTER `interest_posted_amount`,
|
||||
ADD COLUMN `next_interest_posting_date` date DEFAULT NULL AFTER `last_interest_posted_date`;
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
Alter TABLE `m_saving_schedule`
|
||||
ADD COLUMN `interest_accured` decimal(21,4) DEFAULT '0.0000' AFTER `deposit_paid`
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
ALTER TABLE `m_role`
|
||||
DROP COLUMN `lastmodifiedby_id` ,
|
||||
DROP COLUMN `lastmodified_date` ,
|
||||
DROP COLUMN `created_date` ,
|
||||
DROP COLUMN `createdby_id`;
|
||||
|
||||
ALTER TABLE `m_appuser`
|
||||
DROP COLUMN `lastmodifiedby_id` ,
|
||||
DROP COLUMN `lastmodified_date` ,
|
||||
DROP COLUMN `created_date` ,
|
||||
DROP COLUMN `createdby_id`;
|
||||
@@ -1,11 +0,0 @@
|
||||
ALTER TABLE `m_office`
|
||||
DROP COLUMN `lastmodifiedby_id` ,
|
||||
DROP COLUMN `lastmodified_date` ,
|
||||
DROP COLUMN `created_date`,
|
||||
DROP COLUMN `createdby_id`;
|
||||
|
||||
ALTER TABLE `m_office_transaction`
|
||||
DROP COLUMN `lastmodifiedby_id` ,
|
||||
DROP COLUMN `lastmodified_date` ,
|
||||
DROP COLUMN `created_date`,
|
||||
DROP COLUMN `createdby_id`;
|
||||
@@ -1,5 +0,0 @@
|
||||
ALTER TABLE `m_organisation_currency`
|
||||
DROP COLUMN `lastmodifiedby_id` ,
|
||||
DROP COLUMN `lastmodified_date` ,
|
||||
DROP COLUMN `created_date`,
|
||||
DROP COLUMN `createdby_id`;
|
||||
@@ -1,11 +0,0 @@
|
||||
ALTER TABLE `mifostenant-creocore`.`m_fund`
|
||||
DROP FOREIGN KEY `FK4E56DB408F889C3F`,
|
||||
DROP FOREIGN KEY `FK4E56DB40541F0A56`;
|
||||
|
||||
ALTER TABLE `mifostenant-creocore`.`m_fund`
|
||||
DROP COLUMN `lastmodified_date`,
|
||||
DROP COLUMN `lastmodifiedby_id`,
|
||||
DROP COLUMN `created_date`,
|
||||
DROP COLUMN `createdby_id`,
|
||||
DROP INDEX `FK4E56DB408F889C3F`,
|
||||
DROP INDEX `FK4E56DB40541F0A56`;
|
||||
@@ -1,5 +0,0 @@
|
||||
ALTER TABLE `m_fund`
|
||||
DROP COLUMN `lastmodifiedby_id` ,
|
||||
DROP COLUMN `lastmodified_date` ,
|
||||
DROP COLUMN `created_date`,
|
||||
DROP COLUMN `createdby_id`;
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
ALTER TABLE `m_staff`
|
||||
DROP COLUMN `lastmodifiedby_id` ,
|
||||
DROP COLUMN `lastmodified_date` ,
|
||||
DROP COLUMN `created_date`,
|
||||
DROP COLUMN `createdby_id`;
|
||||
|
||||
ALTER TABLE `m_charge`
|
||||
DROP COLUMN `lastmodifiedby_id` ,
|
||||
DROP COLUMN `lastmodified_date` ,
|
||||
DROP COLUMN `created_date`,
|
||||
DROP COLUMN `createdby_id`;
|
||||
|
||||
ALTER TABLE `m_document`
|
||||
DROP COLUMN `lastmodifiedby_id` ,
|
||||
DROP COLUMN `lastmodified_date` ,
|
||||
DROP COLUMN `created_date`,
|
||||
DROP COLUMN `createdby_id`;
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('organisation', 'DELETE_OFFICETRANSACTION', 'OFFICETRANSACTION', 'DELETE', 1);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('organisation', 'DELETE_OFFICETRANSACTION_CHECKER',
|
||||
'OFFICETRANSACTION', 'DELETE', 0);
|
||||
@@ -1,57 +0,0 @@
|
||||
-- Guarantor table is no longer an external Table
|
||||
DELETE FROM `x_registered_table` WHERE `registered_table_name`='m_guarantor_external' LIMIT 1;
|
||||
|
||||
-- drop guarantor table
|
||||
drop table m_guarantor_external;
|
||||
|
||||
-- New m_guarantor table
|
||||
CREATE TABLE `m_guarantor` (
|
||||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||
`loan_id` BIGINT(20) NOT NULL,
|
||||
`type_enum` SMALLINT(5) NOT NULL,
|
||||
`entity_id` BIGINT(20) NULL DEFAULT NULL,
|
||||
`firstname` VARCHAR(50) NULL DEFAULT NULL,
|
||||
`lastname` VARCHAR(50) NULL DEFAULT NULL,
|
||||
`dob` DATE NULL DEFAULT NULL,
|
||||
`address_line_1` VARCHAR(500) NULL DEFAULT NULL,
|
||||
`address_line_2` VARCHAR(500) NULL DEFAULT NULL,
|
||||
`city` VARCHAR(50) NULL DEFAULT NULL,
|
||||
`state` VARCHAR(50) NULL DEFAULT NULL,
|
||||
`country` VARCHAR(50) NULL DEFAULT NULL,
|
||||
`zip` VARCHAR(20) NULL DEFAULT NULL,
|
||||
`house_phone_number` VARCHAR(20) NULL DEFAULT NULL,
|
||||
`mobile_number` VARCHAR(20) NULL DEFAULT NULL,
|
||||
`comment` VARCHAR(500) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `FK_m_guarantor_m_loan` (`loan_id`),
|
||||
CONSTRAINT `FK_m_guarantor_m_loan` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`)
|
||||
)
|
||||
ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- Update loan table
|
||||
|
||||
ALTER TABLE `m_loan`
|
||||
DROP FOREIGN KEY `FK_m_loan_guarantor`;
|
||||
|
||||
update m_loan
|
||||
set guarantor_id=null;
|
||||
|
||||
ALTER TABLE `m_loan`
|
||||
ADD CONSTRAINT `FK_m_loan_guarantor` FOREIGN KEY (`guarantor_id`) REFERENCES `m_guarantor` (`id`);
|
||||
|
||||
-- Insert new permissions
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'READ_GUARANTOR', 'GUARANTOR', 'READ', 0);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'CREATE_GUARANTOR', 'GUARANTOR', 'CREATE', 1);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'UPDATE_GUARANTOR', 'GUARANTOR', 'UPDATE', 1);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'DELETE_GUARANTOR', 'GUARANTOR', 'DELETE', 1);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'CREATE_GUARANTOR_CHECKER', 'GUARANTOR', 'CREATE', 0);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'UPDATE_GUARANTOR_CHECKER', 'GUARANTOR', 'UPDATE', 0);
|
||||
|
||||
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'DELETE_GUARANTOR_CHECKER', 'GUARANTOR', 'DELETE', 0);
|
||||
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
ALTER TABLE `m_client`
|
||||
DROP FOREIGN KEY `FKAUD0000000000002` ,
|
||||
DROP FOREIGN KEY `FKAUD0000000000001`;
|
||||
|
||||
ALTER TABLE `m_client`
|
||||
DROP COLUMN `lastmodifiedby_id` ,
|
||||
DROP COLUMN `lastmodified_date` ,
|
||||
DROP COLUMN `created_date` ,
|
||||
DROP COLUMN `createdby_id` ,
|
||||
DROP INDEX `FKAUD0000000000002` ,
|
||||
DROP INDEX `FKAUD0000000000001`;
|
||||
|
||||
ALTER TABLE `m_group`
|
||||
DROP FOREIGN KEY `FKJPWG000000000004` ,
|
||||
DROP FOREIGN KEY `FKJPWG000000000003`;
|
||||
|
||||
ALTER TABLE `m_group`
|
||||
DROP COLUMN `lastmodifiedby_id` ,
|
||||
DROP COLUMN `lastmodified_date` ,
|
||||
DROP COLUMN `created_date` ,
|
||||
DROP COLUMN `createdby_id` ,
|
||||
DROP INDEX `FKJPWG000000000004` ,
|
||||
DROP INDEX `FKJPWG000000000003`;
|
||||
@@ -1,11 +0,0 @@
|
||||
ALTER TABLE `m_product_loan`
|
||||
DROP FOREIGN KEY `FKAUD0000000000004` ,
|
||||
DROP FOREIGN KEY `FKAUD0000000000003` ;
|
||||
|
||||
ALTER TABLE `m_product_loan`
|
||||
DROP COLUMN `lastmodifiedby_id` ,
|
||||
DROP COLUMN `lastmodified_date` ,
|
||||
DROP COLUMN `created_date` ,
|
||||
DROP COLUMN `createdby_id` ,
|
||||
DROP INDEX `FKAUD0000000000004`,
|
||||
DROP INDEX `FKAUD0000000000003`;
|
||||
@@ -1,16 +0,0 @@
|
||||
truncate table `r_enum_value`;
|
||||
INSERT INTO `r_enum_value`
|
||||
VALUES ('amortization_method_enum',0,'Equal installments','Equal installments'),('amortization_method_enum',1,'Equal principle payments','Equal principle payments'),
|
||||
('interest_calculated_in_period_enum',0,'Daily','Daily'),('interest_calculated_in_period_enum',1,'Same as repayment period','Same as repayment period'),
|
||||
('interest_method_enum',0,'Declining Balance','Declining Balance'),('interest_method_enum',1,'Flat','Flat'),
|
||||
('interest_period_frequency_enum',2,'Per month','Per month'),('interest_period_frequency_enum',3,'Per year','Per year'),
|
||||
('loan_status_id',100,'Submitted and awaiting approval','Submitted and awaiting approval'),('loan_status_id',200,'Approved','Approved'),
|
||||
('loan_status_id',300,'Active','Active'),('loan_status_id',400,'Withdrawn by client','Withdrawn by client'),('loan_status_id',500,'Rejected','Rejected'),
|
||||
('loan_status_id',600,'Closed','Closed'),('loan_status_id',700,'Overpaid','Overpaid'),
|
||||
('loan_transaction_strategy_id',1,'mifos-standard-strategy','Mifos style'),('loan_transaction_strategy_id',2,'heavensfamily-strategy','Heavensfamily'),
|
||||
('loan_transaction_strategy_id',3,'creocore-strategy','Creocore'),('loan_transaction_strategy_id',4,'rbi-india-strategy','RBI (India)'),
|
||||
('processing_result_enum',0,'invalid','Invalid'),('processing_result_enum',1,'processed','Processed'),
|
||||
('processing_result_enum',2,'awaiting.approval','Awaiting Approval'),('processing_result_enum',3,'rejected','Rejected'),
|
||||
('repayment_period_frequency_enum',0,'Days','Days'),('repayment_period_frequency_enum',1,'Weeks','Weeks'),
|
||||
('repayment_period_frequency_enum',2,'Months','Months'),('term_period_frequency_enum',0,'Days','Days'),
|
||||
('term_period_frequency_enum',1,'Weeks','Weeks'),('term_period_frequency_enum',2,'Months','Months'),('term_period_frequency_enum',3,'Years','Years');
|
||||
@@ -1,4 +0,0 @@
|
||||
UPDATE m_role SET name = CONCAT(id,'-',name);
|
||||
|
||||
ALTER TABLE m_role
|
||||
ADD CONSTRAINT unq_name UNIQUE (name);
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user