Create a status for Quote -> Completed
This commit is contained in:
parent
7c39b2e65a
commit
fa19c70855
2 changed files with 3 additions and 1 deletions
|
|
@ -84,6 +84,7 @@ class Quote extends BaseModel
|
|||
const STATUS_DRAFT = 1;
|
||||
const STATUS_SENT = 2;
|
||||
const STATUS_APPROVED = 3;
|
||||
const STATUS_CONVERTED = 4;
|
||||
const STATUS_EXPIRED = -1;
|
||||
|
||||
public function getEntityType()
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
namespace App\Services\Quote;
|
||||
|
||||
use App\Factory\CloneQuoteToInvoiceFactory;
|
||||
use App\Quote;
|
||||
use App\Models\Quote;
|
||||
use App\Repositories\InvoiceRepository;
|
||||
|
||||
class ConvertQuote
|
||||
|
|
@ -33,6 +33,7 @@ class ConvertQuote
|
|||
->save();
|
||||
|
||||
$quote->invoice_id = $invoice->id;
|
||||
$quote->status_id = Quote::STATUS_CONVERTED;
|
||||
$quote->save();
|
||||
|
||||
// maybe should return invoice here
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue