accept changesfrom upstream and resolve merge conflict ~ automatic go invoices

This commit is contained in:
viehlieb 2022-02-03 12:15:21 +01:00
commit bb3e049630
27 changed files with 263 additions and 151 deletions

View file

@ -115,7 +115,7 @@ class Mailer < ActionMailer::Base
@user = user
@feedback = feedback
mail to: FoodsoftConfig[:notification][:error_recipients],
mail to: feedback_recipients,
from: user,
subject: I18n.t('mailer.feedback.subject')
end
@ -196,4 +196,9 @@ class Mailer < ActionMailer::Base
address.display_name = name
address.format
end
# use the (new) feedback_recipients option, but fallback to error_recipients for backwards compatibility
def feedback_recipients
FoodsoftConfig[:notification][:feedback_recipients] || FoodsoftConfig[:notification][:error_recipients]
end
end

View file

@ -62,6 +62,10 @@ class Article < ApplicationRecord
validates_presence_of :name, :unit, :price, :tax, :deposit, :unit_quantity, :supplier_id, :article_category
validates_length_of :name, :in => 4..60
validates_length_of :unit, :in => 1..15
validates_length_of :note, :maximum => 255
validates_length_of :origin, :maximum => 255
validates_length_of :manufacturer, :maximum => 255
validates_length_of :order_number, :maximum => 255
validates_numericality_of :price, :greater_than_or_equal_to => 0
validates_numericality_of :unit_quantity, :greater_than => 0
validates_numericality_of :deposit, :tax