1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Approve quote

This commit is contained in:
David Bomba 2022-03-11 08:13:27 +11:00
parent 3ff77d0ede
commit ed2952356c
2 changed files with 2 additions and 3 deletions

View File

@ -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);

View File

@ -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);
}