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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user