From 99f9b236761d1c80c8de8a367aa96a41cdf71631 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 4 Nov 2023 10:52:07 +1100 Subject: [PATCH] v5.7.43 --- VERSION.txt | 2 +- app/Services/Invoice/EInvoice/FacturaEInvoice.php | 9 +++++++-- config/ninja.php | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index 36bb3ecc17d1..a07dffe0af4b 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.7.42 \ No newline at end of file +5.7.43 \ No newline at end of file diff --git a/app/Services/Invoice/EInvoice/FacturaEInvoice.php b/app/Services/Invoice/EInvoice/FacturaEInvoice.php index 704e3dd7c2b9..36e76b0311ac 100644 --- a/app/Services/Invoice/EInvoice/FacturaEInvoice.php +++ b/app/Services/Invoice/EInvoice/FacturaEInvoice.php @@ -544,8 +544,8 @@ class FacturaEInvoice extends AbstractService "isLegalEntity" => $this->invoice->client->classification === 'individual' ? false : true, "taxNumber" => $this->invoice->client->vat_number, "name" => substr($this->invoice->client->present()->name(), 0, 40), - "firstSurname" => substr($this->invoice->client->present()->first_name(), 0, 40), - "lastSurname" => substr($this->invoice->client->present()->last_name(), 0, 40), + // "firstSurname" => substr($this->invoice->client->present()->last_name(), 0, 40), + // "lastSurname" => substr($this->invoice->client->present()->last_name(), 0, 40), "address" => substr($this->invoice->client->address1, 0, 80), "postCode" => substr($this->invoice->client->postal_code, 0, 5), "town" => substr($this->invoice->client->city, 0, 50), @@ -561,6 +561,11 @@ class FacturaEInvoice extends AbstractService // "ineTownCode" => "280796" // Cód. de municipio del INE ]); + if($this->invoice->client->classification === 'individual') { + $buyer['name'] = $this->invoice->client->present()->first_name(); + $buyer['firstSurname'] = $this->invoice->client->present()->last_name(); + } + $this->fac->setBuyer($buyer); return $this; diff --git a/config/ninja.php b/config/ninja.php index 1ee99ea4d397..c07d03073fed 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -15,8 +15,8 @@ return [ 'require_https' => env('REQUIRE_HTTPS', true), 'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'), - 'app_version' => env('APP_VERSION','5.7.42'), - 'app_tag' => env('APP_TAG','5.7.42'), + 'app_version' => env('APP_VERSION','5.7.43'), + 'app_tag' => env('APP_TAG','5.7.43'), 'minimum_client_version' => '5.0.16', 'terms_version' => '1.0.1', 'api_secret' => env('API_SECRET', false),