chiark / gitweb /
Plumb max mass/vol through to routetrade
[ypp-sc-tools.main.git] / yarrg / web / routetrade
index cb7550e5e127f1a8e7a1623d8861b80144507d2b..7e1a06e6b90fd5cd872bb5ca78048667a3018a6e 100644 (file)
@@ -38,11 +38,18 @@ $dbh
 @islandids
 @archipelagoes
 $qa
+$max_mass
+$max_volume
 </%args>
 <&| script &>
   da_pageload= Date.now();
 </&script>
 
+% if (defined $max_mass || defined $max_volume) {
+<strong>WARNING - VESSEL CAPACITY LIMIT NOT YET IMPLEMENTED</strong>
+<p>
+% }
+
 <%perl>
 
 my $now= time;
@@ -597,11 +604,11 @@ $addcols->({ Total => 0, DoReverse => 1 }, qw(
 <tr><td colspan=3>
 %      $iquery->execute($islandids[$i]);
 %      my ($islandname) = $iquery->fetchrow_array();
-%      my $this_dist= $distance->($islandids[$i-1],$islandids[$i]);
-%      $total_dist += $this_dist;
 %      if (!$i) {
 <strong>Start at <% $islandname |h %></strong>
 %      } else {
+%              my $this_dist= $distance->($islandids[$i-1],$islandids[$i]);
+%              $total_dist += $this_dist;
 <strong>Sail to <% $islandname |h %></strong>
 - <% $this_dist |h %> leagues </td>
 %      }