Approve quote
This commit is contained in:
parent
3ff77d0ede
commit
ed2952356c
2 changed files with 2 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue