You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Rees Watkins <ga...@yahoo.co.uk> on 2009/03/25 10:08:35 UTC

r755534 breaks balance sheet Income statement

Hi

I have just merged with version 755534 from 718913.

The income statement does not show the account names correctly. eg "Retained income" name shows as [_336000] [] 

The balance sheet now shows no data. 

I have tested this on demo site https://lamouline.myvnc.com:28443/accounting/control/prepareIncomeStatement

Is anyone aware of these issues and how it can be resolved? I think it may have something to do with the change from double to BigDecimal or possibly the changes to minilang. I have not been able to chase the exact cause down yet.

Cheers
Rees



      

Re: r755534 breaks balance sheet Income statement

Posted by Rees Watkins <ga...@yahoo.co.uk>.
Hi Adrian

If you are able to fix balance sheet and income statement that will be fantastic - thanks.  No value figures are appearing on Income statement - not sure if this the same issue.

Cheers
Rees




________________________________
From: Adrian Crum <ad...@hlmksw.com>
To: user@ofbiz.apache.org
Sent: Thursday, 26 March, 2009 17:28:37
Subject: Re: r755534 breaks balance sheet Income statement

I will look into this over the weekend.

-Adrian

Rees Watkins wrote:
> Hi David
> 
> Thanks for your reply.
> 
> I'm
> afraid I do not know about the new EL stuff. The code snippet below
> shows how accounts figures are added to a map in
> prepareIncomeStatement. glAccount.glAccountId is correct as are the
> "amount" figures before adding to the map. When the entry is made into
> the map glAccountId gets an underscore in the map entry. Please could
> you maybe point out an example piece of code to illustrate your point
> so I can look at fixing this.
> 
> Thanks
> Rees
> 
> <simple-method method-name="prepareIncomeStatement" short-description="Prepare data for the Income Statement">
> ***
> ***
> ***
>                 <if-empty field="glAccountTotalsExpenseMap.${glAccount.glAccountId}">
>                     <set field="glAccountTotalsExpenseMap.${glAccount.glAccountId}" value="0.0" type="BigDecimal"/>
>                 </if-empty>
>                 <calculate field="glAccountTotalsExpenseMap.${glAccount.glAccountId}">
>                    <calcop field="glAccountTotalsExpenseMap.${glAccount.glAccountId}"
> operator="add"><calcop field="amount"
> operator="get"/></calcop>
>                 </calculate>
> 
> 
> 
>      


      

Re: r755534 breaks balance sheet Income statement

Posted by Adrian Crum <ad...@hlmksw.com>.
Did you update to the latest revision? The util:toIdentifier(String) UEL 
function was just added to the framework on Sunday.

-Adrian

Rees Watkins wrote:
> Hi Adrian
> 
> glAccountTotalsProfitMap and glAccountTotalsExpenseMap are empty, but there are valid values been set into them.
> 
> I logged the following in the loop where entries are made into map
>             
> a            <log level="info" message="prepareIncomeStatement mapKey ${util:toIdentifier(glAccount.glAccountId)}"/>
> b            <log level="info" message="prepareIncomeStatement mapKey ${glAccount.glAccountId}"/>
> c            <log level="info" message="prepareIncomeStatement mapKey ${mapKey}"/>
> 
> Only b gives a value, a and c are null.
> 
> I have spent some time working with your solution but can't seem to be able to make progress. I have not been able to find an example in the ofbiz code where mapping is used like this.
> Any ideas?
> 
> Thanks
> Rees
> 
> 
> 
> 
> 
> ________________________________
> From: Adrian Crum <ad...@yahoo.com>
> To: user@ofbiz.apache.org
> Sent: Sunday, 12 April, 2009 23:13:22
> Subject: Re: r755534 breaks balance sheet Income statement
> 
> 
> Rees,
> 
> I have a patch for you to try out:
> 
> https://issues.apache.org/jira/browse/OFBIZ-2292
> 
> Let me know if it fixes this problem. I can't test it myself because there is no demo data to work with.
> 
> -Adrian
> 
> 
>       

Re: r755534 breaks balance sheet Income statement

Posted by Rees Watkins <ga...@yahoo.co.uk>.
Hi Adrian

glAccountTotalsProfitMap and glAccountTotalsExpenseMap are empty, but there are valid values been set into them.

I logged the following in the loop where entries are made into map
            
a            <log level="info" message="prepareIncomeStatement mapKey ${util:toIdentifier(glAccount.glAccountId)}"/>
b            <log level="info" message="prepareIncomeStatement mapKey ${glAccount.glAccountId}"/>
c            <log level="info" message="prepareIncomeStatement mapKey ${mapKey}"/>

Only b gives a value, a and c are null.

I have spent some time working with your solution but can't seem to be able to make progress. I have not been able to find an example in the ofbiz code where mapping is used like this.
Any ideas?

Thanks
Rees





________________________________
From: Adrian Crum <ad...@yahoo.com>
To: user@ofbiz.apache.org
Sent: Sunday, 12 April, 2009 23:13:22
Subject: Re: r755534 breaks balance sheet Income statement


Rees,

I have a patch for you to try out:

https://issues.apache.org/jira/browse/OFBIZ-2292

Let me know if it fixes this problem. I can't test it myself because there is no demo data to work with.

-Adrian


      

Re: r755534 breaks balance sheet Income statement

Posted by Adrian Crum <ad...@yahoo.com>.
Rees,

I have a patch for you to try out:

