[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 1.4 ; db TABLEs invoice,orderitems ; drop field precision ?
- Subject: Re: 1.4 ; db TABLEs invoice,orderitems ; drop field precision ?
- From: herman vierendeels <..hidden..>
- Date: Tue, 7 Feb 2012 11:00:49 +0100
Hello Chris,
One last general question.
When a db-field can easily be calculated from another db-field, why
should we store it ?
Like in OE.pm:
decimalplaces is re-calculated from fetched sellprice. (not set from
also fetched precision)
($decimalplaces) = ( $ref->{sellprice} =~ /\.(\d+)/ );
Best Wishes,
Herman
2012/2/3 Chris Travers <..hidden..>:
>
>
> On Fri, Feb 3, 2012 at 3:36 AM, Chris Travers <..hidden..>
> wrote:
>>
>>
>>
>> On Fri, Feb 3, 2012 at 3:26 AM, herman vierendeels
>> <..hidden..> wrote:
>>>
>>> yes, i agree, the field precision is fetched from db; but , as far as
>>> i can see, never used!
>>>
>> The old code is hard to follow but from there it goes onto the $ref
>> hashrefs that get pushed onto @{$form->{form_details}} and from there these
>> get expanded to $form->{...._$i} (i.e. $form->{"precision_$i"}.
>>
> BTW, this is an important reason to replace the old code.
>
> Best Wishes,
> Chris Travers
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> Ledger-smb-devel mailing list
> ..hidden..
> https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
>