[ic] shipping.asc not working right
kerry blalock
kerry at basicq.com
Tue Jun 25 17:05:44 UTC 2013
On 06/25/2013 11:55 AM, Paul Jordan wrote:
> [calcn]
> my $big=0;
> foreach my $item (@$Items) {
> if ($item->{width} >= 160) {
> # We have to use the largest shipping available, no
> need to check anymore
> return 2;
> } elsif ($item->{width} >= 108) {
> # We have to use base truck shipping
> $big = 1;
> }
> }
> return $big;
> [/calcn]
> EOC
> min 1
> max 1
> cost 85
>
> min 2
> max 2
> cost 170
>
> min 3
> max 3
> cost 200.00
After several tests with different combinations, this looks like it
solves this problem.
Not sure why it did not work with elseif, but time to go to the next
project.
Thanks for the help.
truckbig: Truck Shipping
criteria <<EOC
[calcn]
my $big=0;
foreach my $item (@$Items) {
if ($item->{width} >= 160) {
# We have to use largest shipping
return 2;
}
if ($item->{width} >= 108) {
# We have to use base truck shipping
$big = 1;
}
}
return $big;
[/calcn]
EOC
min 1
max 1
cost 85.00
min 2
max 2
cost 170.00
min 3
max 3
cost 200.00
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.icdevgroup.org/pipermail/interchange-users/attachments/20130625/12391763/attachment.html>
More information about the interchange-users
mailing list