X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=yarrg%2Fweb%2Froutetrade;h=61484391130a9341b3b90d099c4b2889f27d0619;hb=ce49620ef8a4e24daa206185138919bb58d35d37;hp=53e96365963f25c71374db8a815b716afe08edd1;hpb=be8d173dddf8da50643c433895d4b9e2c5a27102;p=ypp-sc-tools.web-test.git
diff --git a/yarrg/web/routetrade b/yarrg/web/routetrade
index 53e9636..6148439 100644
--- a/yarrg/web/routetrade
+++ b/yarrg/web/routetrade
@@ -587,120 +587,16 @@ $addcols->({ Total => 0, DoReverse => 1, TotalSubflows => 1 }, qw(
% } # ========== OPTIMISATION ==========
-% my %ts_sortkeys;
-% {
-% my $cdspan= $qa->{ShowStalls} ? ' colspan=2' : '';
-% my $cdstall= $qa->{ShowStalls} ? '
Stall | ' : '';
-
-
-
-<% $qa->{ShowStalls} ? '' : '' %>
-
-
-
-
-
-
-% if ($optimise) {
-
-% }
-
-
- | >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
-% }
+Contents
+ |
-
-<&| tabsort, cols => \@cols, table => 'trades', rowclass => 'datarow',
- throw => 'trades_sort', tbrow => 'trades_total' &>
- ts_sortkeys= <% to_json_protecttags(\%ts_sortkeys) %>;
-&tabsort>
-
-
+ Relevant trades
+
% if ($optimise) { # ========== TRADING PLAN ==========
%
@@ -710,7 +606,8 @@ $addcols->({ Total => 0, DoReverse => 1, TotalSubflows => 1 }, qw(
% my $total_total= 0;
% my $total_dist= 0;
%
-Voyage trading plan
+
+
% foreach my $i (0..$#islandids) {
@@ -870,7 +767,7 @@ $addcols->({ Total => 0, DoReverse => 1, TotalSubflows => 1 }, qw(
}
$show_total_now->($totals);
}
-%perl>
+%perl>
Total distance: <% $total_dist %> leagues.
| Overall net cash flow
@@ -885,6 +782,122 @@ Expected average profit:
%
% } # ========== TRADING PLAN ==========
+% my %ts_sortkeys;
+% {
+% my $cdspan= $qa->{ShowStalls} ? ' colspan=2' : '';
+% my $cdstall= $qa->{ShowStalls} ? ' | Stall | ' : '';
+
+
+
+<&| tabsort, cols => \@cols, table => 'trades', rowclass => 'datarow',
+ throw => 'trades_sort', tbrow => 'trades_total' &>
+ ts_sortkeys= <% to_json_protecttags(\%ts_sortkeys) %>;
+&tabsort>
+
+
+
<%init>
use CommodsWeb;
use Commods;