Skip to content

Commit

Permalink
fix/FSF-33-23-MAIN (#1066)
Browse files Browse the repository at this point in the history
* Reports Fix QA (#750)

* fix  FBR 673

* fix  FBR 673

* fix  FBR 673

* fix  QA REPORTS

* fix  QA REPORTS

* fix  QA REPORTS

* fix  QA REPORTS (#756)

* fix  QA REPORTS

* fix  QA REPORTS

* fix FBR 674

* fix QA REPORTS

* fix REPORTS

* fix Topu Loan Policies

* Fix/fbr 673 (#768)

* fix Policy Labels

* fix Hard Policy Labels

* Qa/fbr 673 674 (#769)

* fix FBR 674

* fix REPORTS

* fix Topu Loan Policies

* Fix/fbr 673 (#768)

* fix Policy Labels

* fix Hard Policy Labels

* fix/FBR-676

* fix/FBR-676 (#773)

* fix/FBR-676

* fix/FBR-HARDPOLICIES

* fix/FBR-HARDPOLICIES

* fix/FBR-HARDPOLICIES

* fix/FBR-HARDPOLICIES

* Fix/fbr 676 (#777)

* fix/FBR-HARDPOLICIES

* fix/FBR-HARDPOLICIES

* fix/FBR-HARDPOLICIES

* fix/FBR-HARDPOLICIES

* fix/FBR-682

* fix/FBR-688

* fix/FBR-688

* fix/FBR-690

* Fix FBR-692 (#803)

* Fix for FBR-692

* Spotless fixes

* fix/FBR-699

* fix/FBR-699 (#805)

* fix/FBR-699

* fix/FBR-699

* fix/FBR-699

* fix/FBR-699

* fix/FBR-699

* fix/FBR-700

* fix/FBR-700 (#812)

* fix/FBR-690

* fix/FBR-696

* Release v1.0.45 (#817)

* fix/FBR-699

* fix/FBR-700

* fix/FBR-700 (#812)

* fix/FBR-690

* fix/FBR-696

---------

Co-authored-by: Muhimbura Brian Mart <[email protected]>

* fix/FBR-690

* fix/FBR-690 (#820)

* Release v1.0.47 (#826)

* fix/FBR-699

* fix/FBR-700

* fix/FBR-700 (#812)

* fix/FBR-690

* fix/FBR-696

* fix/FBR-690 (#820)

---------

Co-authored-by: Muhimbura Brian Mart <[email protected]>

* fix/FBR-691

* Fix FBR-691 (#831)

* fix/FBR-699

* fix/FBR-700

* fix/FBR-700 (#812)

* fix/FBR-690

* fix/FBR-696

* fix/FBR-690

* fix/FBR-690 (#820)

* fix/FBR-691

---------

Co-authored-by: Muhimbura Brian Mart <[email protected]>

* fix/FBR-689

* fix/FBR-690 (#836)

* fix FBR 697

* fix FBR 698

* fix FBR 699

* fixed NPE (#848)

Co-authored-by: Faheem Ahmad <[email protected]>

* fixed NPE (#848) (#849)

Co-authored-by: Faheem Ahmad <[email protected]>
Co-authored-by: Faheem Ahmad <[email protected]>

* fix FBR 689

* fix FBR 695

* fix FBR 699

* fix FBR 697

* fix FBR 697 (#861)

* fix FBR 701

* Release/1.0.47/prepare (#864)

* fix FBR 697

* fix FBR 701

* fix FBR 704

* Release/1.0.48/prepare (#868)

* fix FBR 697

* fix FBR 701

* fix FBR 704

* fix FBR 704

* fix FBR 704

* Release/1.0.48/prepare (#869)

* fix FBR 697

* fix FBR 701

* fix FBR 704

* fix FBR 704

* fix FBR 704

* fix FBR 704 (#870)

* Fix/fbr 704 (#871)

* fix FBR 704

* fix FBR 704

* fix FBR 704

* Release/1.0.48/prepare (#872)

* fix FBR 697

* fix FBR 701

* fix FBR 704

* fix FBR 704

* fix FBR 704

* fix FBR 704 (#870)

* Fix/fbr 704 (#871)

* fix FBR 704

* fix FBR 704

* fix FBR 704

* fix FBR 702 (#874)

* Fic 699 (#878)

* Fic 689

* Fic 689 (#883)

* Fic 705 (#887)

* Fic 705 (#887) (#888)

Co-authored-by: Brian Muhimbura <[email protected]>

* Fix/fbr 707 (#890)

* Fic 705

* Fic 707

* Release/1.0.48/prepare (#891)

* Fic 689

* Fic 705 (#887)

* Fix/fbr 707 (#890)

* Fic 705

* Fic 707

* Fix/fbr 690 (#896)

* Fic 690

* fix/FBR-690

* Recredit Categorization fix

* Recredit Categorization fix

* Fix/fbr 690 (#897)

* Fic 690

* fix/FBR-690

* Recredit Categorization fix

* Recredit Categorization fix

* Recredit Categorization fix

* Fix/fbr 690 (#898)

* Fic 690

* fix/FBR-690

* Recredit Categorization fix

* Recredit Categorization fix

* Recredit Categorization fix

* Recredit Categorization fix

* Release/1.0.48/prepare (#899)

* Fic 689

* Fic 705 (#887)

* Fix/fbr 707 (#890)

* Fic 705

* Fic 707

* Fix/fbr 690 (#896)

* Fic 690

* fix/FBR-690

* Recredit Categorization fix

* Recredit Categorization fix

* Fix/fbr 690 (#897)

* Fic 690

* fix/FBR-690

* Recredit Categorization fix

* Recredit Categorization fix

* Recredit Categorization fix

* Fix/fbr 690 (#898)

* Fic 690

* fix/FBR-690

* Recredit Categorization fix

* Recredit Categorization fix

* Recredit Categorization fix

* Recredit Categorization fix

* fix FBR 709

* fix FBR 709 (#901)

* fix FBR 709

* Fix/fbr 709 (#903)

* fix FBR 709

* fix FBR 709

* Release 1.0.49 prepare (#906)

* Fic 689

* Fic 705 (#887)

* Fix/fbr 707 (#890)

* Fic 705

* Fic 707

* Fix/fbr 690 (#896)

* Fic 690

* fix/FBR-690

* Recredit Categorization fix

* Recredit Categorization fix

* Fix/fbr 690 (#897)

* Fic 690

* fix/FBR-690

* Recredit Categorization fix

* Recredit Categorization fix

* Recredit Categorization fix

* Fix/fbr 690 (#898)

* Fic 690

* fix/FBR-690

* Recredit Categorization fix

* Recredit Categorization fix

* Recredit Categorization fix

* Recredit Categorization fix

* fix FBR 709 (#901)

* Fix/fbr 709 (#903)

* fix FBR 709

* fix FBR 709

---------

Co-authored-by: Muhimbura Brian Mart <[email protected]>

* fix FS-005

* fix FS-007

* fix FS-007

* fix FS-003

* fix FS-003

* fix FS-2

* fix FSF-8

* fix FSF-9

* fix FSF-4 (#945)

* Fix/fsf 11 (#947)

* fix FSF-4

* fix FSF-11

* Fix/fsf 11 (#950)

* fix FSF-4

* fix FSF-11

* fix FSF-11

* Release v1.0.50 (#951)

* fix FSF-9

* fix FSF-4 (#945)

* Fix/fsf 11 (#947)

* fix FSF-4

* fix FSF-11

* Fix/fsf 11 (#950)

* fix FSF-4

* fix FSF-11

* fix FSF-11

---------

Co-authored-by: Muhimbura Brian Mart <[email protected]>

* fix FSF-17 (#957)

* Fix/fsf 17 qa (#958)

* fix FSF-9

* fix FSF-4 (#945)

* Fix/fsf 11 (#947)

* fix FSF-4

* fix FSF-11

* Fix/fsf 11 (#950)

* fix FSF-4

* fix FSF-11

* fix FSF-11

* fix FSF-17 (#957)

* fix FSF-15

* fix FSF-12

* F sf 12 15 qa (#965)

* fix FSF-9

* fix FSF-4 (#945)

* Fix/fsf 11 (#947)

* fix FSF-4

* fix FSF-11

* Fix/fsf 11 (#950)

* fix FSF-4

* fix FSF-11

* fix FSF-11

* fix FSF-17 (#957)

* fix FSF-15

* fix FSF-12

* fix FSF-19

* fix FSF-19 (#969)

* Fix/fsf 19 qa (#970)

* fix FSF-9

* fix FSF-4 (#945)

* Fix/fsf 11 (#947)

* fix FSF-4

* fix FSF-11

* Fix/fsf 11 (#950)

* fix FSF-4

* fix FSF-11

* fix FSF-11

* fix FSF-17 (#957)

* fix FSF-15

* fix FSF-12

* fix FSF-19 (#969)

* Fix/fs 18 (#977)

* fix FSF-19

* FIX FSF-18

* Fix/fsf 20 (#980)

* fix FSF-19

* FIX FSF-18

* FIX FSF-20

* Fix/fsf 18 20 qa (#981)

* fix FSF-9

* fix FSF-4 (#945)

* Fix/fsf 11 (#947)

* fix FSF-4

* fix FSF-11

* Fix/fsf 11 (#950)

* fix FSF-4

* fix FSF-11

* fix FSF-11

* fix FSF-17 (#957)

* fix FSF-15

* fix FSF-12

* fix FSF-19 (#969)

* Fix/fs 18 (#977)

* fix FSF-19

* FIX FSF-18

* Fix/fsf 20 (#980)

* fix FSF-19

* FIX FSF-18

* FIX FSF-20

* QA-FSF-18-20

* Fix/fsf 21 (#989)

* FSF 22

* FSF 22

* Fix/fsf 21 (#990)

* FSF 22

* FSF 22

* FSF 22

* FSF 23 (#992)

* Fix/fsf 21 22 qa (#991)

* fix FSF-9

* fix FSF-4 (#945)

* Fix/fsf 11 (#947)

* fix FSF-4

* fix FSF-11

* Fix/fsf 11 (#950)

* fix FSF-4

* fix FSF-11

* fix FSF-11

* fix FSF-17 (#957)

* fix FSF-15

* fix FSF-12

* fix FSF-19

* fix FSF-19 (#969)

* Fix/fs 18 (#977)

* fix FSF-19

* FIX FSF-18

* Fix/fsf 20 (#980)

* fix FSF-19

* FIX FSF-18

* FIX FSF-20

* QA-FSF-18-20

* Fix/fsf 21 (#989)

* FSF 22

* FSF 22

* Fix/fsf 21 (#990)

* FSF 22

* FSF 22

* FSF 22

* Fix/fsf 23 qa (#995)

* fix FSF-9

* fix FSF-4 (#945)

* Fix/fsf 11 (#947)

* fix FSF-4

* fix FSF-11

* Fix/fsf 11 (#950)

* fix FSF-4

* fix FSF-11

* fix FSF-11

* fix FSF-17 (#957)

* fix FSF-15

* fix FSF-12

* fix FSF-19

* fix FSF-19 (#969)

* Fix/fs 18 (#977)

* fix FSF-19

* FIX FSF-18

* Fix/fsf 20 (#980)

* fix FSF-19

* FIX FSF-18

* FIX FSF-20

* QA-FSF-18-20

* Fix/fsf 21 (#989)

* FSF 22

* FSF 22

* Fix/fsf 21 (#990)

* FSF 22

* FSF 22

* FSF 22

* FSF 23 (#992)

* FBR-710

* FBR-710 (#1000)

* Fix/fsf 24 (#1014)

* FBR-710

* FSF-24

* FSF-24 (#1015)

* FSF-24

* Feature/fbr 714 (#1018)

* FBR-710

* FBR-714

* feature/FBR-710-714-QA (#1019)

* fix FSF-9

* fix FSF-4 (#945)

* Fix/fsf 11 (#947)

* fix FSF-4

* fix FSF-11

* Fix/fsf 11 (#950)

* fix FSF-4

* fix FSF-11

* fix FSF-11

* fix FSF-17 (#957)

* fix FSF-15

* fix FSF-12

* fix FSF-19

* fix FSF-19 (#969)

* Fix/fs 18 (#977)

* fix FSF-19

* FIX FSF-18

* Fix/fsf 20 (#980)

* fix FSF-19

* FIX FSF-18

* FIX FSF-20

* QA-FSF-18-20

* Fix/fsf 21 (#989)

* FSF 22

* FSF 22

* Fix/fsf 21 (#990)

* FSF 22

* FSF 22

* FSF 22

* FSF 23 (#992)

* FBR-710 (#1000)

* Fix/fsf 24 (#1014)

* FBR-710

* FSF-24

* Feature/fbr 714 (#1018)

* FBR-710

* FBR-714

* feature/FBR-710-714-QA (#1022)

* fix FSF-9

* fix FSF-4 (#945)

* Fix/fsf 11 (#947)

* fix FSF-4

* fix FSF-11

* Fix/fsf 11 (#950)

* fix FSF-4

* fix FSF-11

* fix FSF-11

* fix FSF-17 (#957)

* fix FSF-15

* fix FSF-12

* fix FSF-19

* fix FSF-19 (#969)

* Fix/fs 18 (#977)

* fix FSF-19

* FIX FSF-18

* Fix/fsf 20 (#980)

* fix FSF-19

* FIX FSF-18

* FIX FSF-20

* QA-FSF-18-20

* Fix/fsf 21 (#989)

* FSF 22

* FSF 22

* Fix/fsf 21 (#990)

* FSF 22

* FSF 22

* FSF 22

* FSF 23 (#992)

* FBR-710 (#1000)

* Fix/fsf 24 (#1014)

* FBR-710

* FSF-24

* Feature/fbr 714 (#1018)

* FBR-710

* FBR-714

* FBR-714

* FSF-1 throw exception if debit and credit gl accounts are same (#1023)

Co-authored-by: Faheem Ahmad <[email protected]>

* fix/FSF-25 (#1025)

* FBR-710

* FSF-25

* fix/FSF-28 (#1026)

* FBR-710

* FSF-25

* FSF-28

* CHARGE FIX

* fix/FSF-25-27-28-QA (#1027)

* fix FSF-9

* fix FSF-4 (#945)

* Fix/fsf 11 (#947)

* fix FSF-4

* fix FSF-11

* Fix/fsf 11 (#950)

* fix FSF-4

* fix FSF-11

* fix FSF-11

* fix FSF-17 (#957)

* fix FSF-15

* fix FSF-12

* fix FSF-19

* fix FSF-19 (#969)

* Fix/fs 18 (#977)

* fix FSF-19

* FIX FSF-18

* Fix/fsf 20 (#980)

* fix FSF-19

* FIX FSF-18

* FIX FSF-20

* QA-FSF-18-20

* Fix/fsf 21 (#989)

* FSF 22

* FSF 22

* Fix/fsf 21 (#990)

* FSF 22

* FSF 22

* FSF 22

* FSF 23 (#992)

* FBR-710 (#1000)

* Fix/fsf 24 (#1014)

* FBR-710

* FSF-24

* Feature/fbr 714 (#1018)

* FBR-710

* FBR-714

* FSF-1 throw exception if debit and credit gl accounts are same (#1023)

Co-authored-by: Faheem Ahmad <[email protected]>

* fix/FSF-25 (#1025)

* FBR-710

* FSF-25

* fix/FSF-28 (#1026)

* FBR-710

* FSF-25

* FSF-28

* CHARGE FIX

* FSF 27-28-25

---------

Co-authored-by: Faheem Ahmad <[email protected]>
Co-authored-by: Faheem Ahmad <[email protected]>

* fix/FBR-710 (#1031)

* FBR-710

* FSF 710

* feature/FBR-710-QA (#1034)

* fix FSF-9

* fix FSF-4 (#945)

* Fix/fsf 11 (#947)

* fix FSF-4

* fix FSF-11

* Fix/fsf 11 (#950)

* fix FSF-4

* fix FSF-11

* fix FSF-11

* fix FSF-17 (#957)

* fix FSF-15

* fix FSF-12

* fix FSF-19

* fix FSF-19 (#969)

* Fix/fs 18 (#977)

* fix FSF-19

* FIX FSF-18

* Fix/fsf 20 (#980)

* fix FSF-19

* FIX FSF-18

* FIX FSF-20

* QA-FSF-18-20

* Fix/fsf 21 (#989)

* FSF 22

* FSF 22

* Fix/fsf 21 (#990)

* FSF 22

* FSF 22

* FSF 22

* FSF 23 (#992)

* FBR-710 (#1000)

* Fix/fsf 24 (#1014)

* FBR-710

* FSF-24

* Feature/fbr 714 (#1018)

* FBR-710

* FBR-714

* FSF-1 throw exception if debit and credit gl accounts are same (#1023)

Co-authored-by: Faheem Ahmad <[email protected]>

* fix/FSF-25 (#1025)

* FBR-710

* FSF-25

* fix/FSF-28 (#1026)

* FBR-710

* FSF-25

* FSF-28

* CHARGE FIX

* fix/FBR-710 (#1031)

* FBR-710

* FSF 710

* FBR 710

---------

Co-authored-by: Faheem Ahmad <[email protected]>
Co-authored-by: Faheem Ahmad <[email protected]>

* fix/CHEQUE-DATE (#1035)

* fix FSF-9

* fix FSF-4 (#945)

* Fix/fsf 11 (#947)

* fix FSF-4

* fix FSF-11

* Fix/fsf 11 (#950)

* fix FSF-4

* fix FSF-11

* fix FSF-11

* fix FSF-17 (#957)

* fix FSF-15

* fix FSF-12

* fix FSF-19

* fix FSF-19 (#969)

* Fix/fs 18 (#977)

* fix FSF-19

* FIX FSF-18

* Fix/fsf 20 (#980)

* fix FSF-19

* FIX FSF-18

* FIX FSF-20

* QA-FSF-18-20

* Fix/fsf 21 (#989)

* FSF 22

* FSF 22

* Fix/fsf 21 (#990)

* FSF 22

* FSF 22

* FSF 22

* FSF 23 (#992)

* FBR-710 (#1000)

* Fix/fsf 24 (#1014)

* FBR-710

* FSF-24

* Feature/fbr 714 (#1018)

* FBR-710

* FBR-714

* FSF-1 throw exception if debit and credit gl accounts are same (#1023)

Co-authored-by: Faheem Ahmad <[email protected]>

* fix/FSF-25 (#1025)

* FBR-710

* FSF-25

* fix/FSF-28 (#1026)

* FBR-710

* FSF-25

* FSF-28

* CHARGE FIX

* fix/FBR-710 (#1031)

* FBR-710

* FSF 710

* FBR 710

* FBR CHEQUE

---------

Co-authored-by: Faheem Ahmad <[email protected]>
Co-authored-by: Faheem Ahmad <[email protected]>

* fix/CHEQUE-DATE (#1040)

* fix FSF-9

* fix FSF-4 (#945)

* Fix/fsf 11 (#947)

* fix FSF-4

* fix FSF-11

* Fix/fsf 11 (#950)

* fix FSF-4

* fix FSF-11

* fix FSF-11

* fix FSF-17 (#957)

* fix FSF-15

* fix FSF-12

* fix FSF-19

* fix FSF-19 (#969)

* Fix/fs 18 (#977)

* fix FSF-19

* FIX FSF-18

* Fix/fsf 20 (#980)

* fix FSF-19

* FIX FSF-18

* FIX FSF-20

* QA-FSF-18-20

* Fix/fsf 21 (#989)

* FSF 22

* FSF 22

* Fix/fsf 21 (#990)

* FSF 22

* FSF 22

* FSF 22

* FSF 23 (#992)

* FBR-710 (#1000)

* Fix/fsf 24 (#1014)

* FBR-710

* FSF-24

* Feature/fbr 714 (#1018)

* FBR-710

* FBR-714

* FSF-1 throw exception if debit and credit gl accounts are same (#1023)

Co-authored-by: Faheem Ahmad <[email protected]>

* fix/FSF-25 (#1025)

* FBR-710

* FSF-25

* fix/FSF-28 (#1026)

* FBR-710

* FSF-25

* FSF-28

* CHARGE FIX

* fix/FBR-710 (#1031)

* FBR-710

* FSF 710

* FBR 710

* FBR CHEQUE

* cheque font

* CHEQUE FIxES

* CHEQUE FIxES

---------

Co-authored-by: Faheem Ahmad <[email protected]>
Co-authored-by: Faheem Ahmad <[email protected]>

* FSF-1 temporary rollback of duplicate gl account check (#1041)

Co-authored-by: Faheem Ahmad <[email protected]>

* FSF-30

* FSF-1 temporary rollback of duplicate gl account check

* fix/GL-FIX (#1042)

* fix FSF-9

* fix FSF-4 (#945)

* Fix/fsf 11 (#947)

* fix FSF-4

* fix FSF-11

* Fix/fsf 11 (#950)

* fix FSF-4

* fix FSF-11

* fix FSF-11

* fix FSF-17 (#957)

* fix FSF-15

* fix FSF-12

* fix FSF-19

* fix FSF-19 (#969)

* Fix/fs 18 (#977)

* fix FSF-19

* FIX FSF-18

* Fix/fsf 20 (#980)

* fix FSF-19

* FIX FSF-18

* FIX FSF-20

* QA-FSF-18-20

* Fix/fsf 21 (#989)

* FSF 22

* FSF 22

* Fix/fsf 21 (#990)

* FSF 22

* FSF 22

* FSF 22

* FSF 23 (#992)

* FBR-710 (#1000)

* Fix/fsf 24 (#1014)

* FBR-710

* FSF-24

* Feature/fbr 714 (#1018)

* FBR-710

* FBR-714

* FSF-1 temporary rollback of duplicate gl account check

---------

Co-authored-by: Faheem Ahmad <[email protected]>

* FIX-FSF-30

* fix/FSF-30-QA (#1047)

* fix FSF-9

* fix FSF-4 (#945)

* Fix/fsf 11 (#947)

* fix FSF-4

* fix FSF-11

* Fix/fsf 11 (#950)

* fix FSF-4

* fix FSF-11

* fix FSF-11

* fix FSF-17 (#957)

* fix FSF-15

* fix FSF-12

* fix FSF-19

* fix FSF-19 (#969)

* Fix/fs 18 (#977)

* fix FSF-19

* FIX FSF-18

* Fix/fsf 20 (#980)

* fix FSF-19

* FIX FSF-18

* FIX FSF-20

* QA-FSF-18-20

* Fix/fsf 21 (#989)

* FSF 22

* FSF 22

* Fix/fsf 21 (#990)

* FSF 22

* FSF 22

* FSF 22

* FSF 23 (#992)

* FBR-710

* FBR-710 (#1000)

* Fix/fsf 24 (#1014)

* FBR-710

* FSF-24

* Feature/fbr 714 (#1018)

* FBR-710

* FBR-714

* FSF-1 throw exception if debit and credit gl accounts are same (#1023)

Co-authored-by: Faheem Ahmad <[email protected]>

* fix/FSF-25 (#1025)

* FBR-710

* FSF-25

* fix/FSF-28 (#1026)

* FBR-710

* FSF-25

* FSF-28

* CHARGE FIX

* fix/FBR-710 (#1031)

* FBR-710

* FSF 710

* FSF-1 temporary rollback of duplicate gl account check (#1041)

Co-authored-by: Faheem Ahmad <[email protected]>

* FSF-30

* FSF-1 temporary rollback of duplicate gl account check

* FIX-FSF-30

---------

Co-authored-by: Faheem Ahmad <[email protected]>
Co-authored-by: Faheem Ahmad <[email protected]>

* Spotless

* fix/FSF-33-QA (#1059)

* pagare report charges

* FSF-33 (#1058)

---------

Co-authored-by: Leonardo Hildt <[email protected]>
Co-authored-by: Faheem Ahmad <[email protected]>
Co-authored-by: Faheem Ahmad <[email protected]>
  • Loading branch information
4 people authored Aug 26, 2024
1 parent bb1af22 commit 9b86bfc
Show file tree
Hide file tree
Showing 5 changed files with 148 additions and 39 deletions.
Binary file modified fineract-provider/pentahoReports/Pagare Libre Protesto Grupal.prpt
Binary file not shown.
Binary file added fineract-provider/pentahoReports/fonts/Arial.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
Expand Down Expand Up @@ -55,7 +54,6 @@
import org.apache.fineract.organisation.prequalification.domain.SubStatusEnumerations;
import org.apache.fineract.portfolio.client.service.ClientChargeWritePlatformServiceJpaRepositoryImpl;
import org.apache.fineract.useradministration.domain.AppUser;
import org.apache.fineract.useradministration.domain.Role;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -109,7 +107,11 @@ public Page<GroupPrequalificationData> retrieveAll(SearchParameters searchParame
}
List<Object> paramList = new ArrayList<>();
final StringBuilder sqlBuilder = new StringBuilder(500);
sqlBuilder.append("select ").append(this.prequalificationsGroupMapper.schema());
if (StringUtils.equals(searchParameters.getGroupingType(), "group")) {
sqlBuilder.append("select ").append(this.prequalificationsGroupMapper.gpSchema());
} else {
sqlBuilder.append("select ").append(this.prequalificationsGroupMapper.schema());
}
sqlBuilder.append(" where g.prequalification_number is not null ");
String sqlCountRows = this.genericDataService.wrapSQLCount(sqlBuilder.toString());
if (searchParameters != null) {
Expand Down Expand Up @@ -287,36 +289,27 @@ private String buildSqlStringFromBlacklistCriteria(final SearchParameters search

String extraCriteria = "";

if (StringUtils.isNotBlank(groupingType)) {
if (groupingType.equals("group")) {
extraCriteria += " and g.prequalification_type_enum = ? ";
paramList.add(PrequalificationType.GROUP.getValue());
}

if (StringUtils.equals(groupingType, "individual")) {
extraCriteria += " and g.prequalification_type_enum = ? ";
paramList.add(PrequalificationType.INDIVIDUAL.getValue());
if (dpiNumber != null) {
extraCriteria += " and g.dpi = ? ";
paramList.add(dpiNumber);
}
}
}

Set<Role> roles = appUser.getRoles();
for (Role userRole : roles) {
if (StringUtils.containsIgnoreCase(userRole.getName(), "Líder de agencia")) {
extraCriteria += " and ma.responsible_user_id = ? ";
paramList.add(appUser.getId());
if (StringUtils.equals(groupingType, "group")) {
extraCriteria += " and g.prequalification_type_enum = ? ";
paramList.add(PrequalificationType.GROUP.getValue());
extraCriteria += " and (mogrp.hierarchy LIKE CONCAT(?, '%') OR ? like CONCAT(mogrp.hierarchy, '%'))";
paramList.add(appUser.getOffice().getHierarchy());
paramList.add(appUser.getOffice().getHierarchy());
} else {
extraCriteria += " and (moind.hierarchy LIKE CONCAT(?, '%') OR ? like CONCAT(moind.hierarchy, '%'))";
paramList.add(appUser.getOffice().getHierarchy());
paramList.add(appUser.getOffice().getHierarchy());
}

if (StringUtils.equals(groupingType, "individual")) {
extraCriteria += " and g.prequalification_type_enum = ? ";
paramList.add(PrequalificationType.INDIVIDUAL.getValue());
if (dpiNumber != null) {
extraCriteria += " and g.dpi = ? ";
paramList.add(dpiNumber);
}
}

extraCriteria += " and (moind.hierarchy LIKE CONCAT(?, '%') OR mogrp.hierarchy LIKE CONCAT(?, '%') OR ? like CONCAT(moind.hierarchy, '%') OR ? like CONCAT(mogrp.hierarchy, '%'))";
paramList.add(appUser.getOffice().getHierarchy());
paramList.add(appUser.getOffice().getHierarchy());
paramList.add(appUser.getOffice().getHierarchy());
paramList.add(appUser.getOffice().getHierarchy());

if (agencyId != null) {
extraCriteria += " and individualOffice.agency_id = ? ";
paramList.add(agencyId);
Expand Down Expand Up @@ -411,10 +404,11 @@ private String resolveCommitteeGroupStatus(CodeValueData committeeValueData) {
private static final class PrequalificationsGroupMapper implements RowMapper<GroupPrequalificationData> {

private final String schema;
private final String grpSchema;

PrequalificationsGroupMapper() {
this.schema = """
DISTINCT g.id AS id,
g.id AS id,
g.prequalification_number AS prequalificationNumber,
g.status,linkedGroup.id as linkedGroupId,
g.prequalification_duration as prequalilficationTimespan,
Expand All @@ -432,7 +426,7 @@ private static final class PrequalificationsGroupMapper implements RowMapper<Gro
(case when g.previous_prequalification is not null THEN 'Recredito' ELSE 'Nuevo' END) as processType,
(case when (select count(*) from m_prequalification_status_log where prequalification_id = g.id and to_status = g.status )>0 THEN 'Reproceso' ELSE 'Nuevo' END) as processQuality,
concat(mu.firstname, ' ', mu.lastname) as statusChangedBy,
ma.name AS agencyName,
coalesce(ma.name,individualOffice.agency_name) AS agencyName,
ma.id AS agencyId,
cg.display_name AS groupName,
g.group_name AS newGroupName,
Expand Down Expand Up @@ -464,21 +458,16 @@ LEFT JOIN (
GROUP BY mpgm.group_id
) prequalification_numbers ON prequalification_numbers.prequalification_id = g.id
LEFT JOIN (
select mpg.id as group_id, mag.linked_office_id, moff.id as agency_office
from m_prequalification_group mpg
INNER JOIN m_agency mag on mag.id = mpg.agency_id
INNER JOIN m_office moff on moff.parent_id = mag.linked_office_id
) groupOffice on groupOffice.group_id = g.id
LEFT JOIN(
select DISTINCT mc.office_id, ms.agency_id, mpgm.group_id, ms.linked_office_id as supervision_office
select DISTINCT mc.office_id, ms.agency_id,mag.name as agency_name, mpgm.group_id, ms.linked_office_id as supervision_office
from m_prequalification_group_members mpgm
INNER JOIN m_client mc on mc.dpi = mpgm.dpi
INNER JOIN m_group_client mgc on mgc.client_id = mc.id
INNER JOIN m_group mg on mg.id = mgc.group_id
INNER JOIN m_group center on center.id = mg.parent_id
INNER JOIN m_portfolio mp on mp.id = center.portfolio_id
INNER JOIN m_supervision ms on ms.id = mp.supervision_id
INNER JOIN m_agency mag on mag.id = ms.agency_id
) individualOffice ON individualOffice.group_id = g.id
LEFT JOIN m_agency ma ON
Expand All @@ -488,6 +477,122 @@ LEFT JOIN(
) supv ON supv.agency_id = ma.id
LEFT JOIN m_office mo on mo.id = supv.linked_office_id
LEFT JOIN m_office moind on moind.id = individualOffice.supervision_office
LEFT JOIN
(
SELECT p.id AS groupid,
COUNT(mcvr.id) AS validCount
FROM m_checklist_validation_result mcvr
INNER JOIN m_prequalification_group p ON mcvr.prequalification_id = p.id and mcvr.validation_color_enum = 1
GROUP BY p.id
) greenValidation ON greenValidation.groupid = g.id
LEFT JOIN
(
SELECT p.id AS groupid,
COUNT(mcvr.id) AS validCount
FROM m_checklist_validation_result mcvr
INNER JOIN m_prequalification_group p ON mcvr.prequalification_id = p.id and mcvr.validation_color_enum = 2
GROUP BY p.id
) yellowValidation ON yellowValidation.groupid = g.id
LEFT JOIN
(
SELECT p.id AS groupid,
COUNT(mcvr.id) AS validCount
FROM m_checklist_validation_result mcvr
INNER JOIN m_prequalification_group p ON mcvr.prequalification_id = p.id and mcvr.validation_color_enum = 3
GROUP BY p.id
) orangeValidation ON orangeValidation.groupid = g.id
LEFT JOIN
(
SELECT p.id AS groupid,
COUNT(mcvr.id) AS validCount
FROM m_checklist_validation_result mcvr
INNER JOIN m_prequalification_group p ON mcvr.prequalification_id = p.id and mcvr.validation_color_enum = 4
GROUP BY p.id
) redValidation ON redValidation.groupid = g.id
LEFT JOIN m_group cg ON
cg.id = g.group_id
LEFT JOIN m_group linkedGroup ON
linkedGroup.prequalification_id = g.id
LEFT JOIN m_group pc ON
pc.id = g.center_id
LEFT JOIN m_prequalification_status_log sl ON
sl.prequalification_id = g.id AND sl.to_status=g.status
AND sl.id =
(SELECT MAX(id)
FROM m_prequalification_status_log WHERE prequalification_id = g.id AND sl.to_status=g.status )
LEFT JOIN m_appuser assigned ON assigned.id = sl.assigned_to
LEFT JOIN m_appuser mu ON
mu.id = sl.updatedby_id
LEFT JOIN m_appuser fa ON
fa.id = g.facilitator
""";

this.grpSchema = """
g.id AS id,
g.prequalification_number AS prequalificationNumber,
g.status,linkedGroup.id as linkedGroupId,
g.prequalification_duration as prequalilficationTimespan,
g.comments,
g.created_at,
g.prequalification_type_enum as prequalificationType,
sl.from_status as previousStatus,
sl.sub_status as substatus,
sl.comments as latestComments,
assigned.username as assignedUser,
concat(assigned.firstname, ' ', assigned.lastname) as assignedUserName,
sl.date_created as statusChangedOn,
prequalification_numbers.total_requested_amount as totalRequestedAmount,
prequalification_numbers.total_approved_amount totalApprovedAmount,
(case when g.previous_prequalification is not null THEN 'Recredito' ELSE 'Nuevo' END) as processType,
(case when (select count(*) from m_prequalification_status_log where prequalification_id = g.id and to_status = g.status )>0 THEN 'Reproceso' ELSE 'Nuevo' END) as processQuality,
concat(mu.firstname, ' ', mu.lastname) as statusChangedBy,
coalesce(ma.name,groupOffice.agency_name) AS agencyName,
ma.id AS agencyId,
cg.display_name AS groupName,
g.group_name AS newGroupName,
g.group_id AS groupId,
pc.display_name AS centerName,
pc.id AS centerId,
lp.id AS productId,
fa.id AS facilitatorId,
concat(fa.firstname, ' ', fa.lastname) AS facilitatorName,
lp.name AS productName,
au.firstname,
au.lastname,
greenValidation.validCount AS greenValidationCount,
yellowValidation.validCount AS yellowValidationCount,
orangeValidation.validCount AS orangeValidationCount,
redValidation.validCount AS redValidationCount
FROM
m_prequalification_group g
INNER JOIN m_appuser au ON
au.id = g.added_by
INNER JOIN m_product_loan lp ON
g.product_id = lp.id
LEFT JOIN (
SELECT
mpgm.group_id AS prequalification_id,
SUM(mpgm.requested_amount) total_requested_amount,
SUM(mpgm.approved_amount) total_approved_amount
FROM m_prequalification_group_members mpgm
GROUP BY mpgm.group_id
) prequalification_numbers ON prequalification_numbers.prequalification_id = g.id
LEFT JOIN (
select mpg.id as group_id, mag.linked_office_id, moff.id as agency_office, mag.name as agency_name
from m_prequalification_group mpg
INNER JOIN m_agency mag on mag.id = mpg.agency_id
INNER JOIN m_office moff on moff.parent_id = mag.linked_office_id
) groupOffice on groupOffice.group_id = g.id
LEFT JOIN m_agency ma ON
g.agency_id = ma.id
LEFT JOIN(
select agency_id, linked_office_id from m_supervision GROUP BY agency_id
) supv ON supv.agency_id = ma.id
LEFT JOIN m_office mogrp on mogrp.id = groupOffice.agency_office
LEFT JOIN
(
Expand Down Expand Up @@ -548,6 +653,10 @@ public String schema() {
return this.schema;
}

public String gpSchema() {
return this.grpSchema;
}

@Override
public GroupPrequalificationData mapRow(final ResultSet rs, final int rowNum) throws SQLException {

Expand Down

0 comments on commit 9b86bfc

Please sign in to comment.