From 782537812544ed43519e96ad68c2aac8452fc38a Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Fri, 11 Mar 2016 00:29:07 +0200 Subject: [PATCH] Fix for approving quotes --- app/Services/InvoiceService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Services/InvoiceService.php b/app/Services/InvoiceService.php index 839c6fa6adf3..c5d6f258e02c 100644 --- a/app/Services/InvoiceService.php +++ b/app/Services/InvoiceService.php @@ -79,7 +79,8 @@ class InvoiceService extends BaseService public function approveQuote($quote, $invitation = null) { - $account = Auth::user()->account; + $account = $quote->account; + if (!$quote->is_quote || $quote->quote_invoice_id) { return null; }