X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=blobdiff_plain;f=yarrg%2Fweb%2Fenter_advrouteopts;h=66b012890ec9824f6dac9680ec4ab866e0c9c3a1;hp=1e037330197161c5ede0342057fc08f31b780c76;hb=ea3cffe854b1c540bc68cd2218fdb2be732197fa;hpb=64f37d1c80bfd082dab4a11db206515890af6f44 diff --git a/yarrg/web/enter_advrouteopts b/yarrg/web/enter_advrouteopts index 1e03733..66b0128 100644 --- a/yarrg/web/enter_advrouteopts +++ b/yarrg/web/enter_advrouteopts @@ -32,12 +32,15 @@ This Mason component generates entry fields for route planning advanced parameters (capacity limits, etc). - The results are returned in $routeparams: + Some useful parameters are in %$routeparams: ${ $routeparams->{EmsgRef} } + $routeparams->{SayRequiredCapacity} + The results are returned there: $routeparams->{LossPerLeaguePct} $routeparams->{MaxMass} $routeparams->{MaxVolume} $routeparams->{MaxCapital} + $routeparams->{MinProfit} @@ -45,34 +48,44 @@ $qa $dbh $routeparams +$minprofit_needs_apply => 0 +<%method advanced> +Advanced options - you may leave these blank: +

+ + +% if (!$routeparams->{SayRequiredCapacity}) { +<& SELF:advanced &> +% } +
Vessel or capacity: -<&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'cs', +<& qtextstring, qa => $qa, dbh => $dbh, prefix => 'cs', thingstring => 'capacitystring', emsgstore => $routeparams->{EmsgRef}, - helpref => 'capacity', + helpref => 'capacity', boxopts => 'size=30', onresults => sub { ($routeparams->{MaxMass}, $routeparams->{MaxVolume}) = @_; } &> - size=40 -     - -Expected losses: - -<&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'll', - thingstring => 'lossperleague', emsgstore => $routeparams->{EmsgRef}, - helpref => 'losses', - onresults => sub { ($routeparams->{LossPerLeaguePct})= @_; } +Minimum trade value: +<&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'mt', checkkind => 'poe', + thingstring => 'minprofitstring', emsgstore => $routeparams->{EmsgRef}, + helpref => 'minprofit', boxopts => 'size=9', + onresults => sub { + ($routeparams->{MinProfit}) = @_; + } &> - size=9 +% if ($minprofit_needs_apply) { + +% }
@@ -80,12 +93,25 @@ Expected losses: Available capital: -<&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'ac', +<& qtextstring, qa => $qa, dbh => $dbh, prefix => 'ac', checkkind => 'poe', thingstring => 'capitalstring', emsgstore => $routeparams->{EmsgRef}, - helpref => 'capital', + helpref => 'capital', boxopts => 'size=9', onresults => sub { ($routeparams->{MaxCapital})= @_; } &> - size=9 - + + +  +  + + +Expected losses: + +<& qtextstring, qa => $qa, dbh => $dbh, prefix => 'll', + thingstring => 'lossperleague', emsgstore => $routeparams->{EmsgRef}, + helpref => 'losses', boxopts => 'size=9', + onresults => sub { ($routeparams->{LossPerLeaguePct})= @_; } + &> + +<% $m->content %>