add default tax percentage to app_config
This commit is contained in:
parent
3da27734c7
commit
76645ebd12
2 changed files with 5 additions and 2 deletions
|
@ -32,7 +32,7 @@ class ArticlesController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@article = @supplier.articles.build(:tax => 7.0)
|
@article = @supplier.articles.build(:tax => FoodsoftConfig[:tax_default])
|
||||||
render :layout => false
|
render :layout => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ class ArticlesController < ApplicationController
|
||||||
:unit_quantity => row[:unit_quantity],
|
:unit_quantity => row[:unit_quantity],
|
||||||
:order_number => row[:number],
|
:order_number => row[:number],
|
||||||
:deposit => row[:deposit],
|
:deposit => row[:deposit],
|
||||||
:tax => row[:tax])
|
:tax => (row[:tax] or FoodsoftConfig[:tax_default]))
|
||||||
# stop parsing, when an article isn't valid
|
# stop parsing, when an article isn't valid
|
||||||
unless article.valid?
|
unless article.valid?
|
||||||
raise I18n.t('articles.controller.error_parse', :msg => article.errors.full_messages.join(", "), :line => (articles.index(row) + 2).to_s)
|
raise I18n.t('articles.controller.error_parse', :msg => article.errors.full_messages.join(", "), :line => (articles.index(row) + 2).to_s)
|
||||||
|
|
|
@ -37,6 +37,9 @@ default: &defaults
|
||||||
# price markup in percent
|
# price markup in percent
|
||||||
price_markup: 2.0
|
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
|
# 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.
|
# for total article price as long as the order is not finished.
|
||||||
tolerance_is_costly: false
|
tolerance_is_costly: false
|
||||||
|
|
Loading…
Reference in a new issue