Import current_orders plugin from foodcoop-adam

This commit is contained in:
wvengen 2015-04-10 20:18:49 +02:00
parent ae4979a3f0
commit 5907ff11bb
43 changed files with 1031 additions and 0 deletions

View 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