mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04: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)
|
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>
|
<i class="fa fa-calendar" style="width:20px"></i>
|
||||||
</a>
|
</a>
|
||||||
@elseif ($option == 'dashboard')
|
@elseif ($option == 'dashboard')
|
||||||
|
|
||||||
@elseif (Auth::user()->can('create', $option) || Auth::user()->can('create', substr($option, 0, -1)))
|
@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"
|
<a type="button" class="btn btn-primary btn-sm pull-right"
|
||||||
href="{{ url("/{$option}/create") }}">
|
href="{{ url("/{$option}/create") }}">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user