@@ -143,11 +124,7 @@ foreach my $bs (split /_/, $ARGS{BuySell}) {
| +/-10%
| Any
|
-% $islands->execute($cmid);
-% my $island;
-% my %ts_sortkeys;
-% my $rowix= 0;
-% while ($island= $islands->fetchrow_hashref) {
+% }
% my $islandid= $island->{'islandid'};
% $offers->execute($cmid, $islandid);
% my ($offer, $bestprice, $marginal, @beststalls);
@@ -193,17 +170,18 @@ foreach my $bs (split /_/, $ARGS{BuySell}) {
<% $s->[0]= $island->{'archipelago'} |h %>
| <% $s->[1]= $island->{'islandname'} |h %>
| <% $stallname |h %>
- | <% $s->[3]= (length $bestqty ? $bestprice : '-') %>
- | <% $s->[4]= $median %>
- | <% $s->[5]= $bestqty %>
- | <% $s->[6]= $approxqty %>
- | <% $s->[7]= $cqty %>
+ | <% $s->[3]= (length $bestqty ? $bestprice : '-') %>
+ | <% $s->[4]= $median %>
+ | <% $s->[5]= $bestqty %>
+ | <% $s->[6]= $approxqty %>
+ | <% $s->[7]= $cqty %>
% for my $cix (0..$#$s) {
% $ts_sortkeys{$cix}{$rowid}= $s->[$cix];
% }
% $rowix++;
% }
+% if ($rowix) {
|
<&| tabsort, table => "${bs}_table", sortkeys => "${bs}_sortkeys",
@@ -222,6 +200,9 @@ foreach my $bs (split /_/, $ARGS{BuySell}) {
return price;
}
&tabsort>
+% } else {
+No offers.
+% }
<%perl>
}