Fix group_order for stock order

This commit is contained in:
Patrick Gansterer 2017-10-29 20:44:05 +01:00
parent f77f2fcbfd
commit 9d588f70cc

View file

@ -22,7 +22,7 @@ class GroupOrder < ActiveRecord::Base
# Generate some data for the javascript methods in ordering view # Generate some data for the javascript methods in ordering view
def load_data def load_data
data = {} data = {}
data[:account_balance] = ordergroup.account_balance data[:account_balance] = ordergroup.nil? ? BigDecimal.new('+Infinity') : ordergroup.account_balance
data[:available_funds] = ordergroup.nil? ? BigDecimal.new('+Infinity') : ordergroup.get_available_funds(self) data[:available_funds] = ordergroup.nil? ? BigDecimal.new('+Infinity') : ordergroup.get_available_funds(self)
# load prices and other stuff.... # load prices and other stuff....