mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-05 12:44:36 -04:00
Forward user to quote on conversion
This commit is contained in:
parent
53222244ac
commit
447dfc1f8c
@ -183,6 +183,11 @@ class QuoteController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(count($ids) == 1){
|
if(count($ids) == 1){
|
||||||
|
|
||||||
|
//forward client to the invoice if it exists
|
||||||
|
if($quote->invoice()->exists())
|
||||||
|
return redirect()->route('client.invoice.show', $quote->invoice->hashed_id);
|
||||||
|
|
||||||
return redirect()->route('client.quote.show', $quotes->first()->hashed_id);
|
return redirect()->route('client.quote.show', $quotes->first()->hashed_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,10 +159,10 @@ class Quote extends BaseModel
|
|||||||
return $this->belongsTo(Client::class)->withTrashed();
|
return $this->belongsTo(Client::class)->withTrashed();
|
||||||
}
|
}
|
||||||
|
|
||||||
// public function contacts()
|
public function invoice()
|
||||||
// {
|
{
|
||||||
// return $this->hasManyThrough(ClientContact::class, Client::class);
|
return $this->belongsTo(Invoice::class)->withTrashed();
|
||||||
// }
|
}
|
||||||
|
|
||||||
public function assigned_user()
|
public function assigned_user()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user