diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index 4dd93d9c0166..bbd80dca4826 100644 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -685,7 +685,7 @@ class InvoiceController extends BaseController return $this->errorResponse(['message' => ctrans('texts.invoice_cannot_be_marked_paid')], 400); } - $invoice = $invoice->service()->markPaid(); + $invoice = $invoice->service()->markPaid()->save(); if (! $bulk) { return $this->itemResponse($invoice); diff --git a/app/Http/Controllers/QuoteController.php b/app/Http/Controllers/QuoteController.php index 6f14b3a18b48..9d06d208608c 100644 --- a/app/Http/Controllers/QuoteController.php +++ b/app/Http/Controllers/QuoteController.php @@ -672,8 +672,7 @@ class QuoteController extends BaseController return $this->itemResponse($quote); break; case 'approve': - //make sure it hasn't already been approved!! - if ($quote->status_id != Quote::STATUS_SENT) { + if (!in_array($quote->status_id, [Quote::STATUS_SENT, Quote::STATUS_DRAFT]) ) { return response()->json(['message' => ctrans('texts.quote_unapprovable')], 400); }