keithwoodlock edited a comment on Dev Task MIFOSX-136

POST to https://localhost:8443/mifosng-provider/api/v1/journalentries with:

{ "dateFormat": "dd MMMM yyyy", "locale": "en", "officeId": 1, "entryDate": "14 December 2012", "debits": [], "credits": [] }

The error message back doesnt help me understand what I missing in terms of JSON structure:

"errors": [
    {
      "developerMessage": "Journal Entry must have atleast one Debit and one Credit",
      "defaultUserMessage": "Journal Entry must have atleast one Debit and one Credit",
      "userMessageGlobalisationCode": "error.msg.glJournalEntry.invalid.no.debits.or.credits",
      "parameterName": "id",
      "value": null,
      "args": [
        {
          "value": null
        },
        {
          "value": null
        },
        {
          "value": null
        }
      ]
    }
  ]

The real JSON required should be something like:

"locale":"en",
"dateFormat":"dd MMMM yyyy",
"officeId": 1,
"entryDate":"14 December 2012",
"comments": "some comments",
"debits": [
   {"glAccountId": "1","amount":"200"}
],
"credits": [
   {"glAccountId": "2","amount":"200"}
]

So would be nice to get message saying glAccountId & amount missing for debits and credits etc

Also - one question about glAccountId, would it not be better to use the natural unique identifier for accounts which is their GL Code? Are you worried about people editing the gl code or not using typical accounting apporach like 401?

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