Listing Charge Sets <%= link_to '(Show All)', :controller => 'charge_sets', :action => 'list_all'%>

<%= link_to 'New Charge Period', :controller => 'charge_periods', :action => 'new' %> <% if @charge_periods.size > 0 %> <% for period in @charge_periods %>

<%= period.name %> ( <%= link_to 'PDF Report', :controller => 'charge_periods', :action => 'pdf', :id => period.id %> <%= link_to 'Excel Report', :controller => 'charge_periods', :action => 'excel', :id => period.id %> <%= link_to 'Edit', :controller => 'charge_periods', :action => 'edit', :id => period.id %> <%= link_to 'Destroy', { :controller => 'charge_periods', :action => 'destroy', :id => period.id }, :confirm => period.destroy_warning %> )

<%= link_to 'New Charge Set', :controller => 'charge_sets', :action => 'new' %>

<% charge_sets = ChargeSet.find(:all, :conditions => [ "charge_period_id = ?", period.id ], :order => "name ASC") %> <% for set in charge_sets %> <% totals = set.get_totals %> <% end %>
Charge Set Name Lab Group Budget / PO # Chips Chip Cost Labeling Cost Hyb Cost QC Cost Other Cost Total View Charges Add Charge Edit Set Info Destroy Set
<%= set.name %> <%= LabGroup.find(set.lab_group_id).name %> <%= set.budget %> <%= totals['chips'] %> <%= fmt_dollars(totals['chip_cost']) %> <%= fmt_dollars(totals['labeling_cost']) %> <%= fmt_dollars(totals['hybridization_cost']) %> <%= fmt_dollars(totals['qc_cost']) %> <%= fmt_dollars(totals['other_cost']) %> <%= fmt_dollars(totals['total_cost']) %> <%= link_to 'View Charges', :controller => 'charges', :action => 'list_within_charge_set', :charge_set_id => set.id %> <%= link_to 'Add Charge', :controller => 'charges', :action => 'new', :charge_set_id => set.id %> <%= link_to 'Edit Set Info', :controller => 'charge_sets', :action => 'edit', :id => set.id %> <%= link_to 'Destroy Set', { :controller => 'charge_sets', :action => 'destroy', :id => set.id }, :confirm => set.destroy_warning %>
<% end %> <% else %>

There are currently no charges.

<% end %>