mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 04:24:33 -04:00
do no auto convert quote if converted by admin user
This commit is contained in:
parent
ae16eb66e5
commit
4900946fa1
@ -676,7 +676,7 @@ class QuoteController extends BaseController
|
|||||||
return response()->json(['message' => ctrans('texts.quote_unapprovable')], 400);
|
return response()->json(['message' => ctrans('texts.quote_unapprovable')], 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->itemResponse($quote->service()->approve()->save());
|
return $this->itemResponse($quote->service()->approveWithNoCoversion()->save());
|
||||||
break;
|
break;
|
||||||
case 'history':
|
case 'history':
|
||||||
// code...
|
// code...
|
||||||
|
@ -185,6 +185,10 @@ class TaskRepository extends BaseRepository
|
|||||||
|
|
||||||
public function start(Task $task)
|
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)
|
if(strlen($task->time_log) < 5)
|
||||||
{
|
{
|
||||||
$log = [];
|
$log = [];
|
||||||
|
@ -126,6 +126,15 @@ class QuoteService
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function approveWithNoCoversion($contact = null) :self
|
||||||
|
{
|
||||||
|
$this->setStatus(Quote::STATUS_APPROVED)->save();
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function convertToInvoice()
|
public function convertToInvoice()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user