Skip to content

Commit

Permalink
Using appropriate test on file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aquaj committed Mar 27, 2017
1 parent 216c596 commit 1f85135
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/financial_year.rb
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def sum_entry_items(expression, options = {})
def get_mandatory_line_calculation(document = :profit_and_loss_statement, line = nil)
ac = Account.accounting_system
source = Rails.root.join('config', 'accoutancy_mandatory_documents.yml')
data = YAML.load_file(source).deep_symbolize_keys.stringify_keys if source
data = YAML.load_file(source).deep_symbolize_keys.stringify_keys if source.file?
if data && ac && document && line
data[ac.to_s][document][line] if data[ac.to_s] && data[ac.to_s][document]
end
Expand Down

0 comments on commit 1f85135

Please sign in to comment.