Re: Does the changes in apache fineract platform necessary to fix FINERACT issues

2017-04-10 Thread Thisura Philips
Hi Markus,

There is a limitation in implementing this in the backend. In the database,
we are storing only the "classification_enum" in the "acc_gl_account"
Classification Enum has the following values for respective account types.
  ASSET - 1
  LIABILITY - 2
  EQUITY - 3
  INCOME - 4
  EXPENSE - 5
The values can't be used to reflect the ascending order of names. Therefore
ORDER BY "classification_enum" won't work in the sql query.
There fore we have two options.
  1. Write a sorting function to sort the result set based on the
classification_enum and then on gl_code.
  2. Change the classification_enum values to reflect the ascending
order of account types and add ORDER BY classification_enum ASC, gl_code ASC
The changed enums will look like follows.
   ASSET - 1
   LIABILITY - 5
   EQUITY - 3
   INCOME - 4
   EXPENSE - 2
What is the best option? From the maintenance point of view, I think the
first option is better. But from the performance point of view, the second
option is better.

I have sent this PR  to
order the results according to gl_code. But there is no use of that if we
can't have the same with classification_enum as the first preference is
given to classification_enum.

Your ideas will be a great help to resolve this issue.

Thanks and Regards.

On Mon, Apr 3, 2017 at 11:20 AM, Thisura Philips 
wrote:

> Hi Markus,
>
> Exactly, it should be independent from the client.
> At the moment account in charts of accounts are ordered using orderBy
> directive.
> I will send the response from the platform ordering them as expected in
> this issue. 
>
> Cheers!
>
> Thanks & Regards.
>
> On Mon, Apr 3, 2017 at 10:56 AM, Markus Geiß  wrote:
>
>> Hey Thisura,
>>
>> features like the one you've mentioned should find their place within the
>> platform.
>>
>> Just imagine we have not only the community-app but also an android app
>> plus additional UIs we even don’t know about.
>>
>> It is best practice to implement those kind of changes within the
>> backend, so you don’t need to reimplement them with every client.
>>
>> Cheers
>>
>> Markus
>>
>> -Original Message-
>> From: Thisura Philips [mailto:ttcphil...@gmail.com]
>> Sent: Thursday, March 30, 2017 05:12 AM
>> To: dev@fineract.incubator.apache.org
>> Subject: Does the changes in apache fineract platform necessary to fix
>> FINERACT issues
>>
>> Hi devs,
>> Just a little bit of misunderstanding.
>> Let's take an example. The ticket at [1] > a/browse/FINERACT-389> requests to arrange the accounts that fall under
>> one account type in order of their GL codes.
>> This could be done easily with the changes at [2] <
>> https://github.com/openMF/community-app/pull/2157>. But this change is
>> in community-app.
>>
>> My question is, whether the fix is correct. Do we need to correct these
>> at the platform level? Or is the suggested fix in [2] <
>> https://github.com/openMF/community-app/pull/2157>.
>>
>> [1] https://issues.apache.org/jira/browse/FINERACT-389
>> 
>> [2] https://github.com/openMF/community-app/pull/2157
>> 
>>
>> Thanks and regards.
>>
>> --
>> T.T.C Philips (BSc.Eng (Undergrad))
>> Computer Science and Engineering,
>> Sri Lanka Institute of Information Technology(SLIIT)
>>
>
>
>
> --
> T.T.C Philips (BSc.Eng (Undergrad))
> Computer Science and Engineering,
> Sri Lanka Institute of Information Technology(SLIIT)
>
>
>
>


-- 
T.T.C Philips (BSc.Eng (Undergrad))
Computer Science and Engineering,
Sri Lanka Institute of Information Technology(SLIIT)


[jira] [Comment Edited] (FINERACT-389) Arrange the accounts that fall under one account type in order of their GL codes

2017-04-10 Thread Thisura (JIRA)

[ 
https://issues.apache.org/jira/browse/FINERACT-389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15963344#comment-15963344
 ] 

Thisura edited comment on FINERACT-389 at 4/10/17 7:03 PM:
---

There is a limitation in implementing this in the backend. In the database, we 
are storing only the "classification_enum" in the "acc_gl_account"

Classification Enum has the following values for respective account types. 

{code}
ASSET - 1
LIABILITY - 2 
EQUITY - 3
INCOME - 4
EXPENSE - 5
{code}

