mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 08:17:32 -05: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']) ?? '';
 | 
					        $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']));
 | 
					            $input['entity'] = "App\Models\\".ucfirst(Str::camel($input['entity']));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -103,19 +103,14 @@ class Storecove {
 | 
				
			|||||||
        $payload = [
 | 
					        $payload = [
 | 
				
			||||||
            "legalEntityId"=> 290868,
 | 
					            "legalEntityId"=> 290868,
 | 
				
			||||||
            "idempotencyGuid"=> \Illuminate\Support\Str::uuid(),
 | 
					            "idempotencyGuid"=> \Illuminate\Support\Str::uuid(),
 | 
				
			||||||
            "routing"=>  [
 | 
					 | 
				
			||||||
                "eIdentifiers" => [
 | 
					 | 
				
			||||||
                    [
 | 
					 | 
				
			||||||
                        "scheme" => "DE:VAT",
 | 
					 | 
				
			||||||
                        "id"=> "DE:VAT"
 | 
					 | 
				
			||||||
                    ],
 | 
					 | 
				
			||||||
                ]
 | 
					 | 
				
			||||||
            ],
 | 
					 | 
				
			||||||
            "document"=> [
 | 
					            "document"=> [
 | 
				
			||||||
                'documentType' => 'invoice',
 | 
					                'documentType' => 'invoice',
 | 
				
			||||||
                'rawDocumentData' => ['document' => base64_encode($document), 'parse' => true, 'parseStrategy', 'ubl'],
 | 
					                "invoice"  => [],
 | 
				
			||||||
                // 
 | 
					            ],
 | 
				
			||||||
                // '
 | 
					            "rawDocumentData"=> [
 | 
				
			||||||
 | 
					                "document" => base64_encode($document), 
 | 
				
			||||||
 | 
					                "parse" => true,
 | 
				
			||||||
 | 
					                "parseStrategy"=> "ubl",
 | 
				
			||||||
            ],
 | 
					            ],
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user