https://issues.apache.org/jira/browse/OFBIZ-2292

Let me know if it fixes this problem. I can't test it myself because there is no demo data to work with.

-Adrian



--- On Thu, 3/26/09, Adrian Crum <ad...@hlmksw.com> wrote:

> From: Adrian Crum <ad...@hlmksw.com>
> Subject: Re: r755534 breaks balance sheet Income statement
> To: user@ofbiz.apache.org
> Date: Thursday, March 26, 2009, 8:28 AM
> I will look into this over the weekend.
> 
> -Adrian
> 
> Rees Watkins wrote:
> > Hi David
> > 
> > Thanks for your reply.
> > 
> > I'm
> > afraid I do not know about the new EL stuff. The code
> snippet below
> > shows how accounts figures are added to a map in
> > prepareIncomeStatement. glAccount.glAccountId is
> correct as are the
> > "amount" figures before adding to the map.
> When the entry is made into
> > the map glAccountId gets an underscore in the map
> entry. Please could
> > you maybe point out an example piece of code to
> illustrate your point
> > so I can look at fixing this.
> > 
> > Thanks
> > Rees
> > 
> > <simple-method
> method-name="prepareIncomeStatement"
> short-description="Prepare data for the Income
> Statement">
> > ***
> > ***
> > ***
> >                 <if-empty
> field="glAccountTotalsExpenseMap.${glAccount.glAccountId}">
> >                     <set
> field="glAccountTotalsExpenseMap.${glAccount.glAccountId}"
> value="0.0" type="BigDecimal"/>
> >                 </if-empty>
> >                 <calculate
> field="glAccountTotalsExpenseMap.${glAccount.glAccountId}">
> >                    <calcop
> field="glAccountTotalsExpenseMap.${glAccount.glAccountId}"
> > operator="add"><calcop
> field="amount"
> > operator="get"/></calcop>
> >                 </calculate>
> > 
> > 
> > 
> >


      

Re: r755534 breaks balance sheet Income statement

Posted by Adrian Crum <ad...@hlmksw.com>.
I will look into this over the weekend.

-Adrian

Rees Watkins wrote:
> Hi David
> 
> Thanks for your reply.
> 
> I'm
> afraid I do not know about the new EL stuff. The code snippet below
> shows how accounts figures are added to a map in
> prepareIncomeStatement. glAccount.glAccountId is correct as are the
> "amount" figures before adding to the map. When the entry is made into
> the map glAccountId gets an underscore in the map entry. Please could
> you maybe point out an example piece of code to illustrate your point
> so I can look at fixing this.
> 
> Thanks
> Rees
> 
> <simple-method method-name="prepareIncomeStatement" short-description="Prepare data for the Income Statement">
> ***
> ***
> ***
>                 <if-empty field="glAccountTotalsExpenseMap.${glAccount.glAccountId}">
>                     <set field="glAccountTotalsExpenseMap.${glAccount.glAccountId}" value="0.0" type="BigDecimal"/>
>                 </if-empty>
>                 <calculate field="glAccountTotalsExpenseMap.${glAccount.glAccountId}">
>                    
> <calcop field="glAccountTotalsExpenseMap.${glAccount.glAccountId}"
> operator="add"><calcop field="amount"
> operator="get"/></calcop>
>                 </calculate>
> 
> 
> 
>       

Re: r755534 breaks balance sheet Income statement

Posted by Rees Watkins <ga...@yahoo.co.uk>.
Hi David

Thanks for your reply.

I'm
afraid I do not know about the new EL stuff. The code snippet below
shows how accounts figures are added to a map in
prepareIncomeStatement. glAccount.glAccountId is correct as are the
"amount" figures before adding to the map. When the entry is made into
the map glAccountId gets an underscore in the map entry. Please could
you maybe point out an example piece of code to illustrate your point
so I can look at fixing this.

Thanks
Rees

<simple-method method-name="prepareIncomeStatement" short-description="Prepare data for the Income Statement">
***
***
***
                <if-empty field="glAccountTotalsExpenseMap.${glAccount.glAccountId}">
                    <set field="glAccountTotalsExpenseMap.${glAccount.glAccountId}" value="0.0" type="BigDecimal"/>
                </if-empty>
                <calculate field="glAccountTotalsExpenseMap.${glAccount.glAccountId}">
                   
<calcop field="glAccountTotalsExpenseMap.${glAccount.glAccountId}"
operator="add"><calcop field="amount"
operator="get"/></calcop>
                </calculate>



      

Re: r755534 breaks balance sheet Income statement

Posted by David E Jones <da...@hotwaxmedia.com>.
On Mar 25, 2009, at 3:08 AM, Rees Watkins wrote:

> Hi
>
> I have just merged with version 755534 from 718913.
>
> The income statement does not show the account names correctly. eg  
> "Retained income" name shows as [_336000] []
>
> The balance sheet now shows no data.
>
> I have tested this on demo site https://lamouline.myvnc.com:28443/accounting/control/prepareIncomeStatement
>
> Is anyone aware of these issues and how it can be resolved? I think  
> it may have something to do with the change from double to  
> BigDecimal or possibly the changes to minilang. I have not been able  
> to chase the exact cause down yet.

The underscore there does look very suspect, and it could be related  
to a bad fix for the issue with the new EL stuff and identifiers which  
start with a number.

For anyone looking into this, the approach of using the [""] syntax  
instead of the "." syntax combined with adding an underscore will fix  
the issue without having to introduce an underscore.

-David