Import current_orders plugin from foodcoop-adam
This commit is contained in:
parent
ae4979a3f0
commit
5907ff11bb
43 changed files with 1031 additions and 0 deletions
14
plugins/current_orders/app/helpers/current_orders_helper.rb
Normal file
14
plugins/current_orders/app/helpers/current_orders_helper.rb
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
module CurrentOrdersHelper
|
||||
|
||||
def to_pay_message(ordergroup)
|
||||
funds = ordergroup.get_available_funds
|
||||
if funds > 0
|
||||
content_tag :b, I18n.t('helpers.current_orders.pay_done'), style: 'color: green'
|
||||
elsif funds == 0
|
||||
I18n.t('helpers.current_orders.pay_none')
|
||||
else
|
||||
content_tag :b, I18n.t('helpers.current_orders.pay_amount', amount: number_to_currency(-ordergroup.get_available_funds))
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue