mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Approve quote
This commit is contained in:
parent
3ff77d0ede
commit
ed2952356c
@ -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…
Reference in New Issue
Block a user