mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 20:52:56 +01:00
fix for dashboard links for quotes / invoices (#2409)
This commit is contained in:
parent
3d8742de1b
commit
b091c27d57
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -11,7 +11,7 @@
|
||||
<i class="fa fa-calendar" style="width:20px"></i>
|
||||
</a>
|
||||
@elseif ($option == 'dashboard')
|
||||
|
||||
|
||||
@elseif (Auth::user()->can('create', $option) || Auth::user()->can('create', substr($option, 0, -1)))
|
||||
<a type="button" class="btn btn-primary btn-sm pull-right"
|
||||
href="{{ url("/{$option}/create") }}">
|
||||
|
Loading…
Reference in New Issue
Block a user