diff --git a/api-docs/apiLive.htm b/api-docs/apiLive.htm index 4a1831bfc..92859b3e3 100644 --- a/api-docs/apiLive.htm +++ b/api-docs/apiLive.htm @@ -7858,6 +7858,12 @@ Request Body:
{
+ "includeInBorrowerCycle": false,
+ "useBorrowerCycle": false,
"currency": {
- "code": "UGX",
- "name": "Uganda Shilling",
- "decimalPlaces": 2,
- "displaySymbol": "USh",
- "nameCode": "currency.UGX",
- "displayLabel": "Uganda Shilling (USh)"
+ "code": "",
+ "name": "",
+ "decimalPlaces": 0,
+ "inMultiplesOf": 0,
+ "displaySymbol": "",
+ "nameCode": "",
+ "displayLabel": " []"
},
"repaymentFrequencyType": {
"id": 2,
@@ -8149,22 +8188,29 @@ GET https://DomainName/api/v1/loanproducts/template
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
},
- "transactionProcessingStrategyId": 2,
- "transactionProcessingStrategyName": "Heavensfamily",
+ "principalVariationsForBorrowerCycle": [],
+ "interestRateVariationsForBorrowerCycle": [],
+ "numberOfRepaymentVariationsForBorrowerCycle": [],
"accountingRule": {
"id": 1,
"code": "accountingRuleType.none",
"value": "NONE"
},
- "accountingMappings": {},
+ "paymentTypeOptions": [
+ {
+ "id": 10,
+ "name": "check",
+ "position": 1
+ }
+ ],
"currencyOptions": [
{
- "code": "UGX",
- "name": "Uganda Shilling",
+ "code": "USD",
+ "name": "US Dollar",
"decimalPlaces": 2,
- "displaySymbol": "USh",
- "nameCode": "currency.UGX",
- "displayLabel": "Uganda Shilling (USh)"
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
}
],
"repaymentFrequencyTypeOptions": [
@@ -8205,7 +8251,7 @@ GET https://DomainName/api/v1/loanproducts/template
{
"id": 0,
"code": "amortizationType.equal.principal",
- "value": "Equal principle payments"
+ "value": "Equal principal payments"
}
],
"interestTypeOptions": [
@@ -8233,27 +8279,262 @@ GET https://DomainName/api/v1/loanproducts/template
}
],
"transactionProcessingStrategyOptions": [
+ {
+ "id": 1,
+ "code": "mifos-standard-strategy",
+ "name": "Mifos style"
+ },
{
"id": 2,
"code": "heavensfamily-strategy",
"name": "Heavensfamily"
+ },
+ {
+ "id": 3,
+ "code": "creocore-strategy",
+ "name": "Creocore"
+ },
+ {
+ "id": 4,
+ "code": "rbi-india-strategy",
+ "name": "RBI (India)"
+ },
+ {
+ "id": 5,
+ "code": "principal-interest-penalties-fees-order-strategy",
+ "name": "Principal Interest Penalties Fees Order"
+ },
+ {
+ "id": 6,
+ "code": "interest-principal-penalties-fees-order-strategy",
+ "name": "Interest Principal Penalties Fees Order"
}
],
"chargeOptions": [
{
- "id": 1,
- "name": "Bank Fee (per installment)",
+ "id": 5,
+ "name": "des charge",
"active": true,
"penalty": false,
"currency": {
- "code": "UGX",
- "name": "Uganda Shilling",
+ "code": "USD",
+ "name": "US Dollar",
"decimalPlaces": 2,
- "displaySymbol": "USh",
- "nameCode": "currency.UGX",
- "displayLabel": "Uganda Shilling (USh)"
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
},
- "amount": 1500,
+ "amount": 100.000000,
+ "chargeTimeType": {
+ "id": 1,
+ "code": "chargeTimeType.disbursement",
+ "value": "Disbursement"
+ },
+ "chargeAppliesTo": {
+ "id": 1,
+ "code": "chargeAppliesTo.loan",
+ "value": "Loan"
+ },
+ "chargeCalculationType": {
+ "id": 1,
+ "code": "chargeCalculationType.flat",
+ "value": "Flat"
+ },
+ "chargePaymentMode": {
+ "id": 0,
+ "code": "chargepaymentmode.regular",
+ "value": "Regular"
+ }
+ },
+ {
+ "id": 1,
+ "name": "flat install",
+ "active": true,
+ "penalty": false,
+ "currency": {
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ },
+ "amount": 50.000000,
+ "chargeTimeType": {
+ "id": 8,
+ "code": "chargeTimeType.instalmentFee",
+ "value": "Instalment Fee"
+ },
+ "chargeAppliesTo": {
+ "id": 1,
+ "code": "chargeAppliesTo.loan",
+ "value": "Loan"
+ },
+ "chargeCalculationType": {
+ "id": 1,
+ "code": "chargeCalculationType.flat",
+ "value": "Flat"
+ },
+ "chargePaymentMode": {
+ "id": 0,
+ "code": "chargepaymentmode.regular",
+ "value": "Regular"
+ }
+ },
+ {
+ "id": 9,
+ "name": "install amt+int",
+ "active": true,
+ "penalty": false,
+ "currency": {
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ },
+ "amount": 5.000000,
+ "chargeTimeType": {
+ "id": 8,
+ "code": "chargeTimeType.instalmentFee",
+ "value": "Instalment Fee"
+ },
+ "chargeAppliesTo": {
+ "id": 1,
+ "code": "chargeAppliesTo.loan",
+ "value": "Loan"
+ },
+ "chargeCalculationType": {
+ "id": 3,
+ "code": "chargeCalculationType.percent.of.amount.and.interest",
+ "value": "% Loan Amount + Interest"
+ },
+ "chargePaymentMode": {
+ "id": 0,
+ "code": "chargepaymentmode.regular",
+ "value": "Regular"
+ }
+ },
+ {
+ "id": 10,
+ "name": "install int",
+ "active": true,
+ "penalty": false,
+ "currency": {
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ },
+ "amount": 5.000000,
+ "chargeTimeType": {
+ "id": 8,
+ "code": "chargeTimeType.instalmentFee",
+ "value": "Instalment Fee"
+ },
+ "chargeAppliesTo": {
+ "id": 1,
+ "code": "chargeAppliesTo.loan",
+ "value": "Loan"
+ },
+ "chargeCalculationType": {
+ "id": 4,
+ "code": "chargeCalculationType.percent.of.interest",
+ "value": "% Interest"
+ },
+ "chargePaymentMode": {
+ "id": 0,
+ "code": "chargepaymentmode.regular",
+ "value": "Regular"
+ }
+ },
+ {
+ "id": 2,
+ "name": "install per",
+ "active": true,
+ "penalty": false,
+ "currency": {
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ },
+ "amount": 5.000000,
+ "chargeTimeType": {
+ "id": 8,
+ "code": "chargeTimeType.instalmentFee",
+ "value": "Instalment Fee"
+ },
+ "chargeAppliesTo": {
+ "id": 1,
+ "code": "chargeAppliesTo.loan",
+ "value": "Loan"
+ },
+ "chargeCalculationType": {
+ "id": 2,
+ "code": "chargeCalculationType.percent.of.amount",
+ "value": "% Amount"
+ },
+ "chargePaymentMode": {
+ "id": 1,
+ "code": "chargepaymentmode.accounttransfer",
+ "value": "Account transfer"
+ }
+ },
+ {
+ "id": 8,
+ "name": "spe int",
+ "active": true,
+ "penalty": false,
+ "currency": {
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ },
+ "amount": 5.000000,
+ "chargeTimeType": {
+ "id": 2,
+ "code": "chargeTimeType.specifiedDueDate",
+ "value": "Specified due date"
+ },
+ "chargeAppliesTo": {
+ "id": 1,
+ "code": "chargeAppliesTo.loan",
+ "value": "Loan"
+ },
+ "chargeCalculationType": {
+ "id": 4,
+ "code": "chargeCalculationType.percent.of.interest",
+ "value": "% Interest"
+ },
+ "chargePaymentMode": {
+ "id": 0,
+ "code": "chargepaymentmode.regular",
+ "value": "Regular"
+ }
+ },
+ {
+ "id": 4,
+ "name": "specific acc transfer",
+ "active": true,
+ "penalty": false,
+ "currency": {
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ },
+ "amount": 100.000000,
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
@@ -8268,6 +8549,116 @@ GET https://DomainName/api/v1/loanproducts/template
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
+ },
+ "chargePaymentMode": {
+ "id": 1,
+ "code": "chargepaymentmode.accounttransfer",
+ "value": "Account transfer"
+ }
+ },
+ {
+ "id": 7,
+ "name": "specific amt+int",
+ "active": true,
+ "penalty": false,
+ "currency": {
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ },
+ "amount": 5.000000,
+ "chargeTimeType": {
+ "id": 2,
+ "code": "chargeTimeType.specifiedDueDate",
+ "value": "Specified due date"
+ },
+ "chargeAppliesTo": {
+ "id": 1,
+ "code": "chargeAppliesTo.loan",
+ "value": "Loan"
+ },
+ "chargeCalculationType": {
+ "id": 3,
+ "code": "chargeCalculationType.percent.of.amount.and.interest",
+ "value": "% Loan Amount + Interest"
+ },
+ "chargePaymentMode": {
+ "id": 0,
+ "code": "chargepaymentmode.regular",
+ "value": "Regular"
+ }
+ },
+ {
+ "id": 3,
+ "name": "specific per",
+ "active": true,
+ "penalty": false,
+ "currency": {
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ },
+ "amount": 5.000000,
+ "chargeTimeType": {
+ "id": 2,
+ "code": "chargeTimeType.specifiedDueDate",
+ "value": "Specified due date"
+ },
+ "chargeAppliesTo": {
+ "id": 1,
+ "code": "chargeAppliesTo.loan",
+ "value": "Loan"
+ },
+ "chargeCalculationType": {
+ "id": 2,
+ "code": "chargeCalculationType.percent.of.amount",
+ "value": "% Amount"
+ },
+ "chargePaymentMode": {
+ "id": 0,
+ "code": "chargepaymentmode.regular",
+ "value": "Regular"
+ }
+ },
+ {
+ "id": 6,
+ "name": "xyz",
+ "active": true,
+ "penalty": false,
+ "currency": {
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ },
+ "amount": 50.000000,
+ "chargeTimeType": {
+ "id": 2,
+ "code": "chargeTimeType.specifiedDueDate",
+ "value": "Specified due date"
+ },
+ "chargeAppliesTo": {
+ "id": 1,
+ "code": "chargeAppliesTo.loan",
+ "value": "Loan"
+ },
+ "chargeCalculationType": {
+ "id": 1,
+ "code": "chargeCalculationType.flat",
+ "value": "Flat"
+ },
+ "chargePaymentMode": {
+ "id": 1,
+ "code": "chargepaymentmode.accounttransfer",
+ "value": "Account transfer"
}
}
],
@@ -8289,11 +8680,35 @@ GET https://DomainName/api/v1/loanproducts/template
}
],
"accountingMappingOptions": {
+ "liabilityAccountOptions": [
+ {
+ "id": 11,
+ "name": "over payment",
+ "glCode": "13",
+ "disabled": false,
+ "manualEntriesAllowed": true,
+ "type": {
+ "id": 2,
+ "code": "accountType.liability",
+ "value": "LIABILITY"
+ },
+ "usage": {
+ "id": 1,
+ "code": "accountUsage.detail",
+ "value": "DETAIL"
+ },
+ "nameDecorated": "over payment",
+ "tagId": {
+ "id": 0
+ },
+ "organizationRunningBalance": 0
+ },
+ ],
"assetAccountOptions": [
{
- "id": 2,
- "name": "Cash in Valut 1",
- "glCode": "11101",
+ "id": 1,
+ "name": "fund source",
+ "glCode": "01",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
@@ -8305,12 +8720,17 @@ GET https://DomainName/api/v1/loanproducts/template
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
- }
+ },
+ "nameDecorated": "fund source",
+ "tagId": {
+ "id": 0
+ },
+ "organizationRunningBalance": -60000
},
{
- "id": 4,
- "name": "Centenary Opening Account",
- "glCode": "11201",
+ "id": 2,
+ "name": "Loan portfolio",
+ "glCode": "02",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
@@ -8322,14 +8742,41 @@ GET https://DomainName/api/v1/loanproducts/template
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
- }
- }
+ },
+ "nameDecorated": "Loan portfolio",
+ "tagId": {
+ "id": 0
+ },
+ "organizationRunningBalance": 60000
+ },
+ {
+ "id": 3,
+ "name": "transfers",
+ "glCode": "03",
+ "disabled": false,
+ "manualEntriesAllowed": true,
+ "type": {
+ "id": 1,
+ "code": "accountType.asset",
+ "value": "ASSET"
+ },
+ "usage": {
+ "id": 1,
+ "code": "accountUsage.detail",
+ "value": "DETAIL"
+ },
+ "nameDecorated": "transfers",
+ "tagId": {
+ "id": 0
+ },
+ "organizationRunningBalance": 0
+ },
],
"expenseAccountOptions": [
{
- "id": 41,
- "name": "Water Charges",
- "glCode": "42102",
+ "id": 10,
+ "name": "loans written off 2",
+ "glCode": "12",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
@@ -8341,48 +8788,19 @@ GET https://DomainName/api/v1/loanproducts/template
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
- }
- },
- {
- "id": 42,
- "name": "Electricity Charges",
- "glCode": "42103",
- "disabled": false,
- "manualEntriesAllowed": true,
- "type": {
- "id": 5,
- "code": "accountType.expense",
- "value": "EXPENSE"
},
- "usage": {
- "id": 1,
- "code": "accountUsage.detail",
- "value": "DETAIL"
- }
- },
- {
- "id": 97,
- "name": "Miscellaneous",
- "glCode": "42905",
- "disabled": false,
- "manualEntriesAllowed": true,
- "type": {
- "id": 5,
- "code": "accountType.expense",
- "value": "EXPENSE"
+ "nameDecorated": "loans written off 2",
+ "tagId": {
+ "id": 0
},
- "usage": {
- "id": 1,
- "code": "accountUsage.detail",
- "value": "DETAIL"
- }
+ "organizationRunningBalance": 0
}
],
"incomeAccountOptions": [
{
- "id": 34,
- "name": "Interest on Loans",
- "glCode": "31101",
+ "id": 4,
+ "name": "income from interest",
+ "glCode": "04",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
@@ -8394,12 +8812,17 @@ GET https://DomainName/api/v1/loanproducts/template
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
- }
+ },
+ "nameDecorated": "income from interest",
+ "tagId": {
+ "id": 0
+ },
+ "organizationRunningBalance": 19
},
{
- "id": 35,
- "name": "Late Payment Interest",
- "glCode": "31102",
+ "id": 8,
+ "name": "income from fees 2",
+ "glCode": "10",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
@@ -8411,12 +8834,17 @@ GET https://DomainName/api/v1/loanproducts/template
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
- }
+ },
+ "nameDecorated": "income from fees 2",
+ "tagId": {
+ "id": 0
+ },
+ "organizationRunningBalance": 0
},
{
- "id": 37,
- "name": "Collected Bank Fees Receivable",
- "glCode": "6201",
+ "id": 9,
+ "name": "income from penalities 2",
+ "glCode": "11",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
@@ -8428,10 +8856,27 @@ GET https://DomainName/api/v1/loanproducts/template
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
- }
+ },
+ "nameDecorated": "income from penalities 2",
+ "tagId": {
+ "id": 0
+ },
+ "organizationRunningBalance": 0
}
]
- }
+ },
+ "valueConditionTypeOptions": [
+ {
+ "id": 2,
+ "code": "LoanProductValueConditionType.equal",
+ "value": "equals"
+ },
+ {
+ "id": 3,
+ "code": "LoanProductValueConditionType.greterthan",
+ "value": "greter than"
+ }
+ ]
}
@@ -8457,31 +8902,37 @@ GET https://DomainName/api/v1/loanproducts/{productId}
{
- "id": 1,
- "name": "LP with Charges but no accounting)",
+ "id": 11,
+ "name": "advanced accounting",
+ "includeInBorrowerCycle": true,
+ "useBorrowerCycle": true,
+ "status": "loanProduct.active",
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
+ "inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
- "principal": 100000,
- "numberOfRepayments": 12,
- "repaymentEvery": 1,
+ "principal": 10000.000000,
+ "minPrincipal": 2000.000000,
+ "maxPrincipal": 15000.000000,
+ "numberOfRepayments": 7,
+ "repaymentEvery": 7,
"repaymentFrequencyType": {
- "id": 2,
- "code": "repaymentFrequency.periodFrequencyType.months",
- "value": "Months"
+ "id": 0,
+ "code": "repaymentFrequency.periodFrequencyType.days",
+ "value": "Days"
},
- "interestRatePerPeriod": 1.75,
+ "interestRatePerPeriod": 5.000000,
"interestRateFrequencyType": {
"id": 2,
"code": "interestRateFrequency.periodFrequencyType.months",
"value": "Per month"
},
- "annualInterestRate": 21,
+ "annualInterestRate": 60.000000,
"amortizationType": {
"id": 1,
"code": "amortizationType.equal.installments",
@@ -8499,43 +8950,146 @@ GET https://DomainName/api/v1/loanproducts/{productId}
},
"transactionProcessingStrategyId": 1,
"transactionProcessingStrategyName": "Mifos style",
- "charges": [
+ "charges": [],
+ "principalVariationsForBorrowerCycle": [
{
+ "id": 21,
+ "borrowerCycleNumber": 1,
+ "paramType": {
+ "id": 1,
+ "code": "LoanProductParamType.principal",
+ "value": "principal"
+ },
+ "valueConditionType": {
+ "id": 2,
+ "code": "LoanProductValueConditionType.equal",
+ "value": "equals"
+ },
+ "minValue": 2000.000000,
+ "maxValue": 20000.000000,
+ "defaultValue": 15000.000000
+ },
+ {
+ "id": 20,
+ "borrowerCycleNumber": 1,
+ "paramType": {
+ "id": 1,
+ "code": "LoanProductParamType.principal",
+ "value": "principal"
+ },
+ "valueConditionType": {
+ "id": 3,
+ "code": "LoanProductValueConditionType.greterthan",
+ "value": "greter than"
+ },
+ "minValue": 3000.000000,
+ "maxValue": 25000.000000,
+ "defaultValue": 20000.000000
+ }
+ ],
+ "interestRateVariationsForBorrowerCycle": [],
+ "numberOfRepaymentVariationsForBorrowerCycle": [],
+ "accountingRule": {
+ "id": 2,
+ "code": "accountingRuleType.cash",
+ "value": "CASH BASED"
+ },
+ "accountingMappings": {
+ "fundSourceAccount": {
"id": 1,
- "name": "Loan service fee",
- "active": true,
- "penalty": false,
- "currency": {
- "code": "USD",
- "name": "US Dollar",
- "decimalPlaces": 2,
- "displaySymbol": "$",
- "nameCode": "currency.USD",
- "displayLabel": "US Dollar ($)"
+ "name": "fund source",
+ "glCode": "01"
+ },
+ "loanPortfolioAccount": {
+ "id": 2,
+ "name": "Loan portfolio",
+ "glCode": "02"
+ },
+ "transfersInSuspenseAccount": {
+ "id": 3,
+ "name": "transfers",
+ "glCode": "03"
+ },
+ "interestOnLoanAccount": {
+ "id": 4,
+ "name": "income from interest",
+ "glCode": "04"
+ },
+ "incomeFromFeeAccount": {
+ "id": 8,
+ "name": "income from fees 2",
+ "glCode": "10"
+ },
+ "incomeFromPenaltyAccount": {
+ "id": 9,
+ "name": "income from penalities 2",
+ "glCode": "11"
+ },
+ "writeOffAccount": {
+ "id": 10,
+ "name": "loans written off 2",
+ "glCode": "12"
+ },
+ "overpaymentLiabilityAccount": {
+ "id": 11,
+ "name": "over payment",
+ "glCode": "13"
+ }
+ },
+ "paymentChannelToFundSourceMappings": [
+ {
+ "paymentType": {
+ "id": 10,
+ "name": "check"
},
- "amount": 230.56,
- "chargeTimeType": {
+ "fundSourceAccount": {
"id": 1,
- "code": "chargeTimeType.disbursement",
- "value": "Disbursement"
- },
- "chargeAppliesTo": {
- "id": 1,
- "code": "chargeAppliesTo.loan",
- "value": "Loan"
- },
- "chargeCalculationType": {
- "id": 1,
- "code": "chargeCalculationType.flat",
- "value": "Flat"
+ "name": "fund source",
+ "glCode": "01"
}
}
],
- "accountingRule": {
- "id": 1,
- "code": "accountingRuleType.none",
- "value": "NONE"
- }
+ "feeToIncomeAccountMappings": [
+ {
+ "charge": {
+ "id": 1,
+ "name": "flat install",
+ "active": false,
+ "penalty": false
+ },
+ "incomeAccount": {
+ "id": 8,
+ "name": "income from fees 2",
+ "glCode": "10"
+ }
+ },
+ {
+ "charge": {
+ "id": 2,
+ "name": "install per",
+ "active": false,
+ "penalty": false
+ },
+ "incomeAccount": {
+ "id": 4,
+ "name": "income from interest",
+ "glCode": "04"
+ }
+ },
+ {
+ "charge": {
+ "id": 5,
+ "name": "des charge",
+ "active": false,
+ "penalty": false
+ },
+ "incomeAccount": {
+ "id": 9,
+ "name": "income from penalities 2",
+ "glCode": "11"
+ }
+ }
+ ]
}
@@ -8571,7 +9125,10 @@ GET https://DomainName/api/v1/loanproducts/{productId}
diff --git a/mifosng-provider/src/main/java/org/mifosplatform/accounting/common/AccountingConstants.java b/mifosng-provider/src/main/java/org/mifosplatform/accounting/common/AccountingConstants.java
index c2b2e6f9e..d679c4e3a 100755
--- a/mifosng-provider/src/main/java/org/mifosplatform/accounting/common/AccountingConstants.java
+++ b/mifosng-provider/src/main/java/org/mifosplatform/accounting/common/AccountingConstants.java
@@ -106,6 +106,30 @@ public class AccountingConstants {
}
}
+ public static enum LOAN_PRODUCT_ACCOUNTING_DATA_PARAMS {
+ FUND_SOURCE("fundSourceAccount"), LOAN_PORTFOLIO("loanPortfolioAccount"), INTEREST_ON_LOANS("interestOnLoanAccount"), INCOME_FROM_FEES(
+ "incomeFromFeeAccount"), INCOME_FROM_PENALTIES("incomeFromPenaltyAccount"), LOSSES_WRITTEN_OFF("writeOffAccount"), OVERPAYMENT(
+ "overpaymentLiabilityAccount"), INTEREST_RECEIVABLE("receivableInterestAccount"), FEES_RECEIVABLE(
+ "receivableFeeAccount"), PENALTIES_RECEIVABLE("receivablePenaltyAccount"), TRANSFERS_SUSPENSE(
+ "transfersInSuspenseAccount"), INCOME_ACCOUNT_ID("incomeAccount");
+
+ private final String value;
+
+ private LOAN_PRODUCT_ACCOUNTING_DATA_PARAMS(final String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return name().toString().replaceAll("_", " ");
+ }
+
+ public String getValue() {
+ return this.value;
+ }
+ }
+
+
/*** Accounting placeholders for cash based accounting for savings products ***/
public static enum CASH_ACCOUNTS_FOR_SAVINGS {
SAVINGS_REFERENCE(1), SAVINGS_CONTROL(2), INTEREST_ON_SAVINGS(3), INCOME_FROM_FEES(4), INCOME_FROM_PENALTIES(5), TRANSFERS_SUSPENSE(
diff --git a/mifosng-provider/src/main/java/org/mifosplatform/accounting/glaccount/data/GLAccountData.java b/mifosng-provider/src/main/java/org/mifosplatform/accounting/glaccount/data/GLAccountData.java
index de1faa54f..100d6fe84 100755
--- a/mifosng-provider/src/main/java/org/mifosplatform/accounting/glaccount/data/GLAccountData.java
+++ b/mifosng-provider/src/main/java/org/mifosplatform/accounting/glaccount/data/GLAccountData.java
@@ -26,8 +26,8 @@ public class GLAccountData {
private final String name;
private final Long parentId;
private final String glCode;
- private final boolean disabled;
- private final boolean manualEntriesAllowed;
+ private final Boolean disabled;
+ private final Boolean manualEntriesAllowed;
private final EnumOptionData type;
private final EnumOptionData usage;
private final String description;
@@ -139,8 +139,8 @@ public class GLAccountData {
this.name = name;
this.parentId = null;
this.glCode = glCode;
- this.disabled = false;
- this.manualEntriesAllowed = false;
+ this.disabled = null;
+ this.manualEntriesAllowed = null;
this.type = null;
this.usage = null;
this.description = null;
diff --git a/mifosng-provider/src/main/java/org/mifosplatform/accounting/producttoaccountmapping/data/ChargeToGLAccountMapper.java b/mifosng-provider/src/main/java/org/mifosplatform/accounting/producttoaccountmapping/data/ChargeToGLAccountMapper.java
index 70d87ba6f..4edee73af 100755
--- a/mifosng-provider/src/main/java/org/mifosplatform/accounting/producttoaccountmapping/data/ChargeToGLAccountMapper.java
+++ b/mifosng-provider/src/main/java/org/mifosplatform/accounting/producttoaccountmapping/data/ChargeToGLAccountMapper.java
@@ -5,16 +5,19 @@
*/
package org.mifosplatform.accounting.producttoaccountmapping.data;
+import org.mifosplatform.accounting.glaccount.data.GLAccountData;
+import org.mifosplatform.portfolio.charge.data.ChargeData;
+
public class ChargeToGLAccountMapper {
@SuppressWarnings("unused")
- private final long chargeId;
+ private final ChargeData charge;
@SuppressWarnings("unused")
- private final long incomeAccountId;
+ private final GLAccountData incomeAccount;
- public ChargeToGLAccountMapper(final long chargeId, final long incomeAccountId) {
- this.chargeId = chargeId;
- this.incomeAccountId = incomeAccountId;
+ public ChargeToGLAccountMapper(final ChargeData charge, final GLAccountData incomeAccount) {
+ this.charge = charge;
+ this.incomeAccount = incomeAccount;
}
}
diff --git a/mifosng-provider/src/main/java/org/mifosplatform/accounting/producttoaccountmapping/data/PaymentTypeToGLAccountMapper.java b/mifosng-provider/src/main/java/org/mifosplatform/accounting/producttoaccountmapping/data/PaymentTypeToGLAccountMapper.java
index 37bb31831..af0367419 100755
--- a/mifosng-provider/src/main/java/org/mifosplatform/accounting/producttoaccountmapping/data/PaymentTypeToGLAccountMapper.java
+++ b/mifosng-provider/src/main/java/org/mifosplatform/accounting/producttoaccountmapping/data/PaymentTypeToGLAccountMapper.java
@@ -5,16 +5,19 @@
*/
package org.mifosplatform.accounting.producttoaccountmapping.data;
+import org.mifosplatform.accounting.glaccount.data.GLAccountData;
+import org.mifosplatform.infrastructure.codes.data.CodeValueData;
+
public class PaymentTypeToGLAccountMapper {
@SuppressWarnings("unused")
- private final long paymentTypeId;
+ private final CodeValueData paymentType;
@SuppressWarnings("unused")
- private final long fundSourceAccountId;
+ private final GLAccountData fundSourceAccount;
- public PaymentTypeToGLAccountMapper(final long paymentTypeId, final long fundSourceAccountId) {
- this.paymentTypeId = paymentTypeId;
- this.fundSourceAccountId = fundSourceAccountId;
+ public PaymentTypeToGLAccountMapper(final CodeValueData paymentType, final GLAccountData fundSourceAccount) {
+ this.paymentType = paymentType;
+ this.fundSourceAccount = fundSourceAccount;
}
}
diff --git a/mifosng-provider/src/main/java/org/mifosplatform/accounting/producttoaccountmapping/service/ProductToGLAccountMappingReadPlatformServiceImpl.java b/mifosng-provider/src/main/java/org/mifosplatform/accounting/producttoaccountmapping/service/ProductToGLAccountMappingReadPlatformServiceImpl.java
index 2ce50d032..fc8d49efc 100755
--- a/mifosng-provider/src/main/java/org/mifosplatform/accounting/producttoaccountmapping/service/ProductToGLAccountMappingReadPlatformServiceImpl.java
+++ b/mifosng-provider/src/main/java/org/mifosplatform/accounting/producttoaccountmapping/service/ProductToGLAccountMappingReadPlatformServiceImpl.java
@@ -15,14 +15,17 @@ import java.util.Map;
import org.mifosplatform.accounting.common.AccountingConstants.ACCRUAL_ACCOUNTS_FOR_LOAN;
import org.mifosplatform.accounting.common.AccountingConstants.CASH_ACCOUNTS_FOR_LOAN;
import org.mifosplatform.accounting.common.AccountingConstants.CASH_ACCOUNTS_FOR_SAVINGS;
-import org.mifosplatform.accounting.common.AccountingConstants.LOAN_PRODUCT_ACCOUNTING_PARAMS;
+import org.mifosplatform.accounting.common.AccountingConstants.LOAN_PRODUCT_ACCOUNTING_DATA_PARAMS;
import org.mifosplatform.accounting.common.AccountingConstants.SAVINGS_PRODUCT_ACCOUNTING_PARAMS;
import org.mifosplatform.accounting.common.AccountingRuleType;
+import org.mifosplatform.accounting.glaccount.data.GLAccountData;
import org.mifosplatform.accounting.producttoaccountmapping.data.ChargeToGLAccountMapper;
import org.mifosplatform.accounting.producttoaccountmapping.data.PaymentTypeToGLAccountMapper;
import org.mifosplatform.accounting.producttoaccountmapping.domain.PortfolioProductType;
+import org.mifosplatform.infrastructure.codes.data.CodeValueData;
import org.mifosplatform.infrastructure.core.domain.JdbcSupport;
import org.mifosplatform.infrastructure.core.service.RoutingDataSource;
+import org.mifosplatform.portfolio.charge.data.ChargeData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
@@ -41,10 +44,13 @@ public class ProductToGLAccountMappingReadPlatformServiceImpl implements Product
private static final class ProductToGLAccountMappingMapper implements RowMapper