invoiceninja/app/Ninja/Intents/WebApp/ListQuoteIntent.php

23 lines
450 B
PHP
Raw Permalink Normal View History

2017-04-04 17:51:01 +03:00
<?php
namespace App\Ninja\Intents\WebApp;
2017-04-05 22:20:11 +03:00
use App\Ninja\Intents\InvoiceIntent;
2017-04-04 17:51:01 +03:00
2017-04-05 22:20:11 +03:00
class ListQuoteIntent extends InvoiceIntent
2017-04-04 17:51:01 +03:00
{
public function process()
{
2017-04-05 22:20:11 +03:00
$this->loadStates(ENTITY_QUOTE);
$this->loadStatuses(ENTITY_QUOTE);
2017-04-06 16:47:37 +03:00
if ($client = $this->requestClient()) {
2017-04-05 18:04:44 +03:00
$url = $client->present()->url . '#quotes';
} else {
$url = '/quotes';
}
return redirect($url);
2017-04-04 17:51:01 +03:00
}
}