Scrap Factor

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

Scrap Factor

james_sg
Hi,

I have set the scrap factor for a product component in BOM, but this scrap factor is not reflected when doing the BOM simulation.

This problem occurs in both the trunk and 9.04 release.

Regards,
James
Reply | Threaded
Open this post in threaded view
|

Re: Scrap Factor

james_sg
I think the reason why the scrap factor is not used because the following code in BOMNode always returns to false.

if (percScrapFactor.compareTo(bdHundred.negate()) > 0 && percScrapFactor.compareTo(bdHundred.negate()) < 0) {


james_sg wrote
Hi,

I have set the scrap factor for a product component in BOM, but this scrap factor is not reflected when doing the BOM simulation.

This problem occurs in both the trunk and 9.04 release.

Regards,
James
Reply | Threaded
Open this post in threaded view
|

Re: Scrap Factor

BJ Freeman
In reply to this post by james_sg
you should still get a value from the try
 oneChildNode.setScrapFactor(percScrapFactor);
what was the
BigDecimal percScrapFactor = node.getBigDecimal("scrapFactor");


james_sg sent the following on 2/20/2010 7:42 AM:

> I think the reason why the scrap factor is not used because the following
> code in BOMNode always returns to false.
>
> if (percScrapFactor.compareTo(bdHundred.negate()) > 0 &&
> percScrapFactor.compareTo(bdHundred.negate()) < 0) {
>
>
>
> james_sg wrote:
>> Hi,
>>
>> I have set the scrap factor for a product component in BOM, but this scrap
>> factor is not reflected when doing the BOM simulation.
>>
>> This problem occurs in both the trunk and 9.04 release.
>>
>> Regards,
>> James
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Scrap Factor

james_sg
if (percScrapFactor.compareTo(bdHundred.negate()) > 0 && percScrapFactor.compareTo(bdHundred.negate
()) < 0)
When the above condition fails,
oneChildNode.setScrapFactor(percScrapFactor);
will set the scrap factor as 1, thus ignoring the original scrap factor value.

This is a bug.

BJ Freeman wrote
you should still get a value from the try
 oneChildNode.setScrapFactor(percScrapFactor);
what was the
BigDecimal percScrapFactor = node.getBigDecimal("scrapFactor");


james_sg sent the following on 2/20/2010 7:42 AM:
> I think the reason why the scrap factor is not used because the following
> code in BOMNode always returns to false.
>
> if (percScrapFactor.compareTo(bdHundred.negate()) > 0 &&
> percScrapFactor.compareTo(bdHundred.negate()) < 0) {
>
>
>
> james_sg wrote:
>> Hi,
>>
>> I have set the scrap factor for a product component in BOM, but this scrap
>> factor is not reflected when doing the BOM simulation.
>>
>> This problem occurs in both the trunk and 9.04 release.
>>
>> Regards,
>> James
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Scrap Factor

james_sg
It would be good if someone can commited the following bug fix

Change from

if (percScrapFactor.compareTo(bdHundred.negate()) > 0 && percScrapFactor.compareTo(bdHundred.negate()) < 0) {
to

if (percScrapFactor.compareTo(bdHundred.negate()) > 0 && percScrapFactor.compareTo(bdHundred) < 0) {
Regards,
James

james_sg wrote
if (percScrapFactor.compareTo(bdHundred.negate()) > 0 && percScrapFactor.compareTo(bdHundred.negate
()) < 0)
When the above condition fails,
oneChildNode.setScrapFactor(percScrapFactor);
will set the scrap factor as 1, thus ignoring the original scrap factor value.

This is a bug.
Reply | Threaded
Open this post in threaded view
|

Re: Scrap Factor

Jacopo Cappellato-4
Thanks for the report and proposed fix James, I am going to review this and fix it.

Regards,

Jacopo

On Feb 22, 2010, at 5:27 PM, james_sg wrote:

>
> It would be good if someone can commited the following bug fix
>
> Change from
>
>
>
>> if (percScrapFactor.compareTo(bdHundred.negate()) > 0 &&
>> percScrapFactor.compareTo(bdHundred.negate()) < 0) {
>>
>
> to
>
>
>
>> if (percScrapFactor.compareTo(bdHundred.negate()) > 0 &&
>> percScrapFactor.compareTo(bdHundred) < 0) {
>>
>
> Regards,
> James
>
>
> james_sg wrote:
>>
>>
>>
>>> if (percScrapFactor.compareTo(bdHundred.negate()) > 0 &&
>>> percScrapFactor.compareTo(bdHundred.negate
>>> ()) < 0)
>>>
>> When the above condition fails,
>>
>>
>>> oneChildNode.setScrapFactor(percScrapFactor);
>>>
>> will set the scrap factor as 1, thus ignoring the original scrap factor
>> value.
>>
>> This is a bug.
>>
>>
>
> --
> View this message in context: http://n4.nabble.com/Scrap-Factor-tp1562477p1564712.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: Scrap Factor

james_sg
Thanks Jacopo. Much Appreciated.

Jacopo Cappellato-4 wrote
Thanks for the report and proposed fix James, I am going to review this and fix it.

Regards,

Jacopo
Reply | Threaded
Open this post in threaded view
|

Re: Scrap Factor

Jacopo Cappellato-4
Thanks James,

this has been fixed in rev. 914991

Jacopo

On Feb 22, 2010, at 5:48 PM, james_sg wrote:

>
> Thanks Jacopo. Much Appreciated.
>
>
> Jacopo Cappellato-4 wrote:
>>
>> Thanks for the report and proposed fix James, I am going to review this
>> and fix it.
>>
>> Regards,
>>
>> Jacopo
>>
>>
>
> --
> View this message in context: http://n4.nabble.com/Scrap-Factor-tp1562477p1564757.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.