Initial commit of foodsoft 2
This commit is contained in:
commit
5b9a7e05df
657 changed files with 70444 additions and 0 deletions
10
app/views/financial_transactions/_form.rhtml
Normal file
10
app/views/financial_transactions/_form.rhtml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<%= error_messages_for 'financial_transaction' %>
|
||||
|
||||
<div class="edit_form" style="width:30em">
|
||||
<p><b><%=h @group.name %></b>
|
||||
<p><label for="financial_transaction_amount">Betrag</label>
|
||||
<%= text_field 'financial_transaction', 'amount', :size => '10' %> Euro</p>
|
||||
|
||||
<p><label for="financial_transaction_note">Note</label><br/>
|
||||
<%= text_area 'financial_transaction', 'note', :cols => "40", :rows => "5" %></p>
|
||||
</div>
|
||||
41
app/views/financial_transactions/_list.rhtml
Normal file
41
app/views/financial_transactions/_list.rhtml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<% if @total == 0 %>
|
||||
|
||||
<p>Keine gefunden</p>
|
||||
|
||||
<% else %>
|
||||
|
||||
<p>Anzahl gefundener Transaktionen: <b><%= @total %></b></p>
|
||||
|
||||
<p>
|
||||
<%= pagination_links_remote @financial_transactions, @per_page, {:sort => params[:sort], :query => params['query']}%>
|
||||
</p>
|
||||
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td <%= sort_td_class_helper "date" %>>
|
||||
<%= sort_link_helper "Datum", "date" %>
|
||||
</td>
|
||||
<td>Wer</td>
|
||||
<td <%= sort_td_class_helper "note" %>>
|
||||
<%= sort_link_helper "Notiz", "note" %>
|
||||
</td>
|
||||
<td <%= sort_td_class_helper "amount" %>>
|
||||
<%= sort_link_helper "Betrag", "amount" %>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @financial_transactions.each do |t| %>
|
||||
<tr class="<%= cycle("even","odd") %>">
|
||||
<td><%= format_time(t.created_on) %></td>
|
||||
<td><%=h t.user.nil? ? '??' : t.user.nick %></td>
|
||||
<td><%=h t.note %></td>
|
||||
<td style="color:<%= t.amount < 0 ? 'red' : 'black' %>; width:5em" class="currency"><%= number_to_currency(t.amount) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<% end %>
|
||||
24
app/views/financial_transactions/list.rhtml
Normal file
24
app/views/financial_transactions/list.rhtml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<h1>Kontoauszug für <%= @group.name %></h1>
|
||||
<p>
|
||||
<b>Kontostand: <%= number_to_currency(@group.account_balance) -%></b>
|
||||
<span style="color:grey">(zuletzt aktualisiert vor <%= distance_of_time_in_words(Time.now, @group.account_updated) -%>)</span>
|
||||
</p>
|
||||
<div class="left_column" style="width:100%">
|
||||
<div class="box_title"><h2>Überweisungen</h2></div>
|
||||
<div class="column_content">
|
||||
<form name="sform" action="" style="display:inline;">
|
||||
<label for="financial_transaction_note">in Notizen suchen: </label>
|
||||
<%= text_field_tag("query", params['query'], :size => 10 ) %>
|
||||
</form>
|
||||
<%= observe_field 'query', :frequency => 2,
|
||||
:before => "Element.show('loader')",
|
||||
:success => "Element.hide('loader')",
|
||||
:url => {:action => 'listTransactions'},
|
||||
:with => 'query' %>
|
||||
<div id="table">
|
||||
<%= render :partial => "/financial_transactions/list" %>
|
||||
</div>
|
||||
<p><%= link_to 'Neue Transaktion', :action => 'newTransaction', :id => @group %></p>
|
||||
</div>
|
||||
</div>
|
||||
<%= link_to 'Bestellgruppen', :controller => 'finance', :action => "listOrdergroups" %>
|
||||
9
app/views/financial_transactions/new.rhtml
Normal file
9
app/views/financial_transactions/new.rhtml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<h1>Neue Transaktion</h1>
|
||||
|
||||
<% form_tag(:action => 'createTransaction', :id => @group) do -%>
|
||||
<%= render :partial => 'financial_transactions/form' %>
|
||||
<%= submit_tag 'Speichern' %>
|
||||
<%= hidden_field 'financial_transaction', 'order_group_id' %>
|
||||
<% end -%>
|
||||
<br />
|
||||
<%= link_to 'Zurück', :controller => 'finance' %>
|
||||
Loading…
Add table
Add a link
Reference in a new issue