chiark / gitweb /
Do arbitrage in the middle
[ypp-sc-tools.db-live.git] / yarrg / web / routetrade
index e4e583a83a190f1f33a77411c8533fdf50b505a8..eadc473d4b23dac47885d569b89a79d12a741ae5 100644 (file)
@@ -587,7 +587,8 @@ Sail to <% $islandname |h %>
                my $stallname= $f->{"${od}_stallname"};
                my $todo= \$flowlists{$od}{
                                $f->{'commodname'},
-                               (sprintf "%07d", $price),
+                               (sprintf "%07d", ($od eq 'dst' ?
+                                               9999999-$price : $price)),
                                $stallname
                        };
                $$todo= {
@@ -668,9 +669,9 @@ Sail to <% $islandname |h %>
 <%perl>
      };
 
-     $show_flows->('org',1,'Collect');  $show_total->('(Arbitrage) outlay');
-     $show_flows->('dst',1,'Deliver');
      $show_flows->('dst',0,'Deliver');  $show_total->('Proceeds');
+     $show_flows->('org',1,'Collect');  $show_total->('(Arbitrage) outlay');
+     $show_flows->('dst',1,'Deliver');  $show_total->('(Arbitrage) proceeds');
      $show_flows->('org',0,'Collect');  $show_total->('Outlay');
 
 }