mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 08:04:33 -04:00
Create a status for Quote -> Completed
This commit is contained in:
parent
7c39b2e65a
commit
fa19c70855
@ -84,6 +84,7 @@ class Quote extends BaseModel
|
|||||||
const STATUS_DRAFT = 1;
|
const STATUS_DRAFT = 1;
|
||||||
const STATUS_SENT = 2;
|
const STATUS_SENT = 2;
|
||||||
const STATUS_APPROVED = 3;
|
const STATUS_APPROVED = 3;
|
||||||
|
const STATUS_CONVERTED = 4;
|
||||||
const STATUS_EXPIRED = -1;
|
const STATUS_EXPIRED = -1;
|
||||||
|
|
||||||
public function getEntityType()
|
public function getEntityType()
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
namespace App\Services\Quote;
|
namespace App\Services\Quote;
|
||||||
|
|
||||||
use App\Factory\CloneQuoteToInvoiceFactory;
|
use App\Factory\CloneQuoteToInvoiceFactory;
|
||||||
use App\Quote;
|
use App\Models\Quote;
|
||||||
use App\Repositories\InvoiceRepository;
|
use App\Repositories\InvoiceRepository;
|
||||||
|
|
||||||
class ConvertQuote
|
class ConvertQuote
|
||||||
@ -33,6 +33,7 @@ class ConvertQuote
|
|||||||
->save();
|
->save();
|
||||||
|
|
||||||
$quote->invoice_id = $invoice->id;
|
$quote->invoice_id = $invoice->id;
|
||||||
|
$quote->status_id = Quote::STATUS_CONVERTED;
|
||||||
$quote->save();
|
$quote->save();
|
||||||
|
|
||||||
// maybe should return invoice here
|
// maybe should return invoice here
|
||||||
|
Loading…
x
Reference in New Issue
Block a user