keithwoodlock commented on Dev Task MIFOSX-136

Vishwas, some feedback on the api:

List general journal entries: https://localhost:8443/mifosng-provider/api/v1/journalentries

Questions from example result returned;

1. Why return GL code also and display it - I think thats as or more recognisable to accountants than the account name
2. "entityId": 0 - the entityId is actually null but defaulting to 0 - if you use JdbcSupport.getLong it will support nulls
3. The enunmeration types for glAccountClassification & entryType dont follow same approach as rest of API. Would expect those values to be like other enumeration values returned from other apis like /loanproducts e.g.

"loanTermFrequencyType": {
   "id": 2,
   "code": "loanTermFrequency.periodFrequencyType.months",
   "value": "Months"
}

Exploring that further I can see you settled on just putting in the string value of the enums you created in AccountingConstants.java for GL_ACCOUNT_CLASSIFICATION and JOURNAL_ENTRY_TYPE - I think the preference is to follow approach used through rest of code around enumerations which is to use an integer value (but not the enum ordinal) and store that on database rather than a string value.

Example result returned:

[
  {
    "id": 1,
    "officeId": 1,
    "officeName": "Head Office",
    "glAccountName": "Provisions for Loan Impairment",
    "glAccountId": 39,
    "glAccountClassification": "EXPENSE",
    "entryDate": [
      2012,
      12,
      1
    ],
    "entryType": "DEBIT",
    "amount": 2000,
    "transactionId": "KPZ5AF11SQUSSNB",
    "portfolioGenerated": false,
    "entityId": 0,
    "createdByUserId": 1,
    "createdDate": [
      2012,
      12,
      15
    ],
    "createdByUserName": "mifos",
    "comments": "loan loss provisioning",
    "reversed": false
  },
  {
    "id": 2,
    "officeId": 1,
    "officeName": "Head Office",
    "glAccountName": "Impairment Losses on Loans",
    "glAccountId": 38,
    "glAccountClassification": "EXPENSE",
    "entryDate": [
      2012,
      12,
      1
    ],
    "entryType": "CREDIT",
    "amount": 2000,
    "transactionId": "KPZ5AF11SQUSSNB",
    "portfolioGenerated": false,
    "entityId": 0,
    "createdByUserId": 1,
    "createdDate": [
      2012,
      12,
      15
    ],
    "createdByUserName": "mifos",
    "comments": "loan loss provisioning",
    "reversed": false
  }
]
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Mifos-issues mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-issues

Reply via email to