Show specific error on invoice generation in admin #2802

This commit is contained in:
Martin Lensment 2015-07-31 16:30:38 +03:00
parent 0f652aedc1
commit 9f42784d33
6 changed files with 6 additions and 5 deletions

View file

@ -29,7 +29,7 @@ class Invoice < ActiveRecord::Base
return if number <= Setting.invoice_number_max.to_i
errors.add(:base, I18n.t('failed_to_generate_invoice'))
errors.add(:base, I18n.t('failed_to_generate_invoice_invoice_number_limit_reached'))
logger.error('INVOICE NUMBER LIMIT REACHED, COULD NOT GENERATE INVOICE')
false
end