[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ic] ups_cache table IC 5.4


At 03:33 PM 1/23/2006, you wrote:


Is there a setting for rounding the weights? This cache table is a great added feature by the way.


I'm not sure if this is the correct solution for the QueryUPS.pm module.

Add the following line with + seems to makes the correction in the table.

sub calculate {
        my ($mode, $weight, $row, $opt, $tagopt, $extra) = @_;

+ $weight = int($weight+.5);

        $opt->{service}         ||= $opt->{table};

Well, maybe this would work better:

sub calculate {
        my ($mode, $weight, $row, $opt, $tagopt, $extra) = @_;

+$weight = int($weight+.5);
+if ($weight < 1) {
 + $weight = 1;
+}

If there is a better solutions I would appreciate any insight.

Thanks,
Steve
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.