X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=yarrg%2Fweb%2Froutetrade;h=68c727cdbd1aec41407534e2c1047e5b1d95b14b;hb=c9225ff45ee5e69855cb24cfb648d903dbba54a7;hp=c6ed408d80fe9d779e54de724856c6abf02ab673;hpb=fdf4e5538945f9d058f3ad54ddfe707b0977e1d4;p=ypp-sc-tools.main.git diff --git a/yarrg/web/routetrade b/yarrg/web/routetrade index c6ed408..68c727c 100644 --- a/yarrg/web/routetrade +++ b/yarrg/web/routetrade @@ -585,17 +585,32 @@ $addcols->({ Total => 0, DoReverse => 1, TotalSubflows => 1 }, qw( % } # ========== OPTIMISATION ========== +% if (!printable($m)) {
+Generated by YARRG at <% + sprintf "%04d-%02d-%02d %02d:%02d:%02d UTC", + $tl[5]+1900, @tl[4,3,2,1,0] + |h %>. +% } % if ($optimise) { # ========== TRADING PLAN ========== % @@ -607,9 +622,16 @@ $addcols->({ Total => 0, DoReverse => 1, TotalSubflows => 1 }, qw( %
"; +% my ($c)= qw(40 00)[$_[0]]; +% return " | |||||||||||||
"; +% }; +% % foreach my $i (0..$#islandids) { - | |||||||||||||
% $iquery->execute($islandids[$i]); % my ($islandname) = $iquery->fetchrow_array(); @@ -714,12 +736,12 @@ $addcols->({ Total => 0, DoReverse => 1, TotalSubflows => 1 }, qw( (Data age: <% prettyprint_age($age) %>) % } elsif (!defined $total) { % $total= 0; - | |||||||||||||
Total distance: <% $total_dist %> leagues. | Overall net cash flow | <%
@@ -781,7 +803,7 @@ Expected average profit:
%
% } # ========== TRADING PLAN ==========
-% {
+% if (!printable($m)) {
Data age summary<%perl> my $sth_i= $dbh->prepare(<Stall | ' : '';
Relevant trades@@ -882,14 +905,14 @@ Islands shown in reverse order of visits.Capital
| Profit
% }
-% }
+% }
|
-% }
+% }
-% foreach my $flowix (0..$#flows) {
+% foreach my $flowix (0..$#flows) {
% my $flow= $flows[$flowix];
% my $rowid= "id_row_$flow->{UidShort}";
| %>><% exists $spec->{String} ? $spec->{String} : $v |h %> % $ci += $spec->{Span}; % } -% } +% }
| Total
-% foreach my $ci (3..$#cols) {
+% foreach my $ci (3..$#cols) {
% my $col= $cols[$ci];
|
% if (defined $col->{Total}) {
<% $col->{Total} |h %>
% }
-% }
+% }
| |