Fix 'View quote' link

This commit is contained in:
Hillel Coren 2017-08-29 18:38:25 +03:00
parent 5f6f3851d8
commit 9186047e6c

View File

@ -235,7 +235,7 @@ class InvoicePresenter extends EntityPresenter
$actions[] = ['url' => 'javascript:onConvertClick()', 'label' => trans('texts.convert_to_invoice')];
}
} elseif ($entityType == ENTITY_INVOICE) {
if ($invoice->quote) {
if ($invoice->quote_id && $invoice->quote) {
$actions[] = ['url' => url("quotes/{$invoice->quote->public_id}/edit"), 'label' => trans('texts.view_quote')];
}