do no auto convert quote if converted by admin user

This commit is contained in:
David Bomba 2022-03-17 13:41:46 +11:00
parent ae16eb66e5
commit 4900946fa1
3 changed files with 14 additions and 1 deletions

View File

@ -676,7 +676,7 @@ class QuoteController extends BaseController
return response()->json(['message' => ctrans('texts.quote_unapprovable')], 400);
}
return $this->itemResponse($quote->service()->approve()->save());
return $this->itemResponse($quote->service()->approveWithNoCoversion()->save());
break;
case 'history':
// code...

View File

@ -185,6 +185,10 @@ class TaskRepository extends BaseRepository
public function start(Task $task)
{
//do no allow an task to be restarted if it has been invoiced
if($task->invoice_id)
return;
if(strlen($task->time_log) < 5)
{
$log = [];

View File

@ -126,6 +126,15 @@ class QuoteService
return $this;
}
public function approveWithNoCoversion($contact = null) :self
{
$this->setStatus(Quote::STATUS_APPROVED)->save();
return $this;
}
public function convertToInvoice()
{