diff --git a/app/Abstracts/View/Components/Transactions/Show.php b/app/Abstracts/View/Components/Transactions/Show.php
index 35d6e5d2c..b6569c2d9 100644
--- a/app/Abstracts/View/Components/Transactions/Show.php
+++ b/app/Abstracts/View/Components/Transactions/Show.php
@@ -276,6 +276,9 @@ abstract class Show extends Component
/** @var string */
public $routeDocumentShow;
+ /** @var string */
+ public $routeTransactionShow;
+
/** @var bool */
public $hideSchedule;
@@ -321,7 +324,7 @@ abstract class Show extends Component
bool $hideContactPhone = false, bool $hideContactEmail = false,
bool $hideRelated = false, bool $hideRelatedDocumentNumber = false, bool $hideRelatedContact = false, bool $hideRelatedDocumentDate = false, bool $hideRelatedDocumentAmount = false, bool $hideRelatedAmount = false,
string $textRelatedTransansaction = '', string $textRelatedDocumentNumber = '', string $textRelatedContact = '', string $textRelatedDocumentDate = '', string $textRelatedDocumentAmount = '', string $textRelatedAmount = '',
- string $routeDocumentShow = '', string $textButtonAddNew = '',
+ string $routeDocumentShow = '', string $routeTransactionShow = '', string $textButtonAddNew = '',
bool $hideSchedule = false, bool $hideChildren = false, bool $hideAttachment = false, $attachment = [],
array $connectTranslations = [], string $textRecurringType = '', bool $hideRecurringMessage = false
@@ -442,6 +445,7 @@ abstract class Show extends Component
$this->textRelatedAmount = $this->getTextRelatedAmount($type, $textRelatedAmount);
$this->routeDocumentShow = $this->routeDocumentShow($type, $routeDocumentShow);
+ $this->routeTransactionShow = $this->routeTransactionShow($type, $routeTransactionShow);
// Attachment data..
$this->attachment = '';
@@ -1076,6 +1080,24 @@ abstract class Show extends Component
return 'invoices.show';
}
+ protected function routeTransactionShow($type, $routeTransactionShow)
+ {
+ if (! empty($routeTransactionShow)) {
+ return $routeTransactionShow;
+ }
+
+ //example route parameter.
+ $parameter = 1;
+
+ $route = $this->getRouteFromConfig($type, 'show', $parameter);
+
+ if (! empty($route)) {
+ return $route;
+ }
+
+ return 'transactions.show';
+ }
+
protected function getTextRecurringType($type, $textRecurringType)
{
if (! empty($textRecurringType)) {
diff --git a/resources/views/components/transactions/show/content.blade.php b/resources/views/components/transactions/show/content.blade.php
index 11d337124..469c5aaa8 100644
--- a/resources/views/components/transactions/show/content.blade.php
+++ b/resources/views/components/transactions/show/content.blade.php
@@ -18,7 +18,7 @@
@php
$recurring_message = trans('recurring.message_parent', [
'type' => mb_strtolower(trans_choice($textRecurringType, 1)),
- 'link' => '' . $parent->document_number . ''
+ 'link' => '' . $parent->number . ''
]);
@endphp