Add Company VAT-ID and Tax-ID (#54)

* add company vat_id & tax_id field

* add tax & vat id field in company settings

* fix vat & tax id validation

* add german vat & tax id translation

* add translations for pdf

* add vat_id and tax_id field before timestamps

* make fields nullable and fix code style
This commit is contained in:
Timo
2024-04-20 23:08:32 +02:00
committed by GitHub
parent dc8a85538f
commit 8c83df558c
8 changed files with 94 additions and 26 deletions

View File

@@ -69,6 +69,8 @@ class CompaniesRequest extends FormRequest
return collect($this->validated())
->only([
'name',
'vat_id',
'tax_id',
])
->merge([
'owner_id' => $this->user()->id,

View File

@@ -29,6 +29,12 @@ class CompanyRequest extends FormRequest
'required',
Rule::unique('companies')->ignore($this->header('company'), 'id'),
],
'vat_id' => [
'nullable',
],
'tax_id' => [
'nullable',
],
'slug' => [
'nullable',
],
@@ -44,6 +50,8 @@ class CompanyRequest extends FormRequest
->only([
'name',
'slug',
'vat_id',
'tax_id',
])
->toArray();
}