mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 22:54:36 -04:00
Fixes for tests
This commit is contained in:
parent
1b3a9e6398
commit
47a2ff7df3
@ -406,9 +406,9 @@ class ProductController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function destroy(DestroyProductRequest $request, Product $product)
|
public function destroy(DestroyProductRequest $request, Product $product)
|
||||||
{
|
{
|
||||||
$product = $this->product_repo->delete($product);
|
$this->product_repo->delete($product);
|
||||||
|
|
||||||
return $this->itemResponse($product);
|
return $this->itemResponse($product->fresh());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -150,6 +150,16 @@ class Invoice extends BaseModel
|
|||||||
return $this->belongsTo(Company::class);
|
return $this->belongsTo(Company::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function project()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Project::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function design()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Design::class);
|
||||||
|
}
|
||||||
|
|
||||||
public function user()
|
public function user()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(User::class)->withTrashed();
|
return $this->belongsTo(User::class)->withTrashed();
|
||||||
|
@ -125,6 +125,9 @@ class HtmlEngine
|
|||||||
$data['$terms'] = &$data['$entity.terms'];
|
$data['$terms'] = &$data['$entity.terms'];
|
||||||
$data['$view_link'] = ['value' => '<a class="button" href="'.$this->invitation->getLink().'">'.ctrans('texts.view_invoice').'</a>', 'label' => ctrans('texts.view_invoice')];
|
$data['$view_link'] = ['value' => '<a class="button" href="'.$this->invitation->getLink().'">'.ctrans('texts.view_invoice').'</a>', 'label' => ctrans('texts.view_invoice')];
|
||||||
$data['$view_url'] = ['value' => $this->invitation->getLink(), 'label' => ctrans('texts.view_invoice')];
|
$data['$view_url'] = ['value' => $this->invitation->getLink(), 'label' => ctrans('texts.view_invoice')];
|
||||||
|
|
||||||
|
if($this->entity->project()->exists())
|
||||||
|
$data['$project.name'] = ['value' => $this->entity->project->name, 'label' => ctrans('texts.project_name')];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->entity_string == 'quote') {
|
if ($this->entity_string == 'quote') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user