Fall back on contact email if billing email is absent

Affects e-invoice and invoice delivery form.

Fixes #1255
This commit is contained in:
Artur Beljajev 2019-07-04 17:27:09 +03:00 committed by Georg
parent 26fa15f76c
commit 6356ce0e9f
2 changed files with 17 additions and 0 deletions

View file

@ -176,6 +176,11 @@ class Registrar < ActiveRecord::Base
iban
end
def billing_email
return contact_email if self[:billing_email].blank?
self[:billing_email]
end
private
def set_defaults