1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 15:13:29 +01:00
invoiceninja/app/Ninja/Intents/WebApp/CreateInvoiceIntent.php
2017-04-04 17:51:01 +03:00

25 lines
569 B
PHP

<?php
namespace App\Ninja\Intents\WebApp;
use App\Models\Invoice;
use App\Models\EntityModel;
use App\Ninja\Intents\InvoiceIntent;
use Exception;
class CreateInvoiceIntent extends InvoiceIntent
{
public function process()
{
$client = $this->requestClient();
$clientPublicId = $client ? $client->public_id : null;
//$invoiceItems = $this->requestInvoiceItems();
$url = '/invoices/create/' . $clientPublicId . '?';
$url .= $this->requestFieldsAsString(Invoice::$requestFields);
return redirect($url);
}
}