update documentation for Accounting changes

This commit is contained in:
goutham-M
2013-05-23 15:53:10 +05:30
parent 683ba2ad76
commit 9cff637e16
5 changed files with 408 additions and 22 deletions
+387 -2
View File
@@ -751,6 +751,22 @@
<td><a href="#charges_update">Update a Charge</a></td>
<td><a href="#charges_delete">Delete a Charge</a></td>
</tr>
<tr>
<td><a href="#accountingrules">Accounting Rules</a></td>
<td>accountingrules</td>
<td><a href="#accountingrules_create">Create a Accounting Rule</a></td>
<td><a href="#accountingrules_list">List Accounting Rules</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>accountingrules/{accountingrulesId}</td>
<td></td>
<td><a href="#accountingrules_retrieve">Retrieve a Accounting Rule</a></td>
<td><a href="#accountingrules_update">Update a Accounting Rule</a></td>
<td><a href="#accountingrules_delete">Delete a Accounting Rule</a></td>
</tr>
</table>
</div>
</div>
@@ -1279,6 +1295,10 @@
<tr>
<td>reports/template</td>
<td><a href="#reports_template">Retrieve Report Template</a></td>
</tr>
<tr>
<td>accountingrules/template</td>
<td><a href="#accountingrules_template">Retrieve Accounting Rule Template</a></td>
</tr>
</table>
</div>
@@ -9360,6 +9380,315 @@ Content-Type: application/json
</div>
</div>
<!--Accounting Rules section starts here-->
<a id="accountingrules" name="accountingrules" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Accounting Rules</h3>
<p>
Its additional option for MFIs to define their own accounting rules.
Its typically used to perform daily accounting postings of journal entries.
</p>
<p>For an accounting rule debit account and credit account is fixed, so that we can avoid
the selection of credit and debit accounts every time for default journal entries</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Field Descriptions</div></td>
</tr>
<tr class=alt>
<td>name</td>
</tr>
<tr>
<td class=fielddesc>Name of the accounting rule</td>
</tr>
<tr class=alt>
<td>description</td>
</tr>
<tr>
<td class=fielddesc>The description about the accounting rule.</td>
</tr>
<tr class=alt>
<td>officeId</td>
</tr>
<tr>
<td class=fielddesc>The officeId of the office/branch for this accounting rule is applicable.</td>
</tr>
<tr class=alt>
<td>debitAccountHead</td>
</tr>
<tr>
<td class=fielddesc>Debit account for creating accounting rule</td>
</tr>
<tr class=alt>
<td>creditAccountHead</td>
</tr>
<tr>
<td class=fielddesc>Credit account for creating accounting rule</td>
</tr>
</table>
</div>
</div>
<a id="accountingrules_template" name="accountingrules_template"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Accounting Rule Details Template</h4>
<p>This is a convenience resource. It can be useful when
building maintenance user interface screens for client
applications. The template data returned consists of any or all
of:
<ul>
<li class=normalli>Field Defaults</li>
<li class=normalli>Allowed Value Lists</li>
</ul>
</p>
<p>Example Request:</p>
<div class=apiClick>accountingrules/template</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/accountingrules/template
</code>
<code class="method-response">
{
"systemDefined": false,
"allowedOffices": [{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
}],
"allowedAccounts": [{
"id": 21,
"name": "Cash 2",
"parentId": 18,
"glCode": "20011",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"description": "Cash",
"nameDecorated": "............Cash 2",
"tagId": {
"id": 10,
"name": "asset tag"
}
},
{
"id": 9,
"name": "Employee Salary",
"parentId": 8,
"glCode": "456674",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 5,
"code": "accountType.expense",
"value": "EXPENSE"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "Employee Salary",
"tagId": {
"id": 14,
"name": "Expenses Tag"
}
}]
}
</code>
</div>
</div>
<a id="accountingrules_create" name="accountingrules_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create/Define a Accounting rule</h4>
<p>Define a new Accounting rule.</p>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/accountingrules
</code>
<code class="method-request">
POST accountingrules
Content-Type: application/json
Request Body:
{
"name": "test",
"officeId": "1",
"debitAccountHead": "21",
"creditAccountHead": "9",
"description": "Employee salary"
}
</code>
<code class="method-response">
{
"officeId":1,
"resourceId":1
}
</code>
</div>
</div>
<a id="accountingrules_list" name="accountingrules_list" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Accounting Rules</h4>
<p>Returns the list of defined accounting rules.</p>
<p>Example Requests:</p>
<div class=apiClick>accountingrules</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/accountingrules
</code>
<code class="method-response">
[{
"id": 1,
"officeId": 1,
"officeName": "Head Office",
"name": "test",
"description": "Employee salary",
"systemDefined": false,
"debitAccountHead": {
"id": 21,
"name": "Cash 2",
"glCode": "20011",
"disabled": false,
"manualEntriesAllowed": false
},
"creditAccountHead": {
"id": 9,
"name": "Employee Salary",
"glCode": "456674",
"disabled": false,
"manualEntriesAllowed": false
}
},
{
"id": 2,
"officeId": 1,
"officeName": "Head Office",
"name": "A L1",
"description": "aafff",
"systemDefined": false,
"debitAccountHead": {
"id": 3,
"name": "A L",
"glCode": "10003",
"disabled": false,
"manualEntriesAllowed": false
},
"creditAccountHead": {
"id": 4,
"name": "car loan",
"glCode": "10004",
"disabled": false,
"manualEntriesAllowed": false
}
}]
</code>
</div>
</div>
<a id="accountingrules_retrieve" name="accountingrules_retrieve"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Accounting rule</h4>
<p>Returns the details of a defined Accounting rule.</p>
<p>Example Requests:</p>
<div class=apiClick>accountingrules/1</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/accountingrules/{accountingruleId}
</code>
<code class="method-response">
{
"id": 1,
"officeId": 1,
"officeName": "Head Office",
"name": "test",
"description": "Employee salary",
"systemDefined": false,
"debitAccountHead": {
"id": 21,
"name": "Cash 2",
"glCode": "20011",
"disabled": false,
"manualEntriesAllowed": false
},
"creditAccountHead": {
"id": 9,
"name": "Employee Salary",
"glCode": "456674",
"disabled": false,
"manualEntriesAllowed": false
}
}
</code>
</div>
</div>
<a id="accountingrules_update" name="accountingrules_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Accounting Rule</h4>
<p>Updates the details of a Accounting rule.</p>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/accountingrules/{accountingruleId}
</code>
<code class="method-request">
PUT accountingrules/1
Content-Type: application/json
Request Body:
{
"name": "Employee Salary posting rule"
}
</code>
<code class="method-response">
{
"resourceId": 1,
"changes": {
"name": "Employee Salary posting rule"
}
}
</code>
</div>
</div>
<a id="accountingrules_delete" name="accountingrules_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete a Accounting Rule</h4>
<p>Deletes a Accounting rule.</p>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://DomainName/api/v1/accountingrules/{accountingruleId}
</code>
<code class="method-request">
DELETE accountingrules/1
Content-Type: application/json
</code>
<code class="method-response">{ "resourceId": 1 } </code>
</div>
</div>
<!-- start of saving products api docs -->
<a id="savingsproducts" name="savingsproducts" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
@@ -13423,6 +13752,20 @@ No Request Body:
<td class=fielddesc>An additional field that is used to store additional information about the entry (Ex: chequeNo)
</td>
</tr>
<tr class=alt>
<td>useAccountingRule</td>
</tr>
<tr>
<td class=fielddesc>This flag denotes the journal entry should post on basis of Predefined accounting rule or general Journal Entry procudure. <br>If the flag is true the journal entry is posted on basis of predefined accounting rule.
</td>
</tr>
<tr class=alt>
<td>accountingRule</td>
</tr>
<tr>
<td class=fielddesc>Denotes the accounting rule id for posting journal entries, this parameter should pass in request body when <b>useAccountingRule</b> is true.
</td>
</tr>
</table>
</div>
</div>
@@ -13623,7 +13966,7 @@ GET https://DomainName/api/v1/journalentries?transactionId=PB37X8Y21EQUY4S
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>officeId, transactionDate
<td>officeId, transactionDate, useAccountingRule
</td>
</tr>
<tr>
@@ -13677,6 +14020,7 @@ Request Body:
"officeId": 1,
"transactionDate": "06 December 2012",
"comments": "Gifts for staff",
"useAccountingRule": "false",
"locale": "en" ,
"dateFormat": "dd MMMM yyyy",
"credits":[{"glAccountId":1,
@@ -13695,6 +14039,31 @@ Request Body:
{
"officeId": 1,
"transactionId": "DNEEMS2LPD0NJ9O"
}
</code>
<code class="method-declaration">
POST https://DomainName/api/v1/journalentries
</code>
<code class="method-request">
POST journalentries
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"officeId": "1",
"transactionDate": "23 May 2013",
"referenceNumber": "547",
"comments": "asdf",
"useAccountingRule": "true",
"accountingRule": "2",
"amount": "547"
}
</code>
<code class="method-response">
{
"officeId":1,
"transactionId":"RS9MCISID4WK1ZM"
}
</code>
</div>
@@ -14679,7 +15048,23 @@ GET https://DomainName/api/v1/search?query=000000111
<td></td>
<td></td>
<td></td>
</tr>
</tr>
<tr class="alt">
<td><a href="#accountingrules">Accounting Rules</a></td>
<td>accountingrules</td>
<td><a href="#accountingrules_create">Create a Accounting Rule</a></td>
<td><a href="#accountingrules_list">List Accounting Rules</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>accountingrules/{accountingrulesId}</td>
<td></td>
<td><a href="#accountingrules_retrieve">Retrieve a Accounting Rule</a></td>
<td><a href="#accountingrules_update">Update a Accounting Rule</a></td>
<td><a href="#accountingrules_delete">Delete a Accounting Rule</a></td>
</tr>
</table>
</div>