Hello to everybody,
I use neso-3.2.1 and when i print a General Ledger report, i noticed two 
things:

First the "From Period:" clause in the report give always the name of first 
period.
This happens cause the assignment " periods = end_periods ". Because 
end_periods is a list of periods from 
first period to last period we have choose (from account_period table), the 
statement - localcontext['start_period'] = periods[0] -
always gives the first period no matter what you choose as "From Period" 
clause.The correct is start_period instead of periods[0].

Second , when i choose the first period (for example January,i named 
periods with month's name) as the 
"From Period:" clause,the results in balance(starting balance) and total 
debit and credit columns are a mess,
the amount of balance - starting balance - of every account is wrong (it is 
the final total of debit and credit of the account),
the same happened with total columns.I think the lists 
start_period,start_periods_ids and id2start_account dictionary is 
responsible 
for this.Somebody have to look for a solution.

To avoid the wrong result in the report (again only when i choose the 
january as the starting period) I had to modify the
template general_ledger.odt only in Balance and Total rows.In each column 
(debit,credit and balance) i use the "if" statement
in placeholders as follow:

*For Balance row in debit column* (the same for the rest two columns):
      if test="start_period.id==1"
      formatLang(0,user.language)
      /if
     if test="start_period.id != 1"
     the same is it is now
     /if

*For Total row in debit column* (the same for the credit column):
     if test="start_period.id==1"
     formatLang(id2end_account[account.id].debit, user.language) # credit 
for credit column
     /if

     if test="start_period.id != 1"
     the same as it is now
     /if

     *for balance column:*
     if test="start_period.id==1"
     formatLang(id2end_account[account.id].debit - 
id2end_account[account.id].credit,user.language)
     /if
     if test="start_period.id != 1"
     formatLang((id2end_account[account.id].debit - 
id2end_account[account.id].credit) - (id2start_account[account.id].debit - 
id2start_account[account.id].credit), user.language)
     /if

I hope to help anyone who has the same problems.

Reply via email to