X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=yarrg%2Fweb%2Froutetrade;h=68c727cdbd1aec41407534e2c1047e5b1d95b14b;hb=c9225ff45ee5e69855cb24cfb648d903dbba54a7;hp=1f8df2a5afdb6eafd5215a38f71cce74ad03dce5;hpb=f7c3c04f684b0e9cac4518beeece11853ef75109;p=ypp-sc-tools.main.git
diff --git a/yarrg/web/routetrade b/yarrg/web/routetrade
index 1f8df2a..68c727c 100644
--- a/yarrg/web/routetrade
+++ b/yarrg/web/routetrade
@@ -596,11 +596,20 @@ $addcols->({ Total => 0, DoReverse => 1, TotalSubflows => 1 }, qw(
+
+
% }
Data age summary
Relevant trades
+% } 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 ($optimise) { # ========== TRADING PLAN ==========
@@ -613,9 +622,16 @@ $addcols->({ Total => 0, DoReverse => 1, TotalSubflows => 1 }, qw(
%
-
+ >
+% my $tbody= sub {
+% if (!printable($m)) { return ''; }
+%# return " ";
+% my ($c)= qw(40 00)[$_[0]];
+% return "";
+% };
+%
% foreach my $i (0..$#islandids) {
-
+<% $tbody->(1) %>
% $iquery->execute($islandids[$i]);
% my ($islandname) = $iquery->fetchrow_array();
@@ -720,12 +736,12 @@ $addcols->({ Total => 0, DoReverse => 1, TotalSubflows => 1 }, qw(
(Data age: <% prettyprint_age($age) %> )
% } elsif (!defined $total) {
% $total= 0;
-
+<% $tbody->(0) %>
% }
% $total += $t->{Total};
% my $span= 0 + keys %{ $t->{Stalls} };
% my $td= "td rowspan=$span";
-
+% tr_datarow($m,$dline);
<<% $td %>><% $collectdeliver %>
<<% $td %>><% $t->{'commodname'} |h %>
%
@@ -741,7 +757,7 @@ $addcols->({ Total => 0, DoReverse => 1, TotalSubflows => 1 }, qw(
<<% $td %> align=right><% $t->{Total} |h %> total
%
% foreach my $stallix (1..$#stalls) {
-
+% tr_datarow($m,$dline);
% $pstall->($stallix);
% }
%
@@ -773,7 +789,7 @@ $addcols->({ Total => 0, DoReverse => 1, TotalSubflows => 1 }, qw(
$show_total_now->($totals);
}
%perl>
-
+<% $tbody->(1) %>
Total distance: <% $total_dist %> leagues.
Overall net cash flow
<%
@@ -831,14 +847,6 @@ END
<&| query_age:agestable, now => $now, fetchrow => $fetchrow &>
Islands shown in reverse order of visits.
&>
-% } 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)) {