The values can't be used to reflect the ascending order of names. Therefore 
ORDER BY "classification_enum" won't work in the sql query.

There fore we have two options.

* Write a sorting function to sort the result set based on the 
classification_enum and then on gl_code.
* Change the classification_enum values to reflect the ascending order of 
account types and add ORDER BY classification_enum ASC, gl_code ASC
The changed enums will look like follows. 
{code}
ASSET - 1
LIABILITY - 5
EQUITY - 3
INCOME - 4
EXPENSE - 2
{code}


What is the best option? From the maintenance point of view, I think the first 
option is better. But from the performance point of view, the second option is 
better.


was (Author: thisura):
There is a limitation in implementing this in the backend. In the database, we 
are storing only the "classification_enum" in the "acc_gl_account"

Classification Enum has the following values for respective account types. 

{code}
ASSET - 1
LIABILITY - 2 
EQUITY - 3
INCOME - 4
EXPENSE - 5
{code}

The values can't be used to reflect the ascending order of names. Therefore 
ORDER BY "classification_enum" won't work in the sql query.

There fore we have two options.

* Write a sorting function to sort the result set based on the 
classification_enum and then on gl_code.
* Change the classification_enum values to reflect the ascending order of 
account types and add ORDER BY classification_enum ASC, gl_code ASC
The changed enums will look like follows. 
{code}
ASSET - 1
LIABILITY - 5
EQUITY - 3
INCOME - 4
EXPENSE - 2
{code}


What is the best option? From the maintainance point of view I think the first 
option is better. But from the performance point of view, the second option is 
better.

> Arrange the accounts that fall under one account type in order of their GL 
> codes
> 
>
> Key: FINERACT-389
> URL: https://issues.apache.org/jira/browse/FINERACT-389
> Project: Apache Fineract
>  Issue Type: Improvement
>  Components: Accounting
>Reporter: Santosh Math
>Assignee: Markus Geiss
>Priority: Minor
>  Labels: p2
>
> Reported by Mexina Daniel at https://mifosforge.jira.com/browse/MIFOSX-2825
> Original Description:
> Accounts in chart of accounts are arranged by their account type but those 
> accounts in the specific account type are randomly arranged.
> I was recommending for the accounts in the same account type to be arranged 
> by their GL code. Since the relating accounts will be under one header and so 
> their GL codes will be following each other and bring presentable 
> arrangement. (accounts in the same header, their GL codes should have 
> relation)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Comment Edited] (FINERACT-389) Arrange the accounts that fall under one account type in order of their GL codes

2017-04-10 Thread Thisura (JIRA)

[ 
https://issues.apache.org/jira/browse/FINERACT-389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15963344#comment-15963344
 ] 

Thisura edited comment on FINERACT-389 at 4/10/17 6:56 PM:
---

There is a limitation in implementing. In the database, we are storing only the 
"classification_enum" in the "acc_gl_account"

Classification Enum has the following values for respective account types. 

{code}
ASSET - 1
LIABILITY - 2 
EQUITY - 3
INCOME - 4
EXPENSE - 5
{code}

The values can't be used to reflect the ascending order of names. Therefore 
ORDER BY "classification_enum" won't work in the sql query.

There fore we have two options.

* Write a sorting function to sort the result set based on the 
classification_enum and then on gl_code.
* Change the classification_enum values to reflect the ascending order of 
account types and add ORDER BY classification_enum ASC, gl_code ASC
The changed enums will look like follows. 
{code}
ASSET - 1
LIABILITY - 5
EQUITY - 3
INCOME - 4
EXPENSE - 2
{code}


What is the best option? From the maintainance point of view I think the first 
option is better. But from the performance point of view, the second option is 
better.


was (Author: thisura):
There is a limitation in implementing. In the database, we are storing only the 
"classification_enum" in the "acc_gl_account"

Classification Enum has the following values for respective account types. 

{code}
ASSET - 1
LIABILITY - 2 
EQUITY - 3
INCOME - 4
EXPENSE - 5
{code}

The values can't be used to reflect the ascending order of names. Therefore 
ORDER BY "classification_enum" won't work in the sql query.

There fore we have two options.

* Write a sorting function to sort the result set based on the 
classification_enum and then on gl_code.
* Change the classification_enum values to reflect the ascending order of 
account types and add ORDER BY classification_enum ASC, gl_code ASC
The changed enums will look like follows. 
{code}
ASSET - 1
LIABILITY - 5
EQUITY - 3
INCOME - 4
EXPENSE - 2
{code}

> Arrange the accounts that fall under one account type in order of their GL 
> codes
> 
>
> Key: FINERACT-389
> URL: https://issues.apache.org/jira/browse/FINERACT-389
> Project: Apache Fineract
>  Issue Type: Improvement
>  Components: Accounting
>Reporter: Santosh Math
>Assignee: Markus Geiss
>Priority: Minor
>  Labels: p2
>
> Reported by Mexina Daniel at https://mifosforge.jira.com/browse/MIFOSX-2825
> Original Description:
> Accounts in chart of accounts are arranged by their account type but those 
> accounts in the specific account type are randomly arranged.
> I was recommending for the accounts in the same account type to be arranged 
> by their GL code. Since the relating accounts will be under one header and so 
> their GL codes will be following each other and bring presentable 
> arrangement. (accounts in the same header, their GL codes should have 
> relation)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (FINERACT-389) Arrange the accounts that fall under one account type in order of their GL codes

2017-04-10 Thread Thisura (JIRA)

[ 
https://issues.apache.org/jira/browse/FINERACT-389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15963335#comment-15963335
 ] 

Thisura commented on FINERACT-389:
--

In the above PR https://github.com/openMF/community-app/pull/2157 the fix will 
work only in the community-app. 

However as discussed in the thread "Does the changes in apache fineract 
platform necessary to fix FINERACT issues", it is suggested to implement these 
kinds of changes in the backend, to decouple the front-end.

New PR sent at https://github.com/apache/incubator-fineract/pull/330 to 
incorporate this into the backend. 

> Arrange the accounts that fall under one account type in order of their GL 
> codes
> 
>
> Key: FINERACT-389
> URL: https://issues.apache.org/jira/browse/FINERACT-389
> Project: Apache Fineract
>  Issue Type: Improvement
>  Components: Accounting
>Reporter: Santosh Math
>Assignee: Markus Geiss
>Priority: Minor
>  Labels: p2
>
> Reported by Mexina Daniel at https://mifosforge.jira.com/browse/MIFOSX-2825
> Original Description:
> Accounts in chart of accounts are arranged by their account type but those 
> accounts in the specific account type are randomly arranged.
> I was recommending for the accounts in the same account type to be arranged 
> by their GL code. Since the relating accounts will be under one header and so 
> their GL codes will be following each other and bring presentable 
> arrangement. (accounts in the same header, their GL codes should have 
> relation)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (FINERACT-389) Arrange the accounts that fall under one account type in order of their GL codes

2017-04-10 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FINERACT-389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15963303#comment-15963303
 ] 

ASF GitHub Bot commented on FINERACT-389:
-

GitHub user ThisuraThejith opened a pull request:

https://github.com/apache/incubator-fineract/pull/330

Fix FINERACT-389

ordere by gl_code added to sql query in retrieveAllGLAccounts

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ThisuraThejith/incubator-fineract FINERACT-389

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-fineract/pull/330.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #330


commit 1b438021421f6f64414cc5889735987a622f1f3a
Author: ThisuraThejith 
Date:   2017-04-10T18:32:02Z

ordere by gl_code added to sql query in retrieveAllGLAccounts




> Arrange the accounts that fall under one account type in order of their GL 
> codes
> 
>
> Key: FINERACT-389
> URL: https://issues.apache.org/jira/browse/FINERACT-389
> Project: Apache Fineract
>  Issue Type: Improvement
>  Components: Accounting
>Reporter: Santosh Math
>Assignee: Markus Geiss
>Priority: Minor
>  Labels: p2
>
> Reported by Mexina Daniel at https://mifosforge.jira.com/browse/MIFOSX-2825
> Original Description:
> Accounts in chart of accounts are arranged by their account type but those 
> accounts in the specific account type are randomly arranged.
> I was recommending for the accounts in the same account type to be arranged 
> by their GL code. Since the relating accounts will be under one header and so 
> their GL codes will be following each other and bring presentable 
> arrangement. (accounts in the same header, their GL codes should have 
> relation)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)