<% $: << File::dirname( ENV['PATH_TRANSLATED'] ) load "#{File::dirname( ENV['PATH_TRANSLATED'] )}/waste.conf" require 'waste.rb' waste = Waste::new print waste.header %> <%= @title_battle %>

<%= @title_battle %>

<% if waste.user? %>[自分の記録を参照する]<% end %> [新しい<%= @sanzai %>を記録する] [ ]


<% waste.each_month( 3 ) do |month| %> <% end %>
<% yt = 0 waste.each_total do |name,total| yt += total %> <% end %>
<%= waste.year %>年
<%= CGI::escapeHTML( name ) %><%= total.to_disp_str %><%= @currency %>
Total<%= yt.to_disp_str %><%= @currency %>
<% mt = 0 waste.each_total( month ) do |name,total| mt += total %> <% end %>
<%= month %>月
<%= CGI::escapeHTML( name ) %><%= total.to_disp_str %><%= @currency %>
Total<%= mt.to_disp_str %><%= @currency %>

<% waste.each_diary( nil, 30 ) do |diary| %>

<%= diary.date %> <%= CGI::escapeHTML( diary.name ) %> <% if waste.user == diary.name then %>[edit]<% end %>

<%= diary.note.make_link %>

<% diary.each_item do |item| %> <% end %>
<%= CGI::escapeHTML( item.name ) %> <%= item.price.to_disp_str %><%= @currency %> <%= item.note.make_link %>
Total<%= diary.total.to_disp_str %><%= @currency %>
<% end %>