mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 08:04:40 -04:00
Fixes for e invoice validation
This commit is contained in:
parent
343bb9aa11
commit
64106ce7e1
@ -65,7 +65,7 @@ class UpdateCompanyRequest extends Request
|
|||||||
$rules['smtp_local_domain'] = 'sometimes|string|nullable';
|
$rules['smtp_local_domain'] = 'sometimes|string|nullable';
|
||||||
// $rules['smtp_verify_peer'] = 'sometimes|string';
|
// $rules['smtp_verify_peer'] = 'sometimes|string';
|
||||||
|
|
||||||
// $rules['e_invoice'] = ['sometimes','nullable', new ValidCompanyScheme()];
|
$rules['e_invoice'] = ['sometimes','nullable', new ValidCompanyScheme()];
|
||||||
|
|
||||||
if (isset($input['portal_mode']) && ($input['portal_mode'] == 'domain' || $input['portal_mode'] == 'iframe')) {
|
if (isset($input['portal_mode']) && ($input['portal_mode'] == 'domain' || $input['portal_mode'] == 'iframe')) {
|
||||||
$rules['portal_domain'] = 'bail|nullable|sometimes|url';
|
$rules['portal_domain'] = 'bail|nullable|sometimes|url';
|
||||||
|
@ -34,6 +34,8 @@ class ValidClientScheme implements ValidationRule, ValidatorAwareRule
|
|||||||
public function validate(string $attribute, mixed $value, Closure $fail): void
|
public function validate(string $attribute, mixed $value, Closure $fail): void
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if(isset($value['Invoice']))
|
||||||
|
{
|
||||||
$r = new EInvoice();
|
$r = new EInvoice();
|
||||||
$errors = $r->validateRequest($value['Invoice'], ClientLevel::class);
|
$errors = $r->validateRequest($value['Invoice'], ClientLevel::class);
|
||||||
|
|
||||||
@ -45,7 +47,7 @@ class ValidClientScheme implements ValidationRule, ValidatorAwareRule
|
|||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -35,6 +35,8 @@ class ValidCompanyScheme implements ValidationRule, ValidatorAwareRule
|
|||||||
public function validate(string $attribute, mixed $value, Closure $fail): void
|
public function validate(string $attribute, mixed $value, Closure $fail): void
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if(isset($value['Invoice']))
|
||||||
|
{
|
||||||
$r = new EInvoice();
|
$r = new EInvoice();
|
||||||
$errors = $r->validateRequest($value['Invoice'], CompanyLevel::class);
|
$errors = $r->validateRequest($value['Invoice'], CompanyLevel::class);
|
||||||
|
|
||||||
@ -46,6 +48,7 @@ class ValidCompanyScheme implements ValidationRule, ValidatorAwareRule
|
|||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user