1
0
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:
David Bomba 2024-07-18 07:56:44 +10:00
parent e423816bd3
commit 014452e484
2 changed files with 7 additions and 12 deletions

View File

@ -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']));
}

View File

@ -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",
],
];