1
0
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:
David Bomba 2018-10-05 00:45:21 +10:00 committed by GitHub
parent 3d8742de1b
commit b091c27d57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -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);
}
/**