How to get opening and closing balance of a GL Account for a date range

21 views
Skip to first unread message

Khurram Shahzad

unread,
Apr 2, 2017, 11:10:07 AM4/2/17
to tryton-dev
Dear All,

Our finance department wants a General Ledger report which is a modified version of the currently available GL report. They want to filter the 'move lines' for the input 'From Date' and 'To Date'. They also want to have the opening balance and closing balance for every account for these dates.

For example, we have following lines for Radiology Revenue:

01-Feb-17, credit $100, cust_invoice_30
02-Feb-17, credit $50, cust_invoice_34
02-Feb-17, credit $180, cust_invoice_36
03-Feb-17, credit $250, cust_invoice_39
04-Feb-17, credit $20, cust_invoice_40

If user specifies 'Date From': 02-Feb-17 and 'Date To': 03-Feb-17, following should be the output for Radiology Revenue:

Opening Balance: $100
02-Feb-17, credit $50, cust_invoice_34, balance $150,
02-Feb-17, credit $180, cust_invoice_36, balance $330
03-Feb-17, credit $250, cust_invoice_39, balance $580
Closing Balance: $580
Current Balance: $600

I have gone through the code of available GL report, it passes some parameters to get_credit_debit method using Transaction.set_context(). How can I pass 'From Date' and 'To Date' to this method to fulfill the above-stated requirement.

Best Regards,
Khurram.


Cédric Krier

unread,
Apr 4, 2017, 4:05:08 AM4/4/17
to tryton-dev
On 2017-04-02 07:46, Khurram Shahzad wrote:
> Dear All,
>
> Our finance department wants a General Ledger report which is a modified
> version of the currently available GL report. They want to filter the 'move
> lines' for the input 'From Date' and 'To Date'. They also want to have the
> opening balance and closing balance for every account for these dates.

The General Ledger is based on fiscal year and periods.
Why do you need it per dates?

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/
Reply all
Reply to author
Forward
0 new messages