X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=yarrg%2Fweb%2Fquery_route;h=cd40e6cb8928a38ab3bb44fba4bc293cd44a5744;hb=ac1cf45e4672ac30f232cee92e60eb1a2d17a5c5;hp=53167aca883f43943d06b3acdd543dabe3ad7ac7;hpb=64f37d1c80bfd082dab4a11db206515890af6f44;p=ypp-sc-tools.db-live.git diff --git a/yarrg/web/query_route b/yarrg/web/query_route index 53167ac..cd40e6c 100644 --- a/yarrg/web/query_route +++ b/yarrg/web/query_route @@ -41,8 +41,10 @@ $routestring => ''; $capacitystring => ''; $lossperleague => ''; $capitalstring => ''; +$minprofitstring => ''; $someresults $emsgokorprint +$allargs <%perl> @@ -50,9 +52,6 @@ my $emsg; my @warningfs; my @archipelagoes; my @islandids; -my ($max_volume, $max_mass); -my $lossperleaguepct; -my $capital; my $qa= \%ARGS; @@ -67,8 +66,6 @@ my $goupdate= sub { $be_post ? 'Update' : 'Go' }; -

Specify route

- % # Sadly we need to do this rather hacky thing to make it be a POST % # form if the user has already selected some thing(s) % if (!$qa->{Dropdowns}) { @@ -80,6 +77,10 @@ my $goupdate= sub { $be_post ? 'Update' : 'Go' }; % } (0..$qa->{Dropdowns}-1)); % } +
+ +

Specify route

+ % $prselector->('ShowStalls'); <& enter_route, qa => $qa, dbh => $dbh, emsg_r => \$emsg, @@ -93,19 +94,22 @@ my $goupdate= sub { $be_post ? 'Update' : 'Go' }; % my $routeparams= { EmsgRef => \$emsg }; % if (!$qa->{Dropdowns}) { -Advanced options - you may leave these blank: +

-<& enter_advrouteopts, qa=>$qa, dbh=>$dbh, routeparams=>$routeparams &> +<& enter_advrouteopts, qa=>$qa, dbh=>$dbh, + minprofit_needs_apply => $be_post, + routeparams=>$routeparams &> % } #---------- end of dropdowns, now common middle of page code ---------- - % my $ours= sub { $_[0] =~ -% m/^island|^archipelago|^routestring|^capacitystring|^lossperleague|^capitalstring|^[RT]/; +% m/^island|^archipelago|^routestring|^capacitystring|^lossperleague|^capitalstring|^minprofitstring|^[RT]/; % }; <& "lookup:formhidden", ours => $ours &> +

+
<%perl> #========== results ========== @@ -119,13 +123,15 @@ foreach my $warningf (@warningfs) { % if (@islandids) { -% $someresults->('Relevant trades'); +% $someresults->(); <& routetrade, dbh => $dbh, islandids => \@islandids, archipelagoes => \@archipelagoes, - qa => $qa, - routeparams => $routeparams + qa => $qa, quri => $quri, + routeparams => $routeparams, + reset_suppressions => !!$allargs->{'apply_minprofit'} &> % } +