Skip to content

Commit

Permalink
Fixed document title issue..
Browse files Browse the repository at this point in the history
  • Loading branch information
cuneytsenturk committed Jun 27, 2021
1 parent e803b4a commit 3ba2926
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions app/Abstracts/View/Components/DocumentShow.php
Original file line number Diff line number Diff line change
Expand Up @@ -1151,16 +1151,16 @@ protected function getTextDocumentTitle($type, $textDocumentTitle)
return $textDocumentTitle;
}

$translation = $this->getTextFromConfig($type, 'document_title', 'title');

if (!empty($translation)) {
return $translation;
}

if (!empty(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');
}

Expand All @@ -1170,17 +1170,17 @@ protected function getTextDocumentSubheading($type, $textDocumentSubheading)
return $textDocumentSubheading;
}

if (!empty(setting($type . '.subheading'))) {
return setting($type . '.subheading');
}

$translation = $this->getTextFromConfig($type, 'document_subheading', 'subheading');

if (!empty($translation)) {
return $translation;
}

if (!empty(setting($type . '.subheading'))) {
return setting($type . '.subheading');
return trans($translation);
}

return setting('invoice.subheading');
return false;
}

protected function getTextTimelineCreateTitle($type, $textTimelineCreateTitle)
Expand Down
2 changes: 1 addition & 1 deletion app/Abstracts/View/Components/DocumentTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ protected function getTextDocumentTitle($type, $textDocumentTitle)
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)) {
return trans_choice($translation, 1);
Expand Down

0 comments on commit 3ba2926

Please sign in to comment.