1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Create a status for Quote -> Completed

This commit is contained in:
David Bomba 2020-06-02 20:19:29 +10:00
parent 7c39b2e65a
commit fa19c70855
2 changed files with 3 additions and 1 deletions

View File

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

View File

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