add default tax percentage to app_config

This commit is contained in:
wvengen 2013-07-06 23:11:50 +02:00
parent 3da27734c7
commit 76645ebd12
2 changed files with 5 additions and 2 deletions

View file

@ -32,7 +32,7 @@ class ArticlesController < ApplicationController
end
def new
@article = @supplier.articles.build(:tax => 7.0)
@article = @supplier.articles.build(:tax => FoodsoftConfig[:tax_default])
render :layout => false
end
@ -160,7 +160,7 @@ class ArticlesController < ApplicationController
:unit_quantity => row[:unit_quantity],
:order_number => row[:number],
:deposit => row[:deposit],
:tax => row[:tax])
:tax => (row[:tax] or FoodsoftConfig[:tax_default]))
# stop parsing, when an article isn't valid
unless article.valid?
raise I18n.t('articles.controller.error_parse', :msg => article.errors.full_messages.join(", "), :line => (articles.index(row) + 2).to_s)

View file

@ -37,6 +37,9 @@ default: &defaults
# price markup in percent
price_markup: 2.0
# default vat percentage for new articles
tax_default: 7.0
# tolerance order option: If set to false, article tolerance values do not count
# for total article price as long as the order is not finished.
tolerance_is_costly: false