Question about "convertUom" service

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Question about "convertUom" service

Jacopo Cappellato-4
"convertUom" service, given a uomId (from) and a uomIdTo and an  
amount, tries to convert the amount from uomId to uomIdTo.
In order to do this it searches for the conversion factor by looking  
in the following entities:

1) UomConversion, if no record is found then
2) UomConversionDated

It seems to me that it would be better to reaserch the values in the  
following order:

1) UomConversionDated, if no record is found then
2) UomConversion

The dated version should be more specific, if none is found then the  
no-dated version is searched

What do you think?

Jacopo


smime.p7s (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Question about "convertUom" service

Adrian Crum
That would make more sense. It would be even better if we used only one
entity instead of two. Conversions that never change would have a null
through date.

-Adrian

Jacopo Cappellato wrote:

> "convertUom" service, given a uomId (from) and a uomIdTo and an amount,
> tries to convert the amount from uomId to uomIdTo.
> In order to do this it searches for the conversion factor by looking in
> the following entities:
>
> 1) UomConversion, if no record is found then
> 2) UomConversionDated
>
> It seems to me that it would be better to reaserch the values in the
> following order:
>
> 1) UomConversionDated, if no record is found then
> 2) UomConversion
>
> The dated version should be more specific, if none is found then the
> no-dated version is searched
>
> What do you think?
>
> Jacopo
>
Reply | Threaded
Open this post in threaded view
|

Re: Question about "convertUom" service

BJ Freeman
In reply to this post by Jacopo Cappellato-4
The only addition would be a note that a default was used if there were
dated but they did not match.

Jacopo Cappellato sent the following on 9/24/2008 9:11 AM:

> "convertUom" service, given a uomId (from) and a uomIdTo and an amount,
> tries to convert the amount from uomId to uomIdTo.
> In order to do this it searches for the conversion factor by looking in
> the following entities:
>
> 1) UomConversion, if no record is found then
> 2) UomConversionDated
>
> It seems to me that it would be better to reaserch the values in the
> following order:
>
> 1) UomConversionDated, if no record is found then
> 2) UomConversion
>
> The dated version should be more specific, if none is found then the
> no-dated version is searched
>
> What do you think?
>
> Jacopo
>

Reply | Threaded
Open this post in threaded view
|

Re: Question about "convertUom" service

Bilgin Ibryam
In reply to this post by Adrian Crum
On Wed, 2008-09-24 at 09:40 -0700, Adrian Crum wrote:
> That would make more sense. It would be even better if we used only one
> entity instead of two. Conversions that never change would have a null
> through date.
>
> -Adrian

+ 1

Bilgin

Reply | Threaded
Open this post in threaded view
|

Re: Question about "convertUom" service

David E Jones
In reply to this post by Jacopo Cappellato-4
+1


-David


On Sep 24, 2008, at 10:11, Jacopo Cappellato <[hidden email]
 > wrote:

> "convertUom" service, given a uomId (from) and a uomIdTo and an  
> amount, tries to convert the amount from uomId to uomIdTo.
> In order to do this it searches for the conversion factor by looking  
> in the following entities:
>
> 1) UomConversion, if no record is found then
> 2) UomConversionDated
>
> It seems to me that it would be better to reaserch the values in the  
> following order:
>
> 1) UomConversionDated, if no record is found then
> 2) UomConversion
>
> The dated version should be more specific, if none is found then the  
> no-dated version is searched
>
> What do you think?
>
> Jacopo
>