Fixed document title issue..

This commit is contained in:
Cüneyt Şentürk 2021-06-27 17:54:05 +03:00
parent e803b4a2f0
commit 3ba29262be
2 changed files with 14 additions and 14 deletions

View File

@ -1151,16 +1151,16 @@ abstract class DocumentShow extends Base
return $textDocumentTitle; return $textDocumentTitle;
} }
$translation = $this->getTextFromConfig($type, 'document_title', 'title');
if (!empty($translation)) {
return $translation;
}
if (!empty(setting($type . '.title'))) { if (!empty(setting($type . '.title'))) {
return setting($type . '.title'); return setting($type . '.title');
} }
$translation = $this->getTextFromConfig($type, 'document_title', Str::plural($type), 'trans_choice');
if (!empty($translation)) {
return trans_choice($translation, 1);
}
return setting('invoice.title'); return setting('invoice.title');
} }
@ -1170,17 +1170,17 @@ abstract class DocumentShow extends Base
return $textDocumentSubheading; return $textDocumentSubheading;
} }
$translation = $this->getTextFromConfig($type, 'document_subheading', 'subheading');
if (!empty($translation)) {
return $translation;
}
if (!empty(setting($type . '.subheading'))) { if (!empty(setting($type . '.subheading'))) {
return setting($type . '.subheading'); return setting($type . '.subheading');
} }
return setting('invoice.subheading'); $translation = $this->getTextFromConfig($type, 'document_subheading', 'subheading');
if (!empty($translation)) {
return trans($translation);
}
return false;
} }
protected function getTextTimelineCreateTitle($type, $textTimelineCreateTitle) protected function getTextTimelineCreateTitle($type, $textTimelineCreateTitle)

View File

@ -279,7 +279,7 @@ abstract class DocumentTemplate extends Base
return setting($type . '.title'); return setting($type . '.title');
} }
$translation = $this->getTextFromConfig($type, 'document_title', Str::plural($type)); $translation = $this->getTextFromConfig($type, 'document_title', Str::plural($type), 'trans_choice');
if (!empty($translation)) { if (!empty($translation)) {
return trans_choice($translation, 1); return trans_choice($translation, 1);