foodsoft/app/views/home/ordergroup.html.haml
Patrick Gansterer 72b5a5ca82 Add option to show account balance instead of available funds
Some foodcoops do not use the accounting feature of the foodsoft, which
results in wrong calculation of the available credit. To avoid
confusions show the current account balance instead.
2017-10-28 20:16:25 +02:00

28 lines
1.2 KiB
Text

- title t('.title'), false
.row-fluid
.span4
%h2= @ordergroup.name
.well
- unless @ordergroup.description.blank?
%p= @ordergroup.description
%p
%b= heading_helper(Ordergroup, :account_balance) + ':'
= number_to_currency(@ordergroup.account_balance)
- unless FoodsoftConfig[:charge_members_manually]
%p
%b= heading_helper(Ordergroup, :available_funds) + ':'
= number_to_currency(@ordergroup.get_available_funds())
%p
%b= heading_helper(Ordergroup, :user_tokens) + ':'
= @ordergroup.memberships.map{|m| show_user m.user}.join(', ')
- unless FoodsoftConfig[:disable_invite]
= link_to t('.invite'), new_invite_path(:id => @ordergroup), :remote => true, class: 'btn btn-primary'
.span8
%h2= t('.account_summary')
.well.well-small
= form_tag my_ordergroup_path, :method => :get, :remote => true,
'data-submit-onchange' => true, class: 'form-search' do
= text_field_tag :query, params[:query], class: 'input-medium search-query',
placeholder: t('.search')
#transactions= render "finance/financial_transactions/transactions", with_csv: false