mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-19 11:14:06 +00:00
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:
@@ -69,6 +69,8 @@ class CompaniesRequest extends FormRequest
|
||||
return collect($this->validated())
|
||||
->only([
|
||||
'name',
|
||||
'vat_id',
|
||||
'tax_id',
|
||||
])
|
||||
->merge([
|
||||
'owner_id' => $this->user()->id,
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@ class CompanyResource extends JsonResource
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'name' => $this->name,
|
||||
'vat_id' => $this->vat_id,
|
||||
'tax_id' => $this->tax_id,
|
||||
'logo' => $this->logo,
|
||||
'logo_path' => $this->logo_path,
|
||||
'unique_hash' => $this->unique_hash,
|
||||
|
||||
Reference in New Issue
Block a user