chiark / gitweb /
Permit entry of loss per league
[ypp-sc-tools.db-live.git] / yarrg / web / query_route
index 759c9c547cbd92f01f39a6e9bda8e900a651d6d5..a65ef1c5723d9360e4566152d294ac0fd1350112 100644 (file)
@@ -39,6 +39,7 @@ $dbh
 $prselector
 $routestring => '';
 $capacitystring => '';
+$lossperleague => '';
 $someresults
 $emsgokorprint
 </%args>
@@ -49,6 +50,7 @@ my @archipelagoes;
 my @islandids;
 my %islandid2;
 my ($max_volume, $max_mass);
+my $lossperleaguepct;
 
 my $qa= \%ARGS;
 
@@ -86,6 +88,10 @@ Enter route (islands, or archipelagoes, separated by |s or commas;
  size=80
 </&>
 
+<table>
+<tr>
+<td>
+
 Vessel capacity:
 <&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'cs',
     thingstring => 'capacitystring', emsgstore => \$emsg,
@@ -95,6 +101,21 @@ Vessel capacity:
  &>
 </&>
 
+<td>
+&nbsp;
+&nbsp;
+
+<td>
+Estimated loss per league:
+
+<&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'll',
+    thingstring => 'lossperleague', emsgstore => \$emsg,
+    perresult => sub { ($lossperleaguepct)= @_; }
+ &>
+</&>
+
+</table>
+
 % } else { #---------- dropdowns, user selects from menus ----------
 
 % $startform->(grep {
@@ -193,7 +214,7 @@ function ms_Setarch(dd) {
 
 <input type=submit name=submit value="<% $goupdate->() %>">
 % my $ours= sub { $_[0] =~
-%      m/^island|^archipelago|^routestring|^capacitystring|^[RT]/;
+%  m/^island|^archipelago|^routestring|^capacitystring|^lossperleague|^[RT]/;
 % };
 <& "lookup:formhidden", ours => $ours &>
 
@@ -240,7 +261,8 @@ for my $dd (0..$qa->{Dropdowns}-1) {
    archipelagoes => \@archipelagoes,
    qa => $qa,
    max_mass => $max_mass,
-   max_volume => $max_volume
+   max_volume => $max_volume,
+   lossperleaguepct => $lossperleaguepct
  &>
 </form>
 % }