diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index 6113481d4c..808728f1e5 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -817,7 +817,11 @@ class Invoice extends EntityModel implements BalanceAffecting */ public static function calcLink($invoice) { - return link_to('invoices/' . $invoice->public_id, $invoice->invoice_number); + if(isset($invoice->invoice_type_id)) + $linkPrefix = ($invoice->invoice_type_id == INVOICE_TYPE_QUOTE) ? 'quotes/' : 'invoices/'; + else + $linkPrefix = 'invoices/'; + return link_to($linkPrefix . $invoice->public_id, $invoice->invoice_number); } /** diff --git a/resources/views/partials/navigation_option.blade.php b/resources/views/partials/navigation_option.blade.php index 0f40339a27..fdf2d9735d 100644 --- a/resources/views/partials/navigation_option.blade.php +++ b/resources/views/partials/navigation_option.blade.php @@ -11,7 +11,7 @@ @elseif ($option == 'dashboard') - + @elseif (Auth::user()->can('create', $option) || Auth::user()->can('create', substr($option, 0, -1)))