Merge pull request #286 from goutham-M/MIFOSX-338-FIXES
Api Documentation Updation for GLAccount recent changes
This commit is contained in:
+202
-3
@@ -12522,6 +12522,19 @@ Request Body:
|
|||||||
<tr>
|
<tr>
|
||||||
<td class=fielddesc>Human understandable description for the Ledger Account
|
<td class=fielddesc>Human understandable description for the Ledger Account
|
||||||
</td>
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class=alt>
|
||||||
|
<td>parentId</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class=fielddesc>To assign a parent for this GLAccount
|
||||||
|
</td>
|
||||||
|
</tr><tr class=alt>
|
||||||
|
<td>tagId</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class=fielddesc>Used for tagging the Account Heads, based on GLAccount types.
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@@ -12548,6 +12561,14 @@ Request Body:
|
|||||||
<dt>disabled</dt>
|
<dt>disabled</dt>
|
||||||
<dd>
|
<dd>
|
||||||
boolean <span>optional</span>
|
boolean <span>optional</span>
|
||||||
|
</dd>
|
||||||
|
<dt>parentId</dt>
|
||||||
|
<dd>
|
||||||
|
Long <span>optional</span>
|
||||||
|
</dd>
|
||||||
|
<dt>tagId</dt>
|
||||||
|
<dd>
|
||||||
|
Long <span>optional</span>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<p>Example Requests:</p>
|
<p>Example Requests:</p>
|
||||||
@@ -12565,6 +12586,7 @@ GET https://DomainName/api/v1/glaccounts
|
|||||||
{
|
{
|
||||||
"id": 16,
|
"id": 16,
|
||||||
"name": "Cash",
|
"name": "Cash",
|
||||||
|
"parentId": 1,
|
||||||
"glCode": "100001",
|
"glCode": "100001",
|
||||||
"disabled": false,
|
"disabled": false,
|
||||||
"manualEntriesAllowed": true,
|
"manualEntriesAllowed": true,
|
||||||
@@ -12578,7 +12600,12 @@ GET https://DomainName/api/v1/glaccounts
|
|||||||
"code": "accountUsage.detail",
|
"code": "accountUsage.detail",
|
||||||
"value": "DETAIL"
|
"value": "DETAIL"
|
||||||
},
|
},
|
||||||
"description": "Desc"
|
"description": "Desc",
|
||||||
|
"nameDecorated": "....Cash",
|
||||||
|
"tagId": {
|
||||||
|
"id": 10,
|
||||||
|
"name": "asset tag"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 15,
|
"id": 15,
|
||||||
@@ -12619,10 +12646,19 @@ GET https://DomainName/api/v1/glaccounts
|
|||||||
</p>
|
</p>
|
||||||
<p>Example Request:</p>
|
<p>Example Request:</p>
|
||||||
<div class=apiClick>glaccounts/template</div>
|
<div class=apiClick>glaccounts/template</div>
|
||||||
|
<div class=apiClick>glaccounts/template?type=1</div>
|
||||||
|
<br>
|
||||||
|
type is optional and integer value from 1 to 5.<br>
|
||||||
|
<P><br>1.Assets
|
||||||
|
<br>2.Liabilities
|
||||||
|
<br>3.Equity
|
||||||
|
<br>4.Income
|
||||||
|
<br>5.Expenses</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="method-example">
|
<div class="method-example">
|
||||||
<code class="method-declaration">
|
<code class="method-declaration">
|
||||||
GET https://DomainName/api/v1/glaccounts/template
|
GET https://DomainName/api/v1/glaccounts/template<br>
|
||||||
|
GET https://DomainName/api/v1/glaccounts/template?type=1
|
||||||
</code>
|
</code>
|
||||||
<code class="method-response">
|
<code class="method-response">
|
||||||
{
|
{
|
||||||
@@ -12676,7 +12712,161 @@ GET https://DomainName/api/v1/glaccounts/template
|
|||||||
"code": "accountUsage.header",
|
"code": "accountUsage.header",
|
||||||
"value": "HEADER"
|
"value": "HEADER"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"assetHeaderAccountOptions": [
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"name": "Two wheeler loan",
|
||||||
|
"glCode": "10001",
|
||||||
|
"disabled": false,
|
||||||
|
"manualEntriesAllowed": true,
|
||||||
|
"type": {
|
||||||
|
"id": 1,
|
||||||
|
"code": "accountType.asset",
|
||||||
|
"value": "ASSET"
|
||||||
|
},
|
||||||
|
"usage": {
|
||||||
|
"id": 2,
|
||||||
|
"code": "accountUsage.header",
|
||||||
|
"value": "HEADER"
|
||||||
|
},
|
||||||
|
"nameDecorated": "Two wheeler loan",
|
||||||
|
"tagId": {
|
||||||
|
"id": 10,
|
||||||
|
"name": "asset tag"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"name": "VEHICLE LOAN",
|
||||||
|
"parentId": 1,
|
||||||
|
"glCode": "10002",
|
||||||
|
"disabled": false,
|
||||||
|
"manualEntriesAllowed": true,
|
||||||
|
"type": {
|
||||||
|
"id": 1,
|
||||||
|
"code": "accountType.asset",
|
||||||
|
"value": "ASSET"
|
||||||
|
},
|
||||||
|
"usage": {
|
||||||
|
"id": 2,
|
||||||
|
"code": "accountUsage.header",
|
||||||
|
"value": "HEADER"
|
||||||
|
},
|
||||||
|
"nameDecorated": "....VEHICLE LOAN",
|
||||||
|
"tagId": {
|
||||||
|
"id": 10,
|
||||||
|
"name": "asset tag"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"liabilityHeaderAccountOptions": [
|
||||||
|
{
|
||||||
|
"id": 15,
|
||||||
|
"name": "liabilitieschild",
|
||||||
|
"glCode": "ltchild",
|
||||||
|
"disabled": false,
|
||||||
|
"manualEntriesAllowed": true,
|
||||||
|
"type": {
|
||||||
|
"id": 2,
|
||||||
|
"code": "accountType.liability",
|
||||||
|
"value": "LIABILITY"
|
||||||
|
},
|
||||||
|
"usage": {
|
||||||
|
"id": 2,
|
||||||
|
"code": "accountUsage.header",
|
||||||
|
"value": "HEADER"
|
||||||
|
},
|
||||||
|
"nameDecorated": "liabilitieschild",
|
||||||
|
"tagId": {
|
||||||
|
"id": 11,
|
||||||
|
"name": "liability tag"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"equityHeaderAccountOptions": [
|
||||||
|
{
|
||||||
|
"id": 13,
|
||||||
|
"name": "testajax",
|
||||||
|
"glCode": "12345678",
|
||||||
|
"disabled": false,
|
||||||
|
"manualEntriesAllowed": true,
|
||||||
|
"type": {
|
||||||
|
"id": 3,
|
||||||
|
"code": "accountType.equity",
|
||||||
|
"value": "EQUITY"
|
||||||
|
},
|
||||||
|
"usage": {
|
||||||
|
"id": 2,
|
||||||
|
"code": "accountUsage.header",
|
||||||
|
"value": "HEADER"
|
||||||
|
},
|
||||||
|
"nameDecorated": "testajax",
|
||||||
|
"tagId": {
|
||||||
|
"id": 12,
|
||||||
|
"name": "Equity tag"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"expenseHeaderAccountOptions": [
|
||||||
|
{
|
||||||
|
"id": 8,
|
||||||
|
"name": "Salary",
|
||||||
|
"glCode": "450098",
|
||||||
|
"disabled": false,
|
||||||
|
"manualEntriesAllowed": true,
|
||||||
|
"type": {
|
||||||
|
"id": 5,
|
||||||
|
"code": "accountType.expense",
|
||||||
|
"value": "EXPENSE"
|
||||||
|
},
|
||||||
|
"usage": {
|
||||||
|
"id": 2,
|
||||||
|
"code": "accountUsage.header",
|
||||||
|
"value": "HEADER"
|
||||||
|
},
|
||||||
|
"nameDecorated": "Salary",
|
||||||
|
"tagId": {
|
||||||
|
"id": 14,
|
||||||
|
"name": "Expenses Tag"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"allowedAssetsTagOptions": [
|
||||||
|
{
|
||||||
|
"id": 10,
|
||||||
|
"name": "asset tag",
|
||||||
|
"position": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"allowedLiabilitiesTagOptions": [
|
||||||
|
{
|
||||||
|
"id": 11,
|
||||||
|
"name": "liability tag",
|
||||||
|
"position": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"allowedEquityTagOptions": [
|
||||||
|
{
|
||||||
|
"id": 12,
|
||||||
|
"name": "Equity tag",
|
||||||
|
"position": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"allowedIncomeTagOptions": [
|
||||||
|
{
|
||||||
|
"id": 13,
|
||||||
|
"name": "Income Tag",
|
||||||
|
"position": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"allowedExpensesTagOptions": [
|
||||||
|
{
|
||||||
|
"id": 14,
|
||||||
|
"name": "Expenses Tag",
|
||||||
|
"position": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
</code>
|
</code>
|
||||||
</div>
|
</div>
|
||||||
@@ -12756,6 +12946,8 @@ Request Body:
|
|||||||
"glCode": "100017",
|
"glCode": "100017",
|
||||||
"manualEntriesAllowed": true,
|
"manualEntriesAllowed": true,
|
||||||
"type": 1,
|
"type": 1,
|
||||||
|
"tagId": "10",
|
||||||
|
"parentId": "18",
|
||||||
"usage": 1,
|
"usage": 1,
|
||||||
"description": "Cash at Bangalore Branch"
|
"description": "Cash at Bangalore Branch"
|
||||||
}
|
}
|
||||||
@@ -13191,6 +13383,13 @@ No Request Body:
|
|||||||
for all credits that make up the Journal entry and
|
for all credits that make up the Journal entry and
|
||||||
vice-versa
|
vice-versa
|
||||||
</td>
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class=alt>
|
||||||
|
<td>referenceNumber</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class=fielddesc>An additional field that is used to store additional information about the entry (Ex: chequeNo)
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+3
-3
@@ -108,7 +108,7 @@ public class GLAccountData {
|
|||||||
this.allowedExpensesTagOptions = allowedExpensesTagOptions;
|
this.allowedExpensesTagOptions = allowedExpensesTagOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static GLAccountData sensibleDefaultsForNewGLAccountCreation(final Integer GLAccType) {
|
public static GLAccountData sensibleDefaultsForNewGLAccountCreation(final Integer glAccType) {
|
||||||
final Long id = null;
|
final Long id = null;
|
||||||
final String name = null;
|
final String name = null;
|
||||||
final Long parentId = null;
|
final Long parentId = null;
|
||||||
@@ -116,8 +116,8 @@ public class GLAccountData {
|
|||||||
final boolean disabled = false;
|
final boolean disabled = false;
|
||||||
final boolean manualEntriesAllowed = true;
|
final boolean manualEntriesAllowed = true;
|
||||||
final EnumOptionData type;
|
final EnumOptionData type;
|
||||||
if(GLAccType!=0)
|
if(glAccType != null && glAccType >= GLAccountType.getMinValue() && glAccType <= GLAccountType.getMaxValue())
|
||||||
type = AccountingEnumerations.gLAccountType(GLAccType);
|
type = AccountingEnumerations.gLAccountType(glAccType);
|
||||||
else
|
else
|
||||||
type = AccountingEnumerations.gLAccountType(GLAccountType.ASSET);
|
type = AccountingEnumerations.gLAccountType(GLAccountType.ASSET);
|
||||||
final EnumOptionData usage = AccountingEnumerations.gLAccountUsage(GLAccountUsage.DETAIL);
|
final EnumOptionData usage = AccountingEnumerations.gLAccountUsage(GLAccountUsage.DETAIL);
|
||||||
|
|||||||
Reference in New Issue
Block a user