You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Muthu (Jira)" <ji...@apache.org> on 2023/05/05 08:24:00 UTC
[jira] [Commented] (FINERACT-1912) Transaction query - Advanced
[ https://issues.apache.org/jira/browse/FINERACT-1912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17719735#comment-17719735 ]
Muthu commented on FINERACT-1912:
---------------------------------
[~peter.santa] Currently the savings accounts API (with associations=all) response looks like,
{code:java}
{
"id": 1,
"accountNo": "000000001",
"depositType": {
"id": 100,
"code": "depositAccountType.savingsDeposit",
"value": "Savings"
},
"clientId": 1,
"clientName": "Petra Yton",
"savingsProductId": 1,
"savingsProductName": "Passbook Savings",
"fieldOfficerId": 0,
"status": {
"id": 300,
"code": "savingsAccountStatusType.active",
"value": "Active",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": true,
"closed": false,
"prematureClosed": false,
"transferInProgress": false,
"transferOnHold": false,
"matured": false
},
"subStatus": {
"id": 0,
"code": "SavingsAccountSubStatusEnum.none",
"value": "None",
"none": true,
"inactive": false,
"dormant": false,
"escheat": false,
"block": false,
"blockCredit": false,
"blockDebit": false
},
"timeline": {
"submittedOnDate": [
2009,
3,
4
],
"submittedByUsername": "mifos",
"submittedByFirstname": "App",
"submittedByLastname": "Administrator",
"approvedOnDate": [
2009,
3,
4
],
"approvedByUsername": "mifos",
"approvedByFirstname": "App",
"approvedByLastname": "Administrator",
"activatedOnDate": [
2009,
3,
4
],
"activatedByUsername": "mifos",
"activatedByFirstname": "App",
"activatedByLastname": "Administrator"
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"nominalAnnualInterestRate": 5.000000,
"interestCompoundingPeriodType": {
"id": 1,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
"value": "Daily"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"withdrawalFeeForTransfers": false,
"allowOverdraft": false,
"enforceMinRequiredBalance": false,
"lienAllowed": false,
"withHoldTax": false,
"lastActiveTransactionDate": [
2013,
5,
27
],
"isDormancyTrackingActive": false,
"summary": {
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"totalDeposits": 500.000000,
"totalInterestEarned": 322.170000,
"totalInterestPosted": 0,
"accountBalance": 500.000000,
"totalOverdraftInterestDerived": 0,
"interestNotPosted": 322.170000,
"lastInterestCalculationDate": [
2023,
5,
5
],
"availableBalance": 500.000000
},
"transactions":
{code}
*[*
{code:java}
{
"id": 1,
"transactionType": {
"id": 1,
"code": "savingsAccountTransactionType.deposit",
"value": "Deposit",
"deposit": true,
"dividendPayout": false,
"withdrawal": false,
"interestPosting": false,
"feeDeduction": false,
"initiateTransfer": false,
"approveTransfer": false,
"withdrawTransfer": false,
"rejectTransfer": false,
"overdraftInterest": false,
"writtenoff": false,
"overdraftFee": true,
"withholdTax": false,
"escheat": false,
"amountHold": false,
"amountRelease": false
},
"accountId": 1,
"accountNo": "000000001",
"date": [
2013,
5,
27
],
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"paymentDetailData": {
"id": 1,
"paymentType": {
"id": 1,
"name": "Money Transfer",
"isSystemDefined": false
},
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
},
"amount": 500.000000,
"runningBalance": 500.000000,
"reversed": false,
"submittedOnDate": [
2023,
5,
5
],
"interestedPostedAsOn": false,
"submittedByUsername": "mifos",
"isManualTransaction": false,
"isReversal": false,
"originalTransactionId": 0,
"lienTransaction": false,
"releaseTransactionId": 0,
"chargesPaidByData": []
}
]
} {code}
If we implement the Pagination for transactions then it might look like,
{code:java}
{
"id": 1,
"accountNo": "000000001",
"depositType": {
"id": 100,
"code": "depositAccountType.savingsDeposit",
"value": "Savings"
},
"clientId": 1,
"clientName": "Petra Yton",
"savingsProductId": 1,
"savingsProductName": "Passbook Savings",
"fieldOfficerId": 0,
"status": {
"id": 300,
"code": "savingsAccountStatusType.active",
"value": "Active",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": true,
"closed": false,
"prematureClosed": false,
"transferInProgress": false,
"transferOnHold": false,
"matured": false
},
"subStatus": {
"id": 0,
"code": "SavingsAccountSubStatusEnum.none",
"value": "None",
"none": true,
"inactive": false,
"dormant": false,
"escheat": false,
"block": false,
"blockCredit": false,
"blockDebit": false
},
"timeline": {
"submittedOnDate": [
2009,
3,
4
],
"submittedByUsername": "mifos",
"submittedByFirstname": "App",
"submittedByLastname": "Administrator",
"approvedOnDate": [
2009,
3,
4
],
"approvedByUsername": "mifos",
"approvedByFirstname": "App",
"approvedByLastname": "Administrator",
"activatedOnDate": [
2009,
3,
4
],
"activatedByUsername": "mifos",
"activatedByFirstname": "App",
"activatedByLastname": "Administrator"
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"nominalAnnualInterestRate": 5,
"interestCompoundingPeriodType": {
"id": 1,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
"value": "Daily"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"withdrawalFeeForTransfers": false,
"allowOverdraft": false,
"enforceMinRequiredBalance": false,
"lienAllowed": false,
"withHoldTax": false,
"lastActiveTransactionDate": [
2013,
5,
27
],
"isDormancyTrackingActive": false,
"summary": {
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"totalDeposits": 500,
"totalInterestEarned": 322.17,
"totalInterestPosted": 0,
"accountBalance": 500,
"totalOverdraftInterestDerived": 0,
"interestNotPosted": 322.17,
"lastInterestCalculationDate": [
2023,
5,
5
],
"availableBalance": 500
},
"transactions": {
"totalFilteredRecords": 1,
"pageItems": [
{
"id": 1,
"transactionType": {
"id": 1,
"code": "savingsAccountTransactionType.deposit",
"value": "Deposit",
"deposit": true,
"dividendPayout": false,
"withdrawal": false,
"interestPosting": false,
"feeDeduction": false,
"initiateTransfer": false,
"approveTransfer": false,
"withdrawTransfer": false,
"rejectTransfer": false,
"overdraftInterest": false,
"writtenoff": false,
"overdraftFee": true,
"withholdTax": false,
"escheat": false,
"amountHold": false,
"amountRelease": false
},
"accountId": 1,
"accountNo": "000000001",
"date": [
2013,
5,
27
],
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"paymentDetailData": {
"id": 1,
"paymentType": {
"id": 1,
"name": "Money Transfer",
"isSystemDefined": false
},
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
},
"amount": 500,
"runningBalance": 500,
"reversed": false,
"submittedOnDate": [
2023,
5,
5
],
"interestedPostedAsOn": false,
"submittedByUsername": "mifos",
"isManualTransaction": false,
"isReversal": false,
"originalTransactionId": 0,
"lienTransaction": false,
"releaseTransactionId": 0,
"chargesPaidByData": []
}
]
}
} {code}
*Please check the highlighted parts*
Backward compatibility will be lost if we implement paging as described above.
Could you please suggest how we should go about this?
> Transaction query - Advanced
> ----------------------------
>
> Key: FINERACT-1912
> URL: https://issues.apache.org/jira/browse/FINERACT-1912
> Project: Apache Fineract
> Issue Type: New Feature
> Components: Savings
> Reporter: Peter Santa
> Priority: Major
> Labels: BeanSalad
>
> h1. Background
> Currently transactions of a Saving Account cannot be filtered - either all of them are in the response (using ...?associations=all), or none of them.
> Pagination and sorting is not supported.
> h1. Goal
> Foe Transactions related to - at least - Savings Account, support having:
> * pagination - following the concept in Fineract, implemented already for other entities
> * sorting - following the concept in Fineract, implemented already for other entities
> * filtering for
> ** transaction date:
> *** greather-than-or-equal
> *** less-than-or-equal
> *** greater-than
> *** less-than
> ** amount
> **
> *** greather-than-or-equal
> *** less-than-or-equal
> *** greater-than
> *** less-than
> ** deposit/withdraw
> ** externalId - if FINERACT-1760 is already implemented
> The filtering parameters should be applied with "AND" relation.
> h1. Solution Concept
> Have the solution concept aligned between
> * FINERACT-1910
> * FINERACT-1912
> * FINERACT-1915
> The API should support passing the required parameters.
> <Solution Concept to be extended by developers>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)