mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 23:34:36 -04: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);
|
return $this->errorResponse(['message' => ctrans('texts.invoice_cannot_be_marked_paid')], 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
$invoice = $invoice->service()->markPaid();
|
$invoice = $invoice->service()->markPaid()->save();
|
||||||
|
|
||||||
if (! $bulk) {
|
if (! $bulk) {
|
||||||
return $this->itemResponse($invoice);
|
return $this->itemResponse($invoice);
|
||||||
|
@ -672,8 +672,7 @@ class QuoteController extends BaseController
|
|||||||
return $this->itemResponse($quote);
|
return $this->itemResponse($quote);
|
||||||
break;
|
break;
|
||||||
case 'approve':
|
case 'approve':
|
||||||
//make sure it hasn't already been approved!!
|
if (!in_array($quote->status_id, [Quote::STATUS_SENT, Quote::STATUS_DRAFT]) ) {
|
||||||
if ($quote->status_id != Quote::STATUS_SENT) {
|
|
||||||
return response()->json(['message' => ctrans('texts.quote_unapprovable')], 400);
|
return response()->json(['message' => ctrans('texts.quote_unapprovable')], 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user