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

Re: [ic] ups_cache table IC 5.4 [solved?]


On 01/24/2006 02:16 PM, Steve Graham wrote:


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


How about this one: (Talking to self?)

Suggested change to QueryUPS.pm

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

+ my $tmp_weight;

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

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

Just use POSIX::ceil:

$weight = POSIX::ceil($weight);

Peter
_______________________________________________
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.