mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-15 07:33:04 +01:00
28 lines
636 B
PHP
28 lines
636 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);
|
|
|
|
$url = rtrim($url, '?');
|
|
$url = rtrim($url, '&');
|
|
|
|
return redirect($url);
|
|
}
|
|
}
|