mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Validation of entity input
This commit is contained in:
parent
e423816bd3
commit
014452e484
@ -94,7 +94,7 @@ class SendEmailRequest extends Request
|
||||
|
||||
$this->entity_plural = Str::plural($input['entity']) ?? '';
|
||||
|
||||
if (isset($input['entity'])) {
|
||||
if (isset($input['entity']) && in_array($input['entity'], ['invoice','quote','credit','recurring_invoice','purchase_order','payment'])) {
|
||||
$input['entity'] = "App\Models\\".ucfirst(Str::camel($input['entity']));
|
||||
}
|
||||
|
||||
|
@ -103,19 +103,14 @@ class Storecove {
|
||||
$payload = [
|
||||
"legalEntityId"=> 290868,
|
||||
"idempotencyGuid"=> \Illuminate\Support\Str::uuid(),
|
||||
"routing"=> [
|
||||
"eIdentifiers" => [
|
||||
[
|
||||
"scheme" => "DE:VAT",
|
||||
"id"=> "DE:VAT"
|
||||
],
|
||||
]
|
||||
],
|
||||
"document"=> [
|
||||
'documentType' => 'invoice',
|
||||
'rawDocumentData' => ['document' => base64_encode($document), 'parse' => true, 'parseStrategy', 'ubl'],
|
||||
//
|
||||
// '
|
||||
"invoice" => [],
|
||||
],
|
||||
"rawDocumentData"=> [
|
||||
"document" => base64_encode($document),
|
||||
"parse" => true,
|
||||
"parseStrategy"=> "ubl",
|
||||
],
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user