-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeError in Debit_invoices#new #8
Comments
This is because of some hardcoded accounts for debit/credit invoices. There actually need to be some accounts with numbers '1100', '3200', ''2000", and '4000' to get invoices working correctly. These values are hardcoded in the DebitInvoice an CreditInvoice models. But it should actually be a configuration in the Tenant. To get it working fast, you might try to load the seed data for Switzerland. Start the console and run Cheers |
Thank I was doubting that but I was not sure. Thanks a million. I also signed-up for an account on the issue tracker. |
So any plans to fix this. Or I should just clone the project and try to fix it myself |
Working on a fix. But contributions are very welcome:-) Probably best to file further issues on github, it's a hazzle to sign up on our redmine... Thanx for doing so, anyway:-) |
Thanks. On Mon, Jun 17, 2013 at 11:28 PM, Simon Hürlimann
Computer Science Student At Kabarak University. |
Sorry for the long delay. I took the time to implemented a more generic solution to select the relevant accounts used for invoices. You can now configure tags in the Account view/form. Those will be used as debit/credit accounts for new credit and debit invoices. It should now also not raise an error if you didn't specify them, but you would have to manually set the accounts for each line item in this case. You should now be able to create invoices. There's an open issue regarding printing/PDF download for debit invoices. It gives an error if you don't have a bank account with the relevant bank information configured. I'll fix that issue soonish, but it should be quite simple to add a check if such a BankAccount/Bank is configured and otherwise leave out this information. So feel free to fork and hack;-) |
…d-method-fiscal-years AG-735 NoMethodError: undefined method `fiscal_years' for nil:NilClass
RuntimeError in Debit_invoices#new
Showing /home/achachiez/Code/Ruby/Rails/bookyt/app/views/line_items/_list_form.html.haml where line #2 raised:
Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id
Extracted source (around line #2):
1: %h3= t('title.line_items')
2: %table#line_items.table.table-striped{'data-direct-account-id' => resource.direct_account.id, 'data-direct-account-factor' => resource.direct_account_factor}
3: %thead
4: = render 'line_items/list_header', :invoice => invoice
5: %tbody.sortable
Trace of template inclusion: app/views/debit_invoices/_form.html.haml, app/views/application/new.html.haml
Rails.root: /home/achachiez/Code/Ruby/Rails/bookyt
Application Trace | Framework Trace | Full Trace
app/views/line_items/_list_form.html.haml:2:in
_app_views_line_items__list_form_html_haml___421911651060381592_66039120' app/views/debit_invoices/_form.html.haml:19:in
block in _app_views_debit_invoices__form_html_haml__3178882032653932038_55522860'app/views/debit_invoices/_form.html.haml:1:in
_app_views_debit_invoices__form_html_haml__3178882032653932038_55522860' app/views/application/new.html.haml:5:in
_app_views_application_new_html_haml__2359191747295712144_55500660'app/controllers/debit_invoices_controller.rb:41:in
new' config/initializers/quiet_assets.rb:7:in
call_with_quiet_assets'Request
Parameters:
{"locale"=>"en"}
The text was updated successfully, but these errors were encountered: