route prefix fixed #1v0ueh7
This commit is contained in:
@@ -41,6 +41,9 @@ abstract class DocumentShow extends Base
|
||||
|
||||
public $date_format;
|
||||
|
||||
/** @var string */
|
||||
public $routePrefix;
|
||||
|
||||
/** @var string */
|
||||
public $textRecurringType;
|
||||
|
||||
@@ -404,6 +407,7 @@ abstract class DocumentShow extends Base
|
||||
$this->logo = $this->getLogo($logo);
|
||||
$this->backgroundColor = $backgroundColor;
|
||||
$this->signedUrl = $this->getSignedUrl($type, $signedUrl);
|
||||
$this->routePrefix = $this->getRoutePrefix($type);
|
||||
|
||||
$this->histories = ($histories) ? $histories : $document->histories;
|
||||
$this->transactions = ($transactions) ? $transactions : $document->transactions;
|
||||
@@ -1602,4 +1606,12 @@ abstract class DocumentShow extends Base
|
||||
// @todo what return value invoice or always false??
|
||||
return setting('invoice.hide_amount', $hideAmount);
|
||||
}
|
||||
|
||||
protected function getRoutePrefix($type) {
|
||||
if ($prefix = config('type.' . $type . '.route.prefix', false)){
|
||||
return 'invoices';
|
||||
}
|
||||
|
||||
return $prefix;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user