mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -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){
|
||||
|
||||
//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);
|
||||
}
|
||||
|
||||
|
@ -159,10 +159,10 @@ class Quote extends BaseModel
|
||||
return $this->belongsTo(Client::class)->withTrashed();
|
||||
}
|
||||
|
||||
// public function contacts()
|
||||
// {
|
||||
// return $this->hasManyThrough(ClientContact::class, Client::class);
|
||||
// }
|
||||
public function invoice()
|
||||
{
|
||||
return $this->belongsTo(Invoice::class)->withTrashed();
|
||||
}
|
||||
|
||||
public function assigned_user()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user