Customers tax id field

This commit is contained in:
Martin Chevignard
2024-10-04 12:07:29 +02:00
parent dd98df1c77
commit 03b9defeb1
12 changed files with 73 additions and 11 deletions

View File

@@ -49,8 +49,10 @@ class CustomerRequest extends FormRequest
'prefix' => [
'nullable',
],
'tax_id' => [
'nullable',
],
'enable_portal' => [
'boolean',
],
'currency_id' => [
@@ -133,6 +135,7 @@ class CustomerRequest extends FormRequest
'password',
'phone',
'prefix',
'tax_id',
'company_name',
'contact_name',
'website',

View File

@@ -30,6 +30,7 @@ class CustomerResource extends JsonResource
'formatted_created_at' => $this->formattedCreatedAt,
'avatar' => $this->avatar,
'prefix' => $this->prefix,
'tax_id' => $this->tax_id,
'billing' => $this->when($this->billingAddress()->exists(), function () {
return new AddressResource($this->billingAddress);
}),

View File

@@ -35,6 +35,7 @@ class CustomerResource extends JsonResource
'due_amount' => $this->due_amount,
'base_due_amount' => $this->base_due_amount,
'prefix' => $this->prefix,
'tax_id' => $this->tax_id,
'billing' => $this->when($this->billingAddress()->exists(), function () {
return new AddressResource($this->billingAddress);
}),