diff --git a/.ai/mcp/mcp.json b/.ai/mcp/mcp.json new file mode 100644 index 000000000..e69de29bb diff --git a/.qwen/settings.json b/.qwen/settings.json new file mode 100644 index 000000000..d2edcaf7c --- /dev/null +++ b/.qwen/settings.json @@ -0,0 +1,17 @@ +{ + "permissions": { + "allow": [ + "Bash(npx *)", + "Bash(git add *)", + "Bash(git commit *)", + "Bash(select-object *)", + "Bash(git config *)", + "Bash(set *)", + "Bash(git push)", + "Bash(xcopy *)", + "Bash(powershell *)", + "mcp__idea__build_project" + ] + }, + "$version": 3 +} diff --git a/.qwen/settings.json.orig b/.qwen/settings.json.orig new file mode 100644 index 000000000..0399b79c8 --- /dev/null +++ b/.qwen/settings.json.orig @@ -0,0 +1,7 @@ +{ + "permissions": { + "allow": [ + "Bash(npx *)" + ] + } +} \ No newline at end of file diff --git a/backend-schema/README.md b/backend-schema/README.md index 009b04974..f11c42c92 100644 --- a/backend-schema/README.md +++ b/backend-schema/README.md @@ -2,24 +2,26 @@ ## Files in this directory -| File | Purpose | -|------|---------| -| `V1__client_schema_extensions.sql` | DB migration — run on Fineract MySQL/MariaDB | -| `ClientEntityKyc.java` | JPA Entity for `m_client_entity_kyc` table | -| `ClientAddressIndia.java` | JPA Entity for `m_client_address_india` table | -| `ClientEntityKycRepository.java` | Spring Data repository | -| `ClientAddressIndiaRepository.java` | Spring Data repository | -| `ClientEntityKycApiResource.java` | REST controller — `/clients/{id}/entity-kyc` | +| File | Purpose | +| ------------------------------------ | ----------------------------------------------- | +| `V1__client_schema_extensions.sql` | DB migration — run on Fineract MySQL/MariaDB | +| `ClientEntityKyc.java` | JPA Entity for `m_client_entity_kyc` table | +| `ClientAddressIndia.java` | JPA Entity for `m_client_address_india` table | +| `ClientEntityKycRepository.java` | Spring Data repository | +| `ClientAddressIndiaRepository.java` | Spring Data repository | +| `ClientEntityKycApiResource.java` | REST controller — `/clients/{id}/entity-kyc` | | `ClientAddressIndiaApiResource.java` | REST controller — `/clients/{id}/india-address` | ## How to apply ### Step 1: Run SQL Migration + ```bash mysql -u root -p fineract_tenantdb < V1__client_schema_extensions.sql ``` ### Step 2: Copy Java files to Fineract source + ``` ClientEntityKyc.java → fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ ClientAddressIndia.java → fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ @@ -30,7 +32,9 @@ ClientAddressIndiaApiResource.java → fineract-provider/src/main/java/org/apach ``` ### Step 3: Update existing Fineract Client API + In `ClientApiResource.java`, the `POST /clients` endpoint needs to accept these additional fields in the request body: + - `nationality`, `annualTurnover`, `creditLimit` - `isMinor`, `ageYears`, `ageMonths`, `ageDays` - `guardianName`, `guardianRelation`, `guardianMobile`, `guardianIdNumber`, `guardianAddress` @@ -38,9 +42,11 @@ In `ClientApiResource.java`, the `POST /clients` endpoint needs to accept these In `ClientWritePlatformServiceJpaRepositoryImpl.java`, map these fields to the `m_client` entity during create/update. ### Step 4: Register new API resources + Add to `fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/FineractWebMvcConfigurer.java` or equivalent Spring config. ### Step 5: Rebuild Fineract + ```bash ./gradlew bootRun ``` @@ -48,28 +54,30 @@ Add to `fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/ ## API Reference ### Entity KYC -| Method | Endpoint | Description | -|--------|----------|-------------| -| POST | `/clients/{clientId}/entity-kyc` | Create/update entity KYC + MSME | -| GET | `/clients/{clientId}/entity-kyc` | Retrieve entity KYC | -| DELETE | `/clients/{clientId}/entity-kyc` | Delete entity KYC | + +| Method | Endpoint | Description | +| ------ | -------------------------------- | ------------------------------- | +| POST | `/clients/{clientId}/entity-kyc` | Create/update entity KYC + MSME | +| GET | `/clients/{clientId}/entity-kyc` | Retrieve entity KYC | +| DELETE | `/clients/{clientId}/entity-kyc` | Delete entity KYC | ### India Address -| Method | Endpoint | Description | -|--------|----------|-------------| -| POST | `/clients/{clientId}/india-address` | Save all 4 address types | -| GET | `/clients/{clientId}/india-address` | Get all addresses | -| GET | `/clients/{clientId}/india-address/{type}` | Get specific type (PERMANENT/CURRENT/OFFICE/CORRESPONDENCE) | -| PUT | `/clients/{clientId}/india-address/{type}` | Update specific type | -| DELETE | `/clients/{clientId}/india-address` | Delete all addresses | + +| Method | Endpoint | Description | +| ------ | ------------------------------------------ | ----------------------------------------------------------- | +| POST | `/clients/{clientId}/india-address` | Save all 4 address types | +| GET | `/clients/{clientId}/india-address` | Get all addresses | +| GET | `/clients/{clientId}/india-address/{type}` | Get specific type (PERMANENT/CURRENT/OFFICE/CORRESPONDENCE) | +| PUT | `/clients/{clientId}/india-address/{type}` | Update specific type | +| DELETE | `/clients/{clientId}/india-address` | Delete all addresses | ## Tables Summary -| Table | New/Modified | Records | -|-------|-------------|---------| -| `m_client` | Modified — 12 new columns | Guardian, nationality, minor, turnover | -| `m_client_non_person` | Modified — 13 new columns | MSME, CIN, enterprise PAN, signatory | -| `m_client_kyc` | Modified — 19 new columns | AML, freeze, form60/61, form15G/H, KYC doc | -| `m_client_entity_kyc` | **New** | Entity-specific KYC, MSME, signatory, auth doc | -| `m_client_address_india` | **New** | 4-type India address with PIN lookup fields | -| `m_code_value` | Modified | Added Gender: Transgender, Other | +| Table | New/Modified | Records | +| ------------------------ | ------------------------- | ---------------------------------------------- | +| `m_client` | Modified — 12 new columns | Guardian, nationality, minor, turnover | +| `m_client_non_person` | Modified — 13 new columns | MSME, CIN, enterprise PAN, signatory | +| `m_client_kyc` | Modified — 19 new columns | AML, freeze, form60/61, form15G/H, KYC doc | +| `m_client_entity_kyc` | **New** | Entity-specific KYC, MSME, signatory, auth doc | +| `m_client_address_india` | **New** | 4-type India address with PIN lookup fields | +| `m_code_value` | Modified | Added Gender: Transgender, Other | diff --git a/postman/CBS_Client_Creation_API.postman_collection.json b/postman/CBS_Client_Creation_API.postman_collection.json index a2bcf7480..2cab16946 100644 --- a/postman/CBS_Client_Creation_API.postman_collection.json +++ b/postman/CBS_Client_Creation_API.postman_collection.json @@ -145,7 +145,11 @@ "url": { "raw": "{{baseUrl}}/clients/{{clientId}}/kyc", "host": ["{{baseUrl}}"], - "path": ["clients", "{{clientId}}", "kyc"] + "path": [ + "clients", + "{{clientId}}", + "kyc" + ] }, "description": "Saves KYC details including PAN, Aadhaar, AML compliance, document info, risk category, and Form 60/15 data." } @@ -163,7 +167,11 @@ "url": { "raw": "{{baseUrl}}/clients/{{clientId}}/kyc", "host": ["{{baseUrl}}"], - "path": ["clients", "{{clientId}}", "kyc"] + "path": [ + "clients", + "{{clientId}}", + "kyc" + ] }, "description": "Fetches existing KYC data for a client." } @@ -197,7 +205,11 @@ "url": { "raw": "{{baseUrl}}/clients/{{clientId}}/images", "host": ["{{baseUrl}}"], - "path": ["clients", "{{clientId}}", "images"] + "path": [ + "clients", + "{{clientId}}", + "images" + ] }, "description": "Uploads client profile photograph." } @@ -236,7 +248,11 @@ "url": { "raw": "{{baseUrl}}/clients/{{clientId}}/documents", "host": ["{{baseUrl}}"], - "path": ["clients", "{{clientId}}", "documents"] + "path": [ + "clients", + "{{clientId}}", + "documents" + ] }, "description": "Uploads client signature as a document." } @@ -262,7 +278,11 @@ "url": { "raw": "{{baseUrl}}/client/{{clientId}}/addresses?type=101", "host": ["{{baseUrl}}"], - "path": ["client", "{{clientId}}", "addresses"], + "path": [ + "client", + "{{clientId}}", + "addresses" + ], "query": [ { "key": "type", @@ -295,7 +315,11 @@ "url": { "raw": "{{baseUrl}}/client/{{clientId}}/addresses?type=102", "host": ["{{baseUrl}}"], - "path": ["client", "{{clientId}}", "addresses"], + "path": [ + "client", + "{{clientId}}", + "addresses" + ], "query": [ { "key": "type", @@ -320,7 +344,11 @@ "url": { "raw": "{{baseUrl}}/client/addresses/template", "host": ["{{baseUrl}}"], - "path": ["client", "addresses", "template"] + "path": [ + "client", + "addresses", + "template" + ] }, "description": "Fetches address template with `addressTypeIdOptions` and `stateProvinceIdOptions`. Use these IDs in address save requests." } @@ -346,7 +374,11 @@ "url": { "raw": "{{baseUrl}}/clients/{{clientId}}/familymembers", "host": ["{{baseUrl}}"], - "path": ["clients", "{{clientId}}", "familymembers"] + "path": [ + "clients", + "{{clientId}}", + "familymembers" + ] }, "description": "Adds a family member to the client. Call once per member." } @@ -364,7 +396,11 @@ "url": { "raw": "{{baseUrl}}/clients/{{clientId}}/familymembers", "host": ["{{baseUrl}}"], - "path": ["clients", "{{clientId}}", "familymembers"] + "path": [ + "clients", + "{{clientId}}", + "familymembers" + ] }, "description": "Fetches all family members for a client." } @@ -403,7 +439,13 @@ "url": { "raw": "{{baseUrl}}/clients/{{clientId}}/familymembers/{{familyMemberId}}/documents", "host": ["{{baseUrl}}"], - "path": ["clients", "{{clientId}}", "familymembers", "{{familyMemberId}}", "documents"] + "path": [ + "clients", + "{{clientId}}", + "familymembers", + "{{familyMemberId}}", + "documents" + ] }, "description": "Uploads a marriage certificate document for a family member. Set `familyMemberId` from the Add Family Member response." } @@ -421,7 +463,10 @@ "url": { "raw": "{{baseUrl}}/clients/{{clientId}}", "host": ["{{baseUrl}}"], - "path": ["clients", "{{clientId}}"] + "path": [ + "clients", + "{{clientId}}" + ] }, "description": "Fetches full client details to verify saved data." } diff --git a/src/app/accounting/accounting.component.html b/src/app/accounting/accounting.component.html index bb83b8e09..eeb29f912 100644 --- a/src/app/accounting/accounting.component.html +++ b/src/app/accounting/accounting.component.html @@ -18,7 +18,12 @@
{{ 'labels.text.The Chart of Accounts - General Ledger Setup' | translate }}
{{ 'labels.text.Accounts linked to Financial Activities' | translate }}
{{ 'labels.text.GLAccount Balances Application' | translate }}
{{ 'labels.text.Accounting to journal entries' | translate }}
{{ 'labels.text.Journal Entries Transactions' | translate }}