mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Updates for quote to project conversion
This commit is contained in:
parent
7566d277ce
commit
042374463e
@ -576,14 +576,9 @@ class QuoteController extends BaseController
|
||||
if ($action == 'convert_to_project') {
|
||||
$quotes->each(function ($quote, $key) use ($user) {
|
||||
if ($user->can('edit', $quote)) {
|
||||
$project = CloneQuoteToProjectFactory::create($quote, $user->id);
|
||||
|
||||
if (empty($project->number)) {
|
||||
$project->number = $this->getNextProjectNumber($project);
|
||||
}
|
||||
$project->save();
|
||||
$quote->project_id = $project->id;
|
||||
$quote->save();
|
||||
|
||||
$quote->service()->convertToProject();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -64,7 +64,7 @@ class ConvertQuoteToProject
|
||||
$task->project_id = $this->quote->project_id;
|
||||
$task->description = $item->notes;
|
||||
$task->status_id = $task_status->id;
|
||||
$task->rate = $item->unit_cost;
|
||||
$task->rate = $item->cost;
|
||||
$task_repo->save([], $task);
|
||||
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user