chiark / gitweb /
Permit entry of loss per league
[ypp-sc-tools.main.git] / yarrg / web / routetrade
index 482c13a3e9969e98e51afab2e8a8878be03bfeb3..9a6824e97ced58bb08b3e84b11e43f975fe8505f 100644 (file)
@@ -38,11 +38,24 @@ $dbh
 @islandids
 @archipelagoes
 $qa
+$max_mass
+$max_volume
+$lossperleaguepct
 </%args>
 <&| script &>
   da_pageload= Date.now();
 </&script>
 
+% if (defined $max_mass || defined $max_volume) {
+<strong>WARNING - VESSEL CAPACITY LIMIT NOT YET IMPLEMENTED</strong>
+<p>
+% }
+% if (defined $lossperleaguepct) {
+<strong>WARNING - DEFINED LOSS PER LEAGUE NOT YET IMPLEMENTED</strong>
+<% $lossperleaguepct |h %>
+<p>
+% }
+
 <%perl>
 
 my $now= time;
@@ -597,11 +610,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>
 %      }
@@ -643,7 +656,7 @@ $addcols->({ Total => 0, DoReverse => 1 }, qw(
      }
 
      my $total;
-     my $dline= 1;
+     my $dline= 0;
      my $show_flows= sub {
        my ($od,$arbitrage,$collectdeliver) = @_;
 </%perl>
@@ -699,7 +712,7 @@ $addcols->({ Total => 0, DoReverse => 1 }, qw(
 %              $total_total += $sign * $total;
 %      }
 %      $total= undef;
-%      $dline= 1;
+%      $dline= 0;
 <%perl>
      };