X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=yarrg%2Fweb%2Froutetrade;h=1f8df2a5afdb6eafd5215a38f71cce74ad03dce5;hb=f7c3c04f684b0e9cac4518beeece11853ef75109;hp=53e96365963f25c71374db8a815b716afe08edd1;hpb=cb6af6f4bf6b6c3f7852912ebec58e773a724a5a;p=ypp-sc-tools.main.git diff --git a/yarrg/web/routetrade b/yarrg/web/routetrade index 53e9636..1f8df2a 100644 --- a/yarrg/web/routetrade +++ b/yarrg/web/routetrade @@ -40,9 +40,7 @@ $dbh $qa $routeparams %args> -<&| script &> - da_pageload= Date.now(); -&script> +<& query_age:pageload &> <%perl> @@ -587,121 +585,24 @@ $addcols->({ Total => 0, DoReverse => 1, TotalSubflows => 1 }, qw( % } # ========== OPTIMISATION ========== -% my %ts_sortkeys; -% { -% my $cdspan= $qa->{ShowStalls} ? ' colspan=2' : ''; -% my $cdstall= $qa->{ShowStalls} ? '
- | >Collect - | >Deliver - | - | Collect - | Deliver - | Profit - | Max - | - | Max -% if ($optimise) { - | Planned -% } - - | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
- | Island <% $cdstall %> - | Island <% $cdstall %> - | Commodity - | Price - | Qty - | Price - | Qty - | Margin - | Unit - | Qty - | Capital - | Profit - | Dist - | Mass - | Vol -% if ($optimise) { - | Qty - | Capital - | Profit
-% }
+% if (!printable($m)) {
+Contents+
|
Total distance: <% $total_dist %> leagues. | Overall net cash flow
@@ -885,6 +787,179 @@ Expected average profit:
%
% } # ========== TRADING PLAN ==========
+% if (!printable($m)) {
+Data age summary+<%perl> + my $sth_i= $dbh->prepare(<+&> +% } else { +% my @tl= gmtime $now or die $!; + +Generated by YARRG at <% + sprintf "%04d-%02d-%02d %02d:%02d:%02d UTC", + $tl[5]+1900, @tl[4,3,2,1,0] + |h %>. +%# +% } + +% if (!printable($m)) { +% my %ts_sortkeys; +% { +% my $cdspan= $qa->{ShowStalls} ? ' colspan=2' : ''; +% my $cdstall= $qa->{ShowStalls} ? ' Stall | ' : '';
+Relevant trades+
|