AcctViewer

Help is preferred to those who publish their work as Open Source and not as private branches rejecting collaboration. Such projects are not maintainable and shall be deleted.
Forum rules
This forum is personally pruned to avoid redundant posts. Related topics are grouped together. IF YOU HAVE REGISTERED, you need to send email to red1(a)red1.org with your username in the subject title to get me to activate you.

AcctViewer

Postby nmicoud » Fri Aug 10, 2012 5:07 pm

Hi,

I would like to add a "Progressive balance" column (not sure of translation...) in AcctViewer.

Here is an example :

DR CR Pr. balance
Line 1 100 0 100
Line 2 50 0 150
Line 3 0 80 70
[...]

It is equals to progressive balance of previous line + current line debit - current line credit.

Is it possible to calculate this inside AcctViewer ?

Regards,

Nicolas
nmicoud
Regular
 
Posts: 137
Joined: Fri Oct 07, 2011 6:19 pm

Re: AcctViewer

Postby tbayen » Fri Aug 10, 2012 7:49 pm

To calculate such a "progressive balance" in SQL you need a recursive approach. Use the "WITH RECURSIVE" clause in a view. There is an example at http://www.postgresql.org/docs/8.4/stat ... -with.html
tbayen
 
Posts: 15
Joined: Thu Dec 15, 2011 2:51 am

Re: AcctViewer

Postby nmicoud » Fri Aug 10, 2012 10:06 pm

Hi Thomas,
thanks for the link, will have a look ; hoping i could find equivalence for oracle
nmicoud
Regular
 
Posts: 137
Joined: Fri Oct 07, 2011 6:19 pm

Re: AcctViewer

Postby tbayen » Fri Aug 10, 2012 11:54 pm

Sorry - I did not think about using other databases than postgres. :-o

This link seems to address the problem. It is in german but there is not much text between the example code. You should be able to understand and run it: http://martinpreiss.blogspot.com/2010/0 ... hnung.html
tbayen
 
Posts: 15
Joined: Thu Dec 15, 2011 2:51 am

Re: AcctViewer

Postby globalqss » Sat Aug 11, 2012 6:06 am

Usually that's called a running total.

Unless the request is to be used all the time - I would simply export to excel (little button on bottom-right of AcctViewer) and create the formula there.

Regards,

Carlos Ruiz
globalqss
Senior
 
Posts: 599
Joined: Thu Dec 29, 2005 4:15 am
Location: Bogotá, Colombia

Re: AcctViewer

Postby nmicoud » Sat Aug 11, 2012 7:14 pm

@Thomas : thanks for the updated link, will have a look
@Carlos : thanks for the correct term ; exporting to excel is not an option ; they don't want to do a lot of clicks to obtain them. If if is too slow, will try to use Jasper

Those running totals are not used elsewhere ?

Nicolas
nmicoud
Regular
 
Posts: 137
Joined: Fri Oct 07, 2011 6:19 pm

Re: AcctViewer

Postby globalqss » Sun Aug 12, 2012 2:20 am

Nicolas, running total is implemented on "Statement of Accounts" - that's done using a temporary table and filling it with java.

Regards,

Carlos Ruiz
globalqss
Senior
 
Posts: 599
Joined: Thu Dec 29, 2005 4:15 am
Location: Bogotá, Colombia

Re: AcctViewer

Postby nmicoud » Sun Aug 12, 2012 7:31 pm

I did not know that, thanks for the tip.

Regards,

Nicolas
nmicoud
Regular
 
Posts: 137
Joined: Fri Oct 07, 2011 6:19 pm

Re: AcctViewer

Postby red1 » Sat Oct 13, 2012 9:03 am

Sometime in 2004 during Compiere times, in the Financial Statements module, I did play around with something sort of 'Accumulative Periods' where you set the control to '-1' for up to last period and '0' to up to present period. Wonder if this is similar to your case.
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia


Return to HELP ME!!!

Who is online

Users browsing this forum: No registered users and 2 guests

cron