diff --git a/app/Classes/Modules/Addresses/DataTransferObjects/AddressObject.php b/app/Classes/Modules/Addresses/DataTransferObjects/AddressObject.php index f1d79e53..7c6ae8b0 100644 --- a/app/Classes/Modules/Addresses/DataTransferObjects/AddressObject.php +++ b/app/Classes/Modules/Addresses/DataTransferObjects/AddressObject.php @@ -23,7 +23,7 @@ class AddressObject implements DataTransferObject /** @var int */ private $districtId; - /** @var int */ + /** @var string */ private $postCode; /** @var int */ @@ -42,12 +42,12 @@ class AddressObject implements DataTransferObject * @param int $countryId * @param int $stateId * @param int $districtId - * @param int $postCode + * @param string $postCode * @param int $type * @param int $status * @param null|string $reference */ - public function __construct(string $streetOne, ?string $streetTwo, int $countryId, int $stateId, int $districtId, int $postCode, int $type, int $status, ?string $reference = null) + public function __construct(string $streetOne, ?string $streetTwo, int $countryId, int $stateId, int $districtId, string $postCode, int $type, int $status, ?string $reference = null) { $this->streetOne = $streetOne; $this->streetTwo = $streetTwo; @@ -101,9 +101,9 @@ class AddressObject implements DataTransferObject } /** - * @return int + * @return string */ - public function getPostCode(): int + public function getPostCode(): string { return $this->postCode; } @@ -133,4 +133,4 @@ class AddressObject implements DataTransferObject } -} \ No newline at end of file +} diff --git a/app/Classes/Modules/Companies/DataTransferObjects/EInvoiceInfoDTO.php b/app/Classes/Modules/Companies/DataTransferObjects/EInvoiceInfoDTO.php index 1a3220e7..15c105aa 100644 --- a/app/Classes/Modules/Companies/DataTransferObjects/EInvoiceInfoDTO.php +++ b/app/Classes/Modules/Companies/DataTransferObjects/EInvoiceInfoDTO.php @@ -13,7 +13,7 @@ class EInvoiceInfoDTO implements DataTransferObject public int $companyModuleId; public string $streetOne; public string $streetTwo; - public int $postCode; + public string $postCode; public function __construct(array $data) { @@ -24,7 +24,7 @@ class EInvoiceInfoDTO implements DataTransferObject $this->companyModuleId = (int) ($data['company_module_id'] ?? 0); $this->streetOne = (string) ($data['street_one'] ?? ''); $this->streetTwo = (string) ($data['street_two'] ?? ''); - $this->postCode = (int) ($data['post_code'] ?? 0); + $this->postCode = (string) ($data['post_code'] ?? ''); } public function toArray(): array diff --git a/app/Classes/Modules/Companies/DataTransferObjects/UpdateCompanyDetailsDTO.php b/app/Classes/Modules/Companies/DataTransferObjects/UpdateCompanyDetailsDTO.php index 0d8ce80e..d77019ef 100644 --- a/app/Classes/Modules/Companies/DataTransferObjects/UpdateCompanyDetailsDTO.php +++ b/app/Classes/Modules/Companies/DataTransferObjects/UpdateCompanyDetailsDTO.php @@ -20,7 +20,7 @@ class UpdateCompanyDetailsDTO implements DataTransferObject public int $companyId; public string $streetOne; public string $streetTwo; - public int $postCode; + public string $postCode; public function __construct(array $data) { @@ -38,7 +38,7 @@ class UpdateCompanyDetailsDTO implements DataTransferObject $this->companyId = (int) ($data['company_id'] ?? 0); $this->streetOne = (string) ($data['street_one'] ?? ''); $this->streetTwo = (string) ($data['street_two'] ?? ''); - $this->postCode = (int) ($data['post_code'] ?? 0); + $this->postCode = (string) ($data['post_code'] ?? 0); } public function toArray(): array diff --git a/app/Http/Resources/AddressEInvoiceResource.php b/app/Http/Resources/AddressEInvoiceResource.php index cbdabe17..d6e49801 100644 --- a/app/Http/Resources/AddressEInvoiceResource.php +++ b/app/Http/Resources/AddressEInvoiceResource.php @@ -20,7 +20,7 @@ class AddressEInvoiceResource extends JsonResource 'street_two' => $this->street_two, 'district' => $this->district, 'state' => $this->state, - 'post_code' => (int) $this->postcode, + 'post_code' => (string) $this->postcode, 'country' => $this->country, 'billing' => (int) $this->billing ]; diff --git a/app/Http/Resources/EInvoiceInfoResource.php b/app/Http/Resources/EInvoiceInfoResource.php index d183032c..97483dd3 100644 --- a/app/Http/Resources/EInvoiceInfoResource.php +++ b/app/Http/Resources/EInvoiceInfoResource.php @@ -20,7 +20,7 @@ class EInvoiceInfoResource extends JsonResource 'street_two' => $this->street_two, 'district' => $this->district, 'state' => $this->state, - 'post_code' => (int) $this->postcode, + 'post_code' => (string) $this->postcode, 'country' => $this->country, 'billing' => (int) $this->billing, 'msic_code' => (string) $this->msic_code, diff --git a/resources/assets/vue/components/companies/forms/EInvoiceInfoFormComponent.vue b/resources/assets/vue/components/companies/forms/EInvoiceInfoFormComponent.vue index c7cd3fec..b5289ac8 100644 --- a/resources/assets/vue/components/companies/forms/EInvoiceInfoFormComponent.vue +++ b/resources/assets/vue/components/companies/forms/EInvoiceInfoFormComponent.vue @@ -54,7 +54,7 @@
- +