1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Minor fixes for setting defaults on entity (#3447)

This commit is contained in:
David Bomba 2020-03-07 09:51:47 +11:00 committed by GitHub
parent 4f9c596d3a
commit e095b8538f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -468,11 +468,11 @@ class Client extends BaseModel implements HasLocalePreference
public function setCompanyDefaults($data, $entity_name)
{
if(strlen($this->getSetting($entity_name.'_terms')) >=1)
if(strlen($data['terms']) == 0)
$data['terms'] = $this->getSetting($entity_name.'_terms');
if(strlen($this->getSetting($entity_name.'_footer')) >=1)
$data['footer'] =$this->getSetting($entity_name.'_footer');
if(strlen($data['footer']) == 0)
$data['footer'] = $this->getSetting($entity_name.'_footer');
if(strlen($this->public_notes) >=1)
$data['public_notes'] = $this->public_notes;