%
$: << 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 %>
<%= waste.year %>年
<%
yt = 0
waste.each_total do |name,total|
yt += total
%>
| <%= CGI::escapeHTML( name ) %> | <%= total.to_disp_str %><%= @currency %> |
<%
end
%>
| Total | <%= yt.to_disp_str %><%= @currency %> |
|
<%
waste.each_month( 3 ) do |month|
%>
<%= month %>月
<%
mt = 0
waste.each_total( month ) do |name,total|
mt += total
%>
| <%= CGI::escapeHTML( name ) %> | <%= total.to_disp_str %><%= @currency %> |
<%
end
%>
| Total | <%= mt.to_disp_str %><%= @currency %> |
|
<%
end
%>
<%
waste.each_diary( nil, 30 ) do |diary|
%>
<%= diary.note.make_link %>
<%
diary.each_item do |item|
%>
| <%= CGI::escapeHTML( item.name ) %> |
<%= item.price.to_disp_str %><%= @currency %> |
<%= item.note.make_link %> |
<%
end
%>
| Total | <%= diary.total.to_disp_str %><%= @currency %> | |
<%
end
